| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System; |
| | 9 | | using System.Threading; |
| | 10 | | using System.Threading.Tasks; |
| | 11 | | using Azure; |
| | 12 | | using Azure.Core; |
| | 13 | | using Azure.Core.Pipeline; |
| | 14 | | using Azure.ResourceManager.Network.Models; |
| | 15 | |
|
| | 16 | | namespace Azure.ResourceManager.Network |
| | 17 | | { |
| | 18 | | /// <summary> The NetworkInterfaces service client. </summary> |
| | 19 | | public partial class NetworkInterfacesOperations |
| | 20 | | { |
| | 21 | | private readonly ClientDiagnostics _clientDiagnostics; |
| | 22 | | private readonly HttpPipeline _pipeline; |
| 476 | 23 | | internal NetworkInterfacesRestOperations RestClient { get; } |
| | 24 | | /// <summary> Initializes a new instance of NetworkInterfacesOperations for mocking. </summary> |
| 524 | 25 | | protected NetworkInterfacesOperations() |
| | 26 | | { |
| 524 | 27 | | } |
| | 28 | | /// <summary> Initializes a new instance of NetworkInterfacesOperations. </summary> |
| | 29 | | /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param> |
| | 30 | | /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param> |
| | 31 | | /// <param name="subscriptionId"> The subscription credentials which uniquely identify the Microsoft Azure subsc |
| | 32 | | /// <param name="endpoint"> server parameter. </param> |
| 524 | 33 | | internal NetworkInterfacesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscrip |
| | 34 | | { |
| 524 | 35 | | RestClient = new NetworkInterfacesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint); |
| 524 | 36 | | _clientDiagnostics = clientDiagnostics; |
| 524 | 37 | | _pipeline = pipeline; |
| 524 | 38 | | } |
| | 39 | |
|
| | 40 | | /// <summary> Gets information about the specified network interface. </summary> |
| | 41 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 42 | | /// <param name="networkInterfaceName"> The name of the network interface. </param> |
| | 43 | | /// <param name="expand"> Expands referenced resources. </param> |
| | 44 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 45 | | public virtual async Task<Response<NetworkInterface>> GetAsync(string resourceGroupName, string networkInterface |
| | 46 | | { |
| 46 | 47 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.Get"); |
| 46 | 48 | | scope.Start(); |
| | 49 | | try |
| | 50 | | { |
| 46 | 51 | | return await RestClient.GetAsync(resourceGroupName, networkInterfaceName, expand, cancellationToken).Con |
| | 52 | | } |
| 0 | 53 | | catch (Exception e) |
| | 54 | | { |
| 0 | 55 | | scope.Failed(e); |
| 0 | 56 | | throw; |
| | 57 | | } |
| 46 | 58 | | } |
| | 59 | |
|
| | 60 | | /// <summary> Gets information about the specified network interface. </summary> |
| | 61 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 62 | | /// <param name="networkInterfaceName"> The name of the network interface. </param> |
| | 63 | | /// <param name="expand"> Expands referenced resources. </param> |
| | 64 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 65 | | public virtual Response<NetworkInterface> Get(string resourceGroupName, string networkInterfaceName, string expa |
| | 66 | | { |
| 46 | 67 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.Get"); |
| 46 | 68 | | scope.Start(); |
| | 69 | | try |
| | 70 | | { |
| 46 | 71 | | return RestClient.Get(resourceGroupName, networkInterfaceName, expand, cancellationToken); |
| | 72 | | } |
| 0 | 73 | | catch (Exception e) |
| | 74 | | { |
| 0 | 75 | | scope.Failed(e); |
| 0 | 76 | | throw; |
| | 77 | | } |
| 46 | 78 | | } |
| | 79 | |
|
| | 80 | | /// <summary> Updates a network interface tags. </summary> |
| | 81 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 82 | | /// <param name="networkInterfaceName"> The name of the network interface. </param> |
| | 83 | | /// <param name="parameters"> Parameters supplied to update network interface tags. </param> |
| | 84 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 85 | | public virtual async Task<Response<NetworkInterface>> UpdateTagsAsync(string resourceGroupName, string networkIn |
| | 86 | | { |
| 0 | 87 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.UpdateTags"); |
| 0 | 88 | | scope.Start(); |
| | 89 | | try |
| | 90 | | { |
| 0 | 91 | | return await RestClient.UpdateTagsAsync(resourceGroupName, networkInterfaceName, parameters, cancellatio |
| | 92 | | } |
| 0 | 93 | | catch (Exception e) |
| | 94 | | { |
| 0 | 95 | | scope.Failed(e); |
| 0 | 96 | | throw; |
| | 97 | | } |
| 0 | 98 | | } |
| | 99 | |
|
| | 100 | | /// <summary> Updates a network interface tags. </summary> |
| | 101 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 102 | | /// <param name="networkInterfaceName"> The name of the network interface. </param> |
| | 103 | | /// <param name="parameters"> Parameters supplied to update network interface tags. </param> |
| | 104 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 105 | | public virtual Response<NetworkInterface> UpdateTags(string resourceGroupName, string networkInterfaceName, Tags |
| | 106 | | { |
| 0 | 107 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.UpdateTags"); |
| 0 | 108 | | scope.Start(); |
| | 109 | | try |
| | 110 | | { |
| 0 | 111 | | return RestClient.UpdateTags(resourceGroupName, networkInterfaceName, parameters, cancellationToken); |
| | 112 | | } |
| 0 | 113 | | catch (Exception e) |
| | 114 | | { |
| 0 | 115 | | scope.Failed(e); |
| 0 | 116 | | throw; |
| | 117 | | } |
| 0 | 118 | | } |
| | 119 | |
|
| | 120 | | /// <summary> Get the specified network interface in a virtual machine scale set. </summary> |
| | 121 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 122 | | /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param> |
| | 123 | | /// <param name="virtualmachineIndex"> The virtual machine index. </param> |
| | 124 | | /// <param name="networkInterfaceName"> The name of the network interface. </param> |
| | 125 | | /// <param name="expand"> Expands referenced resources. </param> |
| | 126 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 127 | | public virtual async Task<Response<NetworkInterface>> GetVirtualMachineScaleSetNetworkInterfaceAsync(string reso |
| | 128 | | { |
| 2 | 129 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.GetVirtualMachineScaleSetNetwo |
| 2 | 130 | | scope.Start(); |
| | 131 | | try |
| | 132 | | { |
| 2 | 133 | | return await RestClient.GetVirtualMachineScaleSetNetworkInterfaceAsync(resourceGroupName, virtualMachine |
| | 134 | | } |
| 0 | 135 | | catch (Exception e) |
| | 136 | | { |
| 0 | 137 | | scope.Failed(e); |
| 0 | 138 | | throw; |
| | 139 | | } |
| 2 | 140 | | } |
| | 141 | |
|
| | 142 | | /// <summary> Get the specified network interface in a virtual machine scale set. </summary> |
| | 143 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 144 | | /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param> |
| | 145 | | /// <param name="virtualmachineIndex"> The virtual machine index. </param> |
| | 146 | | /// <param name="networkInterfaceName"> The name of the network interface. </param> |
| | 147 | | /// <param name="expand"> Expands referenced resources. </param> |
| | 148 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 149 | | public virtual Response<NetworkInterface> GetVirtualMachineScaleSetNetworkInterface(string resourceGroupName, st |
| | 150 | | { |
| 2 | 151 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.GetVirtualMachineScaleSetNetwo |
| 2 | 152 | | scope.Start(); |
| | 153 | | try |
| | 154 | | { |
| 2 | 155 | | return RestClient.GetVirtualMachineScaleSetNetworkInterface(resourceGroupName, virtualMachineScaleSetNam |
| | 156 | | } |
| 0 | 157 | | catch (Exception e) |
| | 158 | | { |
| 0 | 159 | | scope.Failed(e); |
| 0 | 160 | | throw; |
| | 161 | | } |
| 2 | 162 | | } |
| | 163 | |
|
| | 164 | | /// <summary> Get the specified network interface ip configuration in a virtual machine scale set. </summary> |
| | 165 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 166 | | /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param> |
| | 167 | | /// <param name="virtualmachineIndex"> The virtual machine index. </param> |
| | 168 | | /// <param name="networkInterfaceName"> The name of the network interface. </param> |
| | 169 | | /// <param name="ipConfigurationName"> The name of the ip configuration. </param> |
| | 170 | | /// <param name="expand"> Expands referenced resources. </param> |
| | 171 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 172 | | public virtual async Task<Response<NetworkInterfaceIPConfiguration>> GetVirtualMachineScaleSetIpConfigurationAsy |
| | 173 | | { |
| 0 | 174 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.GetVirtualMachineScaleSetIpCon |
| 0 | 175 | | scope.Start(); |
| | 176 | | try |
| | 177 | | { |
| 0 | 178 | | return await RestClient.GetVirtualMachineScaleSetIpConfigurationAsync(resourceGroupName, virtualMachineS |
| | 179 | | } |
| 0 | 180 | | catch (Exception e) |
| | 181 | | { |
| 0 | 182 | | scope.Failed(e); |
| 0 | 183 | | throw; |
| | 184 | | } |
| 0 | 185 | | } |
| | 186 | |
|
| | 187 | | /// <summary> Get the specified network interface ip configuration in a virtual machine scale set. </summary> |
| | 188 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 189 | | /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param> |
| | 190 | | /// <param name="virtualmachineIndex"> The virtual machine index. </param> |
| | 191 | | /// <param name="networkInterfaceName"> The name of the network interface. </param> |
| | 192 | | /// <param name="ipConfigurationName"> The name of the ip configuration. </param> |
| | 193 | | /// <param name="expand"> Expands referenced resources. </param> |
| | 194 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 195 | | public virtual Response<NetworkInterfaceIPConfiguration> GetVirtualMachineScaleSetIpConfiguration(string resourc |
| | 196 | | { |
| 0 | 197 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.GetVirtualMachineScaleSetIpCon |
| 0 | 198 | | scope.Start(); |
| | 199 | | try |
| | 200 | | { |
| 0 | 201 | | return RestClient.GetVirtualMachineScaleSetIpConfiguration(resourceGroupName, virtualMachineScaleSetName |
| | 202 | | } |
| 0 | 203 | | catch (Exception e) |
| | 204 | | { |
| 0 | 205 | | scope.Failed(e); |
| 0 | 206 | | throw; |
| | 207 | | } |
| 0 | 208 | | } |
| | 209 | |
|
| | 210 | | /// <summary> Gets all network interfaces in a subscription. </summary> |
| | 211 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 212 | | public virtual AsyncPageable<NetworkInterface> ListAllAsync(CancellationToken cancellationToken = default) |
| | 213 | | { |
| | 214 | | async Task<Page<NetworkInterface>> FirstPageFunc(int? pageSizeHint) |
| | 215 | | { |
| 6 | 216 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.ListAll"); |
| 6 | 217 | | scope.Start(); |
| | 218 | | try |
| | 219 | | { |
| 6 | 220 | | var response = await RestClient.ListAllAsync(cancellationToken).ConfigureAwait(false); |
| 6 | 221 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 222 | | } |
| 0 | 223 | | catch (Exception e) |
| | 224 | | { |
| 0 | 225 | | scope.Failed(e); |
| 0 | 226 | | throw; |
| | 227 | | } |
| 6 | 228 | | } |
| | 229 | | async Task<Page<NetworkInterface>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 230 | | { |
| 0 | 231 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.ListAll"); |
| 0 | 232 | | scope.Start(); |
| | 233 | | try |
| | 234 | | { |
| 0 | 235 | | var response = await RestClient.ListAllNextPageAsync(nextLink, cancellationToken).ConfigureAwait(fal |
| 0 | 236 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 237 | | } |
| 0 | 238 | | catch (Exception e) |
| | 239 | | { |
| 0 | 240 | | scope.Failed(e); |
| 0 | 241 | | throw; |
| | 242 | | } |
| 0 | 243 | | } |
| 6 | 244 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 245 | | } |
| | 246 | |
|
| | 247 | | /// <summary> Gets all network interfaces in a subscription. </summary> |
| | 248 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 249 | | public virtual Pageable<NetworkInterface> ListAll(CancellationToken cancellationToken = default) |
| | 250 | | { |
| | 251 | | Page<NetworkInterface> FirstPageFunc(int? pageSizeHint) |
| | 252 | | { |
| 6 | 253 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.ListAll"); |
| 6 | 254 | | scope.Start(); |
| | 255 | | try |
| | 256 | | { |
| 6 | 257 | | var response = RestClient.ListAll(cancellationToken); |
| 6 | 258 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 259 | | } |
| 0 | 260 | | catch (Exception e) |
| | 261 | | { |
| 0 | 262 | | scope.Failed(e); |
| 0 | 263 | | throw; |
| | 264 | | } |
| 6 | 265 | | } |
| | 266 | | Page<NetworkInterface> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 267 | | { |
| 0 | 268 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.ListAll"); |
| 0 | 269 | | scope.Start(); |
| | 270 | | try |
| | 271 | | { |
| 0 | 272 | | var response = RestClient.ListAllNextPage(nextLink, cancellationToken); |
| 0 | 273 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 274 | | } |
| 0 | 275 | | catch (Exception e) |
| | 276 | | { |
| 0 | 277 | | scope.Failed(e); |
| 0 | 278 | | throw; |
| | 279 | | } |
| 0 | 280 | | } |
| 6 | 281 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 282 | | } |
| | 283 | |
|
| | 284 | | /// <summary> Gets all network interfaces in a resource group. </summary> |
| | 285 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 286 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 287 | | public virtual AsyncPageable<NetworkInterface> ListAsync(string resourceGroupName, CancellationToken cancellatio |
| | 288 | | { |
| 22 | 289 | | if (resourceGroupName == null) |
| | 290 | | { |
| 0 | 291 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 292 | | } |
| | 293 | |
|
| | 294 | | async Task<Page<NetworkInterface>> FirstPageFunc(int? pageSizeHint) |
| | 295 | | { |
| 22 | 296 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.List"); |
| 22 | 297 | | scope.Start(); |
| | 298 | | try |
| | 299 | | { |
| 22 | 300 | | var response = await RestClient.ListAsync(resourceGroupName, cancellationToken).ConfigureAwait(false |
| 22 | 301 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 302 | | } |
| 0 | 303 | | catch (Exception e) |
| | 304 | | { |
| 0 | 305 | | scope.Failed(e); |
| 0 | 306 | | throw; |
| | 307 | | } |
| 22 | 308 | | } |
| | 309 | | async Task<Page<NetworkInterface>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 310 | | { |
| 0 | 311 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.List"); |
| 0 | 312 | | scope.Start(); |
| | 313 | | try |
| | 314 | | { |
| 0 | 315 | | var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, cancellationToken).Co |
| 0 | 316 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 317 | | } |
| 0 | 318 | | catch (Exception e) |
| | 319 | | { |
| 0 | 320 | | scope.Failed(e); |
| 0 | 321 | | throw; |
| | 322 | | } |
| 0 | 323 | | } |
| 22 | 324 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 325 | | } |
| | 326 | |
|
| | 327 | | /// <summary> Gets all network interfaces in a resource group. </summary> |
| | 328 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 329 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 330 | | public virtual Pageable<NetworkInterface> List(string resourceGroupName, CancellationToken cancellationToken = d |
| | 331 | | { |
| 22 | 332 | | if (resourceGroupName == null) |
| | 333 | | { |
| 0 | 334 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 335 | | } |
| | 336 | |
|
| | 337 | | Page<NetworkInterface> FirstPageFunc(int? pageSizeHint) |
| | 338 | | { |
| 22 | 339 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.List"); |
| 22 | 340 | | scope.Start(); |
| | 341 | | try |
| | 342 | | { |
| 22 | 343 | | var response = RestClient.List(resourceGroupName, cancellationToken); |
| 22 | 344 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 345 | | } |
| 0 | 346 | | catch (Exception e) |
| | 347 | | { |
| 0 | 348 | | scope.Failed(e); |
| 0 | 349 | | throw; |
| | 350 | | } |
| 22 | 351 | | } |
| | 352 | | Page<NetworkInterface> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 353 | | { |
| 0 | 354 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.List"); |
| 0 | 355 | | scope.Start(); |
| | 356 | | try |
| | 357 | | { |
| 0 | 358 | | var response = RestClient.ListNextPage(nextLink, resourceGroupName, cancellationToken); |
| 0 | 359 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 360 | | } |
| 0 | 361 | | catch (Exception e) |
| | 362 | | { |
| 0 | 363 | | scope.Failed(e); |
| 0 | 364 | | throw; |
| | 365 | | } |
| 0 | 366 | | } |
| 22 | 367 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 368 | | } |
| | 369 | |
|
| | 370 | | /// <summary> Gets information about all network interfaces in a virtual machine in a virtual machine scale set. |
| | 371 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 372 | | /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param> |
| | 373 | | /// <param name="virtualmachineIndex"> The virtual machine index. </param> |
| | 374 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 375 | | public virtual AsyncPageable<NetworkInterface> ListVirtualMachineScaleSetVMNetworkInterfacesAsync(string resourc |
| | 376 | | { |
| 2 | 377 | | if (resourceGroupName == null) |
| | 378 | | { |
| 0 | 379 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 380 | | } |
| 2 | 381 | | if (virtualMachineScaleSetName == null) |
| | 382 | | { |
| 0 | 383 | | throw new ArgumentNullException(nameof(virtualMachineScaleSetName)); |
| | 384 | | } |
| 2 | 385 | | if (virtualmachineIndex == null) |
| | 386 | | { |
| 0 | 387 | | throw new ArgumentNullException(nameof(virtualmachineIndex)); |
| | 388 | | } |
| | 389 | |
|
| | 390 | | async Task<Page<NetworkInterface>> FirstPageFunc(int? pageSizeHint) |
| | 391 | | { |
| 2 | 392 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.ListVirtualMachineScaleSet |
| 2 | 393 | | scope.Start(); |
| | 394 | | try |
| | 395 | | { |
| 2 | 396 | | var response = await RestClient.ListVirtualMachineScaleSetVMNetworkInterfacesAsync(resourceGroupName |
| 2 | 397 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 398 | | } |
| 0 | 399 | | catch (Exception e) |
| | 400 | | { |
| 0 | 401 | | scope.Failed(e); |
| 0 | 402 | | throw; |
| | 403 | | } |
| 2 | 404 | | } |
| | 405 | | async Task<Page<NetworkInterface>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 406 | | { |
| 0 | 407 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.ListVirtualMachineScaleSet |
| 0 | 408 | | scope.Start(); |
| | 409 | | try |
| | 410 | | { |
| 0 | 411 | | var response = await RestClient.ListVirtualMachineScaleSetVMNetworkInterfacesNextPageAsync(nextLink, |
| 0 | 412 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 413 | | } |
| 0 | 414 | | catch (Exception e) |
| | 415 | | { |
| 0 | 416 | | scope.Failed(e); |
| 0 | 417 | | throw; |
| | 418 | | } |
| 0 | 419 | | } |
| 2 | 420 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 421 | | } |
| | 422 | |
|
| | 423 | | /// <summary> Gets information about all network interfaces in a virtual machine in a virtual machine scale set. |
| | 424 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 425 | | /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param> |
| | 426 | | /// <param name="virtualmachineIndex"> The virtual machine index. </param> |
| | 427 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 428 | | public virtual Pageable<NetworkInterface> ListVirtualMachineScaleSetVMNetworkInterfaces(string resourceGroupName |
| | 429 | | { |
| 2 | 430 | | if (resourceGroupName == null) |
| | 431 | | { |
| 0 | 432 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 433 | | } |
| 2 | 434 | | if (virtualMachineScaleSetName == null) |
| | 435 | | { |
| 0 | 436 | | throw new ArgumentNullException(nameof(virtualMachineScaleSetName)); |
| | 437 | | } |
| 2 | 438 | | if (virtualmachineIndex == null) |
| | 439 | | { |
| 0 | 440 | | throw new ArgumentNullException(nameof(virtualmachineIndex)); |
| | 441 | | } |
| | 442 | |
|
| | 443 | | Page<NetworkInterface> FirstPageFunc(int? pageSizeHint) |
| | 444 | | { |
| 2 | 445 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.ListVirtualMachineScaleSet |
| 2 | 446 | | scope.Start(); |
| | 447 | | try |
| | 448 | | { |
| 2 | 449 | | var response = RestClient.ListVirtualMachineScaleSetVMNetworkInterfaces(resourceGroupName, virtualMa |
| 2 | 450 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 451 | | } |
| 0 | 452 | | catch (Exception e) |
| | 453 | | { |
| 0 | 454 | | scope.Failed(e); |
| 0 | 455 | | throw; |
| | 456 | | } |
| 2 | 457 | | } |
| | 458 | | Page<NetworkInterface> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 459 | | { |
| 0 | 460 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.ListVirtualMachineScaleSet |
| 0 | 461 | | scope.Start(); |
| | 462 | | try |
| | 463 | | { |
| 0 | 464 | | var response = RestClient.ListVirtualMachineScaleSetVMNetworkInterfacesNextPage(nextLink, resourceGr |
| 0 | 465 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 466 | | } |
| 0 | 467 | | catch (Exception e) |
| | 468 | | { |
| 0 | 469 | | scope.Failed(e); |
| 0 | 470 | | throw; |
| | 471 | | } |
| 0 | 472 | | } |
| 2 | 473 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 474 | | } |
| | 475 | |
|
| | 476 | | /// <summary> Gets all network interfaces in a virtual machine scale set. </summary> |
| | 477 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 478 | | /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param> |
| | 479 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 480 | | public virtual AsyncPageable<NetworkInterface> ListVirtualMachineScaleSetNetworkInterfacesAsync(string resourceG |
| | 481 | | { |
| 2 | 482 | | if (resourceGroupName == null) |
| | 483 | | { |
| 0 | 484 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 485 | | } |
| 2 | 486 | | if (virtualMachineScaleSetName == null) |
| | 487 | | { |
| 0 | 488 | | throw new ArgumentNullException(nameof(virtualMachineScaleSetName)); |
| | 489 | | } |
| | 490 | |
|
| | 491 | | async Task<Page<NetworkInterface>> FirstPageFunc(int? pageSizeHint) |
| | 492 | | { |
| 2 | 493 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.ListVirtualMachineScaleSet |
| 2 | 494 | | scope.Start(); |
| | 495 | | try |
| | 496 | | { |
| 2 | 497 | | var response = await RestClient.ListVirtualMachineScaleSetNetworkInterfacesAsync(resourceGroupName, |
| 2 | 498 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 499 | | } |
| 0 | 500 | | catch (Exception e) |
| | 501 | | { |
| 0 | 502 | | scope.Failed(e); |
| 0 | 503 | | throw; |
| | 504 | | } |
| 2 | 505 | | } |
| | 506 | | async Task<Page<NetworkInterface>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 507 | | { |
| 0 | 508 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.ListVirtualMachineScaleSet |
| 0 | 509 | | scope.Start(); |
| | 510 | | try |
| | 511 | | { |
| 0 | 512 | | var response = await RestClient.ListVirtualMachineScaleSetNetworkInterfacesNextPageAsync(nextLink, r |
| 0 | 513 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 514 | | } |
| 0 | 515 | | catch (Exception e) |
| | 516 | | { |
| 0 | 517 | | scope.Failed(e); |
| 0 | 518 | | throw; |
| | 519 | | } |
| 0 | 520 | | } |
| 2 | 521 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 522 | | } |
| | 523 | |
|
| | 524 | | /// <summary> Gets all network interfaces in a virtual machine scale set. </summary> |
| | 525 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 526 | | /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param> |
| | 527 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 528 | | public virtual Pageable<NetworkInterface> ListVirtualMachineScaleSetNetworkInterfaces(string resourceGroupName, |
| | 529 | | { |
| 2 | 530 | | if (resourceGroupName == null) |
| | 531 | | { |
| 0 | 532 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 533 | | } |
| 2 | 534 | | if (virtualMachineScaleSetName == null) |
| | 535 | | { |
| 0 | 536 | | throw new ArgumentNullException(nameof(virtualMachineScaleSetName)); |
| | 537 | | } |
| | 538 | |
|
| | 539 | | Page<NetworkInterface> FirstPageFunc(int? pageSizeHint) |
| | 540 | | { |
| 2 | 541 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.ListVirtualMachineScaleSet |
| 2 | 542 | | scope.Start(); |
| | 543 | | try |
| | 544 | | { |
| 2 | 545 | | var response = RestClient.ListVirtualMachineScaleSetNetworkInterfaces(resourceGroupName, virtualMach |
| 2 | 546 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 547 | | } |
| 0 | 548 | | catch (Exception e) |
| | 549 | | { |
| 0 | 550 | | scope.Failed(e); |
| 0 | 551 | | throw; |
| | 552 | | } |
| 2 | 553 | | } |
| | 554 | | Page<NetworkInterface> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 555 | | { |
| 0 | 556 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.ListVirtualMachineScaleSet |
| 0 | 557 | | scope.Start(); |
| | 558 | | try |
| | 559 | | { |
| 0 | 560 | | var response = RestClient.ListVirtualMachineScaleSetNetworkInterfacesNextPage(nextLink, resourceGrou |
| 0 | 561 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 562 | | } |
| 0 | 563 | | catch (Exception e) |
| | 564 | | { |
| 0 | 565 | | scope.Failed(e); |
| 0 | 566 | | throw; |
| | 567 | | } |
| 0 | 568 | | } |
| 2 | 569 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 570 | | } |
| | 571 | |
|
| | 572 | | /// <summary> Get the specified network interface ip configuration in a virtual machine scale set. </summary> |
| | 573 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 574 | | /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param> |
| | 575 | | /// <param name="virtualmachineIndex"> The virtual machine index. </param> |
| | 576 | | /// <param name="networkInterfaceName"> The name of the network interface. </param> |
| | 577 | | /// <param name="expand"> Expands referenced resources. </param> |
| | 578 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 579 | | public virtual AsyncPageable<NetworkInterfaceIPConfiguration> ListVirtualMachineScaleSetIpConfigurationsAsync(st |
| | 580 | | { |
| 0 | 581 | | if (resourceGroupName == null) |
| | 582 | | { |
| 0 | 583 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 584 | | } |
| 0 | 585 | | if (virtualMachineScaleSetName == null) |
| | 586 | | { |
| 0 | 587 | | throw new ArgumentNullException(nameof(virtualMachineScaleSetName)); |
| | 588 | | } |
| 0 | 589 | | if (virtualmachineIndex == null) |
| | 590 | | { |
| 0 | 591 | | throw new ArgumentNullException(nameof(virtualmachineIndex)); |
| | 592 | | } |
| 0 | 593 | | if (networkInterfaceName == null) |
| | 594 | | { |
| 0 | 595 | | throw new ArgumentNullException(nameof(networkInterfaceName)); |
| | 596 | | } |
| | 597 | |
|
| | 598 | | async Task<Page<NetworkInterfaceIPConfiguration>> FirstPageFunc(int? pageSizeHint) |
| | 599 | | { |
| 0 | 600 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.ListVirtualMachineScaleSet |
| 0 | 601 | | scope.Start(); |
| | 602 | | try |
| | 603 | | { |
| 0 | 604 | | var response = await RestClient.ListVirtualMachineScaleSetIpConfigurationsAsync(resourceGroupName, v |
| 0 | 605 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 606 | | } |
| 0 | 607 | | catch (Exception e) |
| | 608 | | { |
| 0 | 609 | | scope.Failed(e); |
| 0 | 610 | | throw; |
| | 611 | | } |
| 0 | 612 | | } |
| | 613 | | async Task<Page<NetworkInterfaceIPConfiguration>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 614 | | { |
| 0 | 615 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.ListVirtualMachineScaleSet |
| 0 | 616 | | scope.Start(); |
| | 617 | | try |
| | 618 | | { |
| 0 | 619 | | var response = await RestClient.ListVirtualMachineScaleSetIpConfigurationsNextPageAsync(nextLink, re |
| 0 | 620 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 621 | | } |
| 0 | 622 | | catch (Exception e) |
| | 623 | | { |
| 0 | 624 | | scope.Failed(e); |
| 0 | 625 | | throw; |
| | 626 | | } |
| 0 | 627 | | } |
| 0 | 628 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 629 | | } |
| | 630 | |
|
| | 631 | | /// <summary> Get the specified network interface ip configuration in a virtual machine scale set. </summary> |
| | 632 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 633 | | /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param> |
| | 634 | | /// <param name="virtualmachineIndex"> The virtual machine index. </param> |
| | 635 | | /// <param name="networkInterfaceName"> The name of the network interface. </param> |
| | 636 | | /// <param name="expand"> Expands referenced resources. </param> |
| | 637 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 638 | | public virtual Pageable<NetworkInterfaceIPConfiguration> ListVirtualMachineScaleSetIpConfigurations(string resou |
| | 639 | | { |
| 0 | 640 | | if (resourceGroupName == null) |
| | 641 | | { |
| 0 | 642 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 643 | | } |
| 0 | 644 | | if (virtualMachineScaleSetName == null) |
| | 645 | | { |
| 0 | 646 | | throw new ArgumentNullException(nameof(virtualMachineScaleSetName)); |
| | 647 | | } |
| 0 | 648 | | if (virtualmachineIndex == null) |
| | 649 | | { |
| 0 | 650 | | throw new ArgumentNullException(nameof(virtualmachineIndex)); |
| | 651 | | } |
| 0 | 652 | | if (networkInterfaceName == null) |
| | 653 | | { |
| 0 | 654 | | throw new ArgumentNullException(nameof(networkInterfaceName)); |
| | 655 | | } |
| | 656 | |
|
| | 657 | | Page<NetworkInterfaceIPConfiguration> FirstPageFunc(int? pageSizeHint) |
| | 658 | | { |
| 0 | 659 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.ListVirtualMachineScaleSet |
| 0 | 660 | | scope.Start(); |
| | 661 | | try |
| | 662 | | { |
| 0 | 663 | | var response = RestClient.ListVirtualMachineScaleSetIpConfigurations(resourceGroupName, virtualMachi |
| 0 | 664 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 665 | | } |
| 0 | 666 | | catch (Exception e) |
| | 667 | | { |
| 0 | 668 | | scope.Failed(e); |
| 0 | 669 | | throw; |
| | 670 | | } |
| 0 | 671 | | } |
| | 672 | | Page<NetworkInterfaceIPConfiguration> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 673 | | { |
| 0 | 674 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.ListVirtualMachineScaleSet |
| 0 | 675 | | scope.Start(); |
| | 676 | | try |
| | 677 | | { |
| 0 | 678 | | var response = RestClient.ListVirtualMachineScaleSetIpConfigurationsNextPage(nextLink, resourceGroup |
| 0 | 679 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 680 | | } |
| 0 | 681 | | catch (Exception e) |
| | 682 | | { |
| 0 | 683 | | scope.Failed(e); |
| 0 | 684 | | throw; |
| | 685 | | } |
| 0 | 686 | | } |
| 0 | 687 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 688 | | } |
| | 689 | |
|
| | 690 | | /// <summary> Deletes the specified network interface. </summary> |
| | 691 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 692 | | /// <param name="networkInterfaceName"> The name of the network interface. </param> |
| | 693 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 694 | | public virtual async Task<NetworkInterfacesDeleteOperation> StartDeleteAsync(string resourceGroupName, string ne |
| | 695 | | { |
| 32 | 696 | | if (resourceGroupName == null) |
| | 697 | | { |
| 0 | 698 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 699 | | } |
| 32 | 700 | | if (networkInterfaceName == null) |
| | 701 | | { |
| 0 | 702 | | throw new ArgumentNullException(nameof(networkInterfaceName)); |
| | 703 | | } |
| | 704 | |
|
| 32 | 705 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.StartDelete"); |
| 32 | 706 | | scope.Start(); |
| | 707 | | try |
| | 708 | | { |
| 32 | 709 | | var originalResponse = await RestClient.DeleteAsync(resourceGroupName, networkInterfaceName, cancellatio |
| 32 | 710 | | return new NetworkInterfacesDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteReques |
| | 711 | | } |
| 0 | 712 | | catch (Exception e) |
| | 713 | | { |
| 0 | 714 | | scope.Failed(e); |
| 0 | 715 | | throw; |
| | 716 | | } |
| 32 | 717 | | } |
| | 718 | |
|
| | 719 | | /// <summary> Deletes the specified network interface. </summary> |
| | 720 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 721 | | /// <param name="networkInterfaceName"> The name of the network interface. </param> |
| | 722 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 723 | | public virtual NetworkInterfacesDeleteOperation StartDelete(string resourceGroupName, string networkInterfaceNam |
| | 724 | | { |
| 32 | 725 | | if (resourceGroupName == null) |
| | 726 | | { |
| 0 | 727 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 728 | | } |
| 32 | 729 | | if (networkInterfaceName == null) |
| | 730 | | { |
| 0 | 731 | | throw new ArgumentNullException(nameof(networkInterfaceName)); |
| | 732 | | } |
| | 733 | |
|
| 32 | 734 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.StartDelete"); |
| 32 | 735 | | scope.Start(); |
| | 736 | | try |
| | 737 | | { |
| 32 | 738 | | var originalResponse = RestClient.Delete(resourceGroupName, networkInterfaceName, cancellationToken); |
| 32 | 739 | | return new NetworkInterfacesDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteReques |
| | 740 | | } |
| 0 | 741 | | catch (Exception e) |
| | 742 | | { |
| 0 | 743 | | scope.Failed(e); |
| 0 | 744 | | throw; |
| | 745 | | } |
| 32 | 746 | | } |
| | 747 | |
|
| | 748 | | /// <summary> Creates or updates a network interface. </summary> |
| | 749 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 750 | | /// <param name="networkInterfaceName"> The name of the network interface. </param> |
| | 751 | | /// <param name="parameters"> Parameters supplied to the create or update network interface operation. </param> |
| | 752 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 753 | | public virtual async Task<NetworkInterfacesCreateOrUpdateOperation> StartCreateOrUpdateAsync(string resourceGrou |
| | 754 | | { |
| 48 | 755 | | if (resourceGroupName == null) |
| | 756 | | { |
| 0 | 757 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 758 | | } |
| 48 | 759 | | if (networkInterfaceName == null) |
| | 760 | | { |
| 0 | 761 | | throw new ArgumentNullException(nameof(networkInterfaceName)); |
| | 762 | | } |
| 48 | 763 | | if (parameters == null) |
| | 764 | | { |
| 0 | 765 | | throw new ArgumentNullException(nameof(parameters)); |
| | 766 | | } |
| | 767 | |
|
| 48 | 768 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.StartCreateOrUpdate"); |
| 48 | 769 | | scope.Start(); |
| | 770 | | try |
| | 771 | | { |
| 48 | 772 | | var originalResponse = await RestClient.CreateOrUpdateAsync(resourceGroupName, networkInterfaceName, par |
| 46 | 773 | | return new NetworkInterfacesCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCrea |
| | 774 | | } |
| 2 | 775 | | catch (Exception e) |
| | 776 | | { |
| 2 | 777 | | scope.Failed(e); |
| 2 | 778 | | throw; |
| | 779 | | } |
| 46 | 780 | | } |
| | 781 | |
|
| | 782 | | /// <summary> Creates or updates a network interface. </summary> |
| | 783 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 784 | | /// <param name="networkInterfaceName"> The name of the network interface. </param> |
| | 785 | | /// <param name="parameters"> Parameters supplied to the create or update network interface operation. </param> |
| | 786 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 787 | | public virtual NetworkInterfacesCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string net |
| | 788 | | { |
| 48 | 789 | | if (resourceGroupName == null) |
| | 790 | | { |
| 0 | 791 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 792 | | } |
| 48 | 793 | | if (networkInterfaceName == null) |
| | 794 | | { |
| 0 | 795 | | throw new ArgumentNullException(nameof(networkInterfaceName)); |
| | 796 | | } |
| 48 | 797 | | if (parameters == null) |
| | 798 | | { |
| 0 | 799 | | throw new ArgumentNullException(nameof(parameters)); |
| | 800 | | } |
| | 801 | |
|
| 48 | 802 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.StartCreateOrUpdate"); |
| 48 | 803 | | scope.Start(); |
| | 804 | | try |
| | 805 | | { |
| 48 | 806 | | var originalResponse = RestClient.CreateOrUpdate(resourceGroupName, networkInterfaceName, parameters, ca |
| 46 | 807 | | return new NetworkInterfacesCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCrea |
| | 808 | | } |
| 2 | 809 | | catch (Exception e) |
| | 810 | | { |
| 2 | 811 | | scope.Failed(e); |
| 2 | 812 | | throw; |
| | 813 | | } |
| 46 | 814 | | } |
| | 815 | |
|
| | 816 | | /// <summary> Gets all route tables applied to a network interface. </summary> |
| | 817 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 818 | | /// <param name="networkInterfaceName"> The name of the network interface. </param> |
| | 819 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 820 | | public virtual async Task<NetworkInterfacesGetEffectiveRouteTableOperation> StartGetEffectiveRouteTableAsync(str |
| | 821 | | { |
| 0 | 822 | | if (resourceGroupName == null) |
| | 823 | | { |
| 0 | 824 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 825 | | } |
| 0 | 826 | | if (networkInterfaceName == null) |
| | 827 | | { |
| 0 | 828 | | throw new ArgumentNullException(nameof(networkInterfaceName)); |
| | 829 | | } |
| | 830 | |
|
| 0 | 831 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.StartGetEffectiveRouteTable"); |
| 0 | 832 | | scope.Start(); |
| | 833 | | try |
| | 834 | | { |
| 0 | 835 | | var originalResponse = await RestClient.GetEffectiveRouteTableAsync(resourceGroupName, networkInterfaceN |
| 0 | 836 | | return new NetworkInterfacesGetEffectiveRouteTableOperation(_clientDiagnostics, _pipeline, RestClient.Cr |
| | 837 | | } |
| 0 | 838 | | catch (Exception e) |
| | 839 | | { |
| 0 | 840 | | scope.Failed(e); |
| 0 | 841 | | throw; |
| | 842 | | } |
| 0 | 843 | | } |
| | 844 | |
|
| | 845 | | /// <summary> Gets all route tables applied to a network interface. </summary> |
| | 846 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 847 | | /// <param name="networkInterfaceName"> The name of the network interface. </param> |
| | 848 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 849 | | public virtual NetworkInterfacesGetEffectiveRouteTableOperation StartGetEffectiveRouteTable(string resourceGroup |
| | 850 | | { |
| 0 | 851 | | if (resourceGroupName == null) |
| | 852 | | { |
| 0 | 853 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 854 | | } |
| 0 | 855 | | if (networkInterfaceName == null) |
| | 856 | | { |
| 0 | 857 | | throw new ArgumentNullException(nameof(networkInterfaceName)); |
| | 858 | | } |
| | 859 | |
|
| 0 | 860 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.StartGetEffectiveRouteTable"); |
| 0 | 861 | | scope.Start(); |
| | 862 | | try |
| | 863 | | { |
| 0 | 864 | | var originalResponse = RestClient.GetEffectiveRouteTable(resourceGroupName, networkInterfaceName, cancel |
| 0 | 865 | | return new NetworkInterfacesGetEffectiveRouteTableOperation(_clientDiagnostics, _pipeline, RestClient.Cr |
| | 866 | | } |
| 0 | 867 | | catch (Exception e) |
| | 868 | | { |
| 0 | 869 | | scope.Failed(e); |
| 0 | 870 | | throw; |
| | 871 | | } |
| 0 | 872 | | } |
| | 873 | |
|
| | 874 | | /// <summary> Gets all network security groups applied to a network interface. </summary> |
| | 875 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 876 | | /// <param name="networkInterfaceName"> The name of the network interface. </param> |
| | 877 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 878 | | public virtual async Task<NetworkInterfacesListEffectiveNetworkSecurityGroupsOperation> StartListEffectiveNetwor |
| | 879 | | { |
| 0 | 880 | | if (resourceGroupName == null) |
| | 881 | | { |
| 0 | 882 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 883 | | } |
| 0 | 884 | | if (networkInterfaceName == null) |
| | 885 | | { |
| 0 | 886 | | throw new ArgumentNullException(nameof(networkInterfaceName)); |
| | 887 | | } |
| | 888 | |
|
| 0 | 889 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.StartListEffectiveNetworkSecur |
| 0 | 890 | | scope.Start(); |
| | 891 | | try |
| | 892 | | { |
| 0 | 893 | | var originalResponse = await RestClient.ListEffectiveNetworkSecurityGroupsAsync(resourceGroupName, netwo |
| 0 | 894 | | return new NetworkInterfacesListEffectiveNetworkSecurityGroupsOperation(_clientDiagnostics, _pipeline, R |
| | 895 | | } |
| 0 | 896 | | catch (Exception e) |
| | 897 | | { |
| 0 | 898 | | scope.Failed(e); |
| 0 | 899 | | throw; |
| | 900 | | } |
| 0 | 901 | | } |
| | 902 | |
|
| | 903 | | /// <summary> Gets all network security groups applied to a network interface. </summary> |
| | 904 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 905 | | /// <param name="networkInterfaceName"> The name of the network interface. </param> |
| | 906 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 907 | | public virtual NetworkInterfacesListEffectiveNetworkSecurityGroupsOperation StartListEffectiveNetworkSecurityGro |
| | 908 | | { |
| 0 | 909 | | if (resourceGroupName == null) |
| | 910 | | { |
| 0 | 911 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 912 | | } |
| 0 | 913 | | if (networkInterfaceName == null) |
| | 914 | | { |
| 0 | 915 | | throw new ArgumentNullException(nameof(networkInterfaceName)); |
| | 916 | | } |
| | 917 | |
|
| 0 | 918 | | using var scope = _clientDiagnostics.CreateScope("NetworkInterfacesOperations.StartListEffectiveNetworkSecur |
| 0 | 919 | | scope.Start(); |
| | 920 | | try |
| | 921 | | { |
| 0 | 922 | | var originalResponse = RestClient.ListEffectiveNetworkSecurityGroups(resourceGroupName, networkInterface |
| 0 | 923 | | return new NetworkInterfacesListEffectiveNetworkSecurityGroupsOperation(_clientDiagnostics, _pipeline, R |
| | 924 | | } |
| 0 | 925 | | catch (Exception e) |
| | 926 | | { |
| 0 | 927 | | scope.Failed(e); |
| 0 | 928 | | throw; |
| | 929 | | } |
| 0 | 930 | | } |
| | 931 | | } |
| | 932 | | } |