| | | 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 VirtualNetworkGateways service client. </summary> |
| | | 19 | | public partial class VirtualNetworkGatewaysOperations |
| | | 20 | | { |
| | | 21 | | private readonly ClientDiagnostics _clientDiagnostics; |
| | | 22 | | private readonly HttpPipeline _pipeline; |
| | 52 | 23 | | internal VirtualNetworkGatewaysRestOperations RestClient { get; } |
| | | 24 | | /// <summary> Initializes a new instance of VirtualNetworkGatewaysOperations for mocking. </summary> |
| | 36 | 25 | | protected VirtualNetworkGatewaysOperations() |
| | | 26 | | { |
| | 36 | 27 | | } |
| | | 28 | | /// <summary> Initializes a new instance of VirtualNetworkGatewaysOperations. </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> |
| | 36 | 33 | | internal VirtualNetworkGatewaysOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string sub |
| | | 34 | | { |
| | 36 | 35 | | RestClient = new VirtualNetworkGatewaysRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint) |
| | 36 | 36 | | _clientDiagnostics = clientDiagnostics; |
| | 36 | 37 | | _pipeline = pipeline; |
| | 36 | 38 | | } |
| | | 39 | | |
| | | 40 | | /// <summary> Gets the specified virtual network gateway by resource group. </summary> |
| | | 41 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 42 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 43 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 44 | | public virtual async Task<Response<VirtualNetworkGateway>> GetAsync(string resourceGroupName, string virtualNetw |
| | | 45 | | { |
| | 8 | 46 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.Get"); |
| | 8 | 47 | | scope.Start(); |
| | | 48 | | try |
| | | 49 | | { |
| | 8 | 50 | | return await RestClient.GetAsync(resourceGroupName, virtualNetworkGatewayName, cancellationToken).Config |
| | | 51 | | } |
| | 0 | 52 | | catch (Exception e) |
| | | 53 | | { |
| | 0 | 54 | | scope.Failed(e); |
| | 0 | 55 | | throw; |
| | | 56 | | } |
| | 8 | 57 | | } |
| | | 58 | | |
| | | 59 | | /// <summary> Gets the specified virtual network gateway by resource group. </summary> |
| | | 60 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 61 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 62 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 63 | | public virtual Response<VirtualNetworkGateway> Get(string resourceGroupName, string virtualNetworkGatewayName, C |
| | | 64 | | { |
| | 8 | 65 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.Get"); |
| | 8 | 66 | | scope.Start(); |
| | | 67 | | try |
| | | 68 | | { |
| | 8 | 69 | | return RestClient.Get(resourceGroupName, virtualNetworkGatewayName, cancellationToken); |
| | | 70 | | } |
| | 0 | 71 | | catch (Exception e) |
| | | 72 | | { |
| | 0 | 73 | | scope.Failed(e); |
| | 0 | 74 | | throw; |
| | | 75 | | } |
| | 8 | 76 | | } |
| | | 77 | | |
| | | 78 | | /// <summary> Gets a xml format representation for supported vpn devices. </summary> |
| | | 79 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 80 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 81 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 82 | | public virtual async Task<Response<string>> SupportedVpnDevicesAsync(string resourceGroupName, string virtualNet |
| | | 83 | | { |
| | 0 | 84 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.SupportedVpnDevices"); |
| | 0 | 85 | | scope.Start(); |
| | | 86 | | try |
| | | 87 | | { |
| | 0 | 88 | | return await RestClient.SupportedVpnDevicesAsync(resourceGroupName, virtualNetworkGatewayName, cancellat |
| | | 89 | | } |
| | 0 | 90 | | catch (Exception e) |
| | | 91 | | { |
| | 0 | 92 | | scope.Failed(e); |
| | 0 | 93 | | throw; |
| | | 94 | | } |
| | 0 | 95 | | } |
| | | 96 | | |
| | | 97 | | /// <summary> Gets a xml format representation for supported vpn devices. </summary> |
| | | 98 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 99 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 100 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 101 | | public virtual Response<string> SupportedVpnDevices(string resourceGroupName, string virtualNetworkGatewayName, |
| | | 102 | | { |
| | 0 | 103 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.SupportedVpnDevices"); |
| | 0 | 104 | | scope.Start(); |
| | | 105 | | try |
| | | 106 | | { |
| | 0 | 107 | | return RestClient.SupportedVpnDevices(resourceGroupName, virtualNetworkGatewayName, cancellationToken); |
| | | 108 | | } |
| | 0 | 109 | | catch (Exception e) |
| | | 110 | | { |
| | 0 | 111 | | scope.Failed(e); |
| | 0 | 112 | | throw; |
| | | 113 | | } |
| | 0 | 114 | | } |
| | | 115 | | |
| | | 116 | | /// <summary> Gets a xml format representation for vpn device configuration script. </summary> |
| | | 117 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 118 | | /// <param name="virtualNetworkGatewayConnectionName"> The name of the virtual network gateway connection for wh |
| | | 119 | | /// <param name="parameters"> Parameters supplied to the generate vpn device script operation. </param> |
| | | 120 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 121 | | public virtual async Task<Response<string>> VpnDeviceConfigurationScriptAsync(string resourceGroupName, string v |
| | | 122 | | { |
| | 0 | 123 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.VpnDeviceConfigurationScr |
| | 0 | 124 | | scope.Start(); |
| | | 125 | | try |
| | | 126 | | { |
| | 0 | 127 | | return await RestClient.VpnDeviceConfigurationScriptAsync(resourceGroupName, virtualNetworkGatewayConnec |
| | | 128 | | } |
| | 0 | 129 | | catch (Exception e) |
| | | 130 | | { |
| | 0 | 131 | | scope.Failed(e); |
| | 0 | 132 | | throw; |
| | | 133 | | } |
| | 0 | 134 | | } |
| | | 135 | | |
| | | 136 | | /// <summary> Gets a xml format representation for vpn device configuration script. </summary> |
| | | 137 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 138 | | /// <param name="virtualNetworkGatewayConnectionName"> The name of the virtual network gateway connection for wh |
| | | 139 | | /// <param name="parameters"> Parameters supplied to the generate vpn device script operation. </param> |
| | | 140 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 141 | | public virtual Response<string> VpnDeviceConfigurationScript(string resourceGroupName, string virtualNetworkGate |
| | | 142 | | { |
| | 0 | 143 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.VpnDeviceConfigurationScr |
| | 0 | 144 | | scope.Start(); |
| | | 145 | | try |
| | | 146 | | { |
| | 0 | 147 | | return RestClient.VpnDeviceConfigurationScript(resourceGroupName, virtualNetworkGatewayConnectionName, p |
| | | 148 | | } |
| | 0 | 149 | | catch (Exception e) |
| | | 150 | | { |
| | 0 | 151 | | scope.Failed(e); |
| | 0 | 152 | | throw; |
| | | 153 | | } |
| | 0 | 154 | | } |
| | | 155 | | |
| | | 156 | | /// <summary> Gets all virtual network gateways by resource group. </summary> |
| | | 157 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 158 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 159 | | public virtual AsyncPageable<VirtualNetworkGateway> ListAsync(string resourceGroupName, CancellationToken cancel |
| | | 160 | | { |
| | 0 | 161 | | if (resourceGroupName == null) |
| | | 162 | | { |
| | 0 | 163 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 164 | | } |
| | | 165 | | |
| | | 166 | | async Task<Page<VirtualNetworkGateway>> FirstPageFunc(int? pageSizeHint) |
| | | 167 | | { |
| | 0 | 168 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.List"); |
| | 0 | 169 | | scope.Start(); |
| | | 170 | | try |
| | | 171 | | { |
| | 0 | 172 | | var response = await RestClient.ListAsync(resourceGroupName, cancellationToken).ConfigureAwait(false |
| | 0 | 173 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 174 | | } |
| | 0 | 175 | | catch (Exception e) |
| | | 176 | | { |
| | 0 | 177 | | scope.Failed(e); |
| | 0 | 178 | | throw; |
| | | 179 | | } |
| | 0 | 180 | | } |
| | | 181 | | async Task<Page<VirtualNetworkGateway>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 182 | | { |
| | 0 | 183 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.List"); |
| | 0 | 184 | | scope.Start(); |
| | | 185 | | try |
| | | 186 | | { |
| | 0 | 187 | | var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, cancellationToken).Co |
| | 0 | 188 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 189 | | } |
| | 0 | 190 | | catch (Exception e) |
| | | 191 | | { |
| | 0 | 192 | | scope.Failed(e); |
| | 0 | 193 | | throw; |
| | | 194 | | } |
| | 0 | 195 | | } |
| | 0 | 196 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | | 197 | | } |
| | | 198 | | |
| | | 199 | | /// <summary> Gets all virtual network gateways by resource group. </summary> |
| | | 200 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 201 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 202 | | public virtual Pageable<VirtualNetworkGateway> List(string resourceGroupName, CancellationToken cancellationToke |
| | | 203 | | { |
| | 0 | 204 | | if (resourceGroupName == null) |
| | | 205 | | { |
| | 0 | 206 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 207 | | } |
| | | 208 | | |
| | | 209 | | Page<VirtualNetworkGateway> FirstPageFunc(int? pageSizeHint) |
| | | 210 | | { |
| | 0 | 211 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.List"); |
| | 0 | 212 | | scope.Start(); |
| | | 213 | | try |
| | | 214 | | { |
| | 0 | 215 | | var response = RestClient.List(resourceGroupName, cancellationToken); |
| | 0 | 216 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 217 | | } |
| | 0 | 218 | | catch (Exception e) |
| | | 219 | | { |
| | 0 | 220 | | scope.Failed(e); |
| | 0 | 221 | | throw; |
| | | 222 | | } |
| | 0 | 223 | | } |
| | | 224 | | Page<VirtualNetworkGateway> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 225 | | { |
| | 0 | 226 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.List"); |
| | 0 | 227 | | scope.Start(); |
| | | 228 | | try |
| | | 229 | | { |
| | 0 | 230 | | var response = RestClient.ListNextPage(nextLink, resourceGroupName, cancellationToken); |
| | 0 | 231 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 232 | | } |
| | 0 | 233 | | catch (Exception e) |
| | | 234 | | { |
| | 0 | 235 | | scope.Failed(e); |
| | 0 | 236 | | throw; |
| | | 237 | | } |
| | 0 | 238 | | } |
| | 0 | 239 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | | 240 | | } |
| | | 241 | | |
| | | 242 | | /// <summary> Gets all the connections in a virtual network gateway. </summary> |
| | | 243 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 244 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 245 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 246 | | public virtual AsyncPageable<VirtualNetworkGatewayConnectionListEntity> ListConnectionsAsync(string resourceGrou |
| | | 247 | | { |
| | 2 | 248 | | if (resourceGroupName == null) |
| | | 249 | | { |
| | 0 | 250 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 251 | | } |
| | 2 | 252 | | if (virtualNetworkGatewayName == null) |
| | | 253 | | { |
| | 0 | 254 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 255 | | } |
| | | 256 | | |
| | | 257 | | async Task<Page<VirtualNetworkGatewayConnectionListEntity>> FirstPageFunc(int? pageSizeHint) |
| | | 258 | | { |
| | 2 | 259 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.ListConnections"); |
| | 2 | 260 | | scope.Start(); |
| | | 261 | | try |
| | | 262 | | { |
| | 2 | 263 | | var response = await RestClient.ListConnectionsAsync(resourceGroupName, virtualNetworkGatewayName, c |
| | 2 | 264 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 265 | | } |
| | 0 | 266 | | catch (Exception e) |
| | | 267 | | { |
| | 0 | 268 | | scope.Failed(e); |
| | 0 | 269 | | throw; |
| | | 270 | | } |
| | 2 | 271 | | } |
| | | 272 | | async Task<Page<VirtualNetworkGatewayConnectionListEntity>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 273 | | { |
| | 0 | 274 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.ListConnections"); |
| | 0 | 275 | | scope.Start(); |
| | | 276 | | try |
| | | 277 | | { |
| | 0 | 278 | | var response = await RestClient.ListConnectionsNextPageAsync(nextLink, resourceGroupName, virtualNet |
| | 0 | 279 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 280 | | } |
| | 0 | 281 | | catch (Exception e) |
| | | 282 | | { |
| | 0 | 283 | | scope.Failed(e); |
| | 0 | 284 | | throw; |
| | | 285 | | } |
| | 0 | 286 | | } |
| | 2 | 287 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | | 288 | | } |
| | | 289 | | |
| | | 290 | | /// <summary> Gets all the connections in a virtual network gateway. </summary> |
| | | 291 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 292 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 293 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 294 | | public virtual Pageable<VirtualNetworkGatewayConnectionListEntity> ListConnections(string resourceGroupName, str |
| | | 295 | | { |
| | 2 | 296 | | if (resourceGroupName == null) |
| | | 297 | | { |
| | 0 | 298 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 299 | | } |
| | 2 | 300 | | if (virtualNetworkGatewayName == null) |
| | | 301 | | { |
| | 0 | 302 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 303 | | } |
| | | 304 | | |
| | | 305 | | Page<VirtualNetworkGatewayConnectionListEntity> FirstPageFunc(int? pageSizeHint) |
| | | 306 | | { |
| | 2 | 307 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.ListConnections"); |
| | 2 | 308 | | scope.Start(); |
| | | 309 | | try |
| | | 310 | | { |
| | 2 | 311 | | var response = RestClient.ListConnections(resourceGroupName, virtualNetworkGatewayName, cancellation |
| | 2 | 312 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 313 | | } |
| | 0 | 314 | | catch (Exception e) |
| | | 315 | | { |
| | 0 | 316 | | scope.Failed(e); |
| | 0 | 317 | | throw; |
| | | 318 | | } |
| | 2 | 319 | | } |
| | | 320 | | Page<VirtualNetworkGatewayConnectionListEntity> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 321 | | { |
| | 0 | 322 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.ListConnections"); |
| | 0 | 323 | | scope.Start(); |
| | | 324 | | try |
| | | 325 | | { |
| | 0 | 326 | | var response = RestClient.ListConnectionsNextPage(nextLink, resourceGroupName, virtualNetworkGateway |
| | 0 | 327 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 328 | | } |
| | 0 | 329 | | catch (Exception e) |
| | | 330 | | { |
| | 0 | 331 | | scope.Failed(e); |
| | 0 | 332 | | throw; |
| | | 333 | | } |
| | 0 | 334 | | } |
| | 2 | 335 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | | 336 | | } |
| | | 337 | | |
| | | 338 | | /// <summary> Creates or updates a virtual network gateway in the specified resource group. </summary> |
| | | 339 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 340 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 341 | | /// <param name="parameters"> Parameters supplied to create or update virtual network gateway operation. </param |
| | | 342 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 343 | | public virtual async Task<VirtualNetworkGatewaysCreateOrUpdateOperation> StartCreateOrUpdateAsync(string resourc |
| | | 344 | | { |
| | 8 | 345 | | if (resourceGroupName == null) |
| | | 346 | | { |
| | 0 | 347 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 348 | | } |
| | 8 | 349 | | if (virtualNetworkGatewayName == null) |
| | | 350 | | { |
| | 0 | 351 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 352 | | } |
| | 8 | 353 | | if (parameters == null) |
| | | 354 | | { |
| | 0 | 355 | | throw new ArgumentNullException(nameof(parameters)); |
| | | 356 | | } |
| | | 357 | | |
| | 8 | 358 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartCreateOrUpdate"); |
| | 8 | 359 | | scope.Start(); |
| | | 360 | | try |
| | | 361 | | { |
| | 8 | 362 | | var originalResponse = await RestClient.CreateOrUpdateAsync(resourceGroupName, virtualNetworkGatewayName |
| | 8 | 363 | | return new VirtualNetworkGatewaysCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.Creat |
| | | 364 | | } |
| | 0 | 365 | | catch (Exception e) |
| | | 366 | | { |
| | 0 | 367 | | scope.Failed(e); |
| | 0 | 368 | | throw; |
| | | 369 | | } |
| | 8 | 370 | | } |
| | | 371 | | |
| | | 372 | | /// <summary> Creates or updates a virtual network gateway in the specified resource group. </summary> |
| | | 373 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 374 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 375 | | /// <param name="parameters"> Parameters supplied to create or update virtual network gateway operation. </param |
| | | 376 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 377 | | public virtual VirtualNetworkGatewaysCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, strin |
| | | 378 | | { |
| | 8 | 379 | | if (resourceGroupName == null) |
| | | 380 | | { |
| | 0 | 381 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 382 | | } |
| | 8 | 383 | | if (virtualNetworkGatewayName == null) |
| | | 384 | | { |
| | 0 | 385 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 386 | | } |
| | 8 | 387 | | if (parameters == null) |
| | | 388 | | { |
| | 0 | 389 | | throw new ArgumentNullException(nameof(parameters)); |
| | | 390 | | } |
| | | 391 | | |
| | 8 | 392 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartCreateOrUpdate"); |
| | 8 | 393 | | scope.Start(); |
| | | 394 | | try |
| | | 395 | | { |
| | 8 | 396 | | var originalResponse = RestClient.CreateOrUpdate(resourceGroupName, virtualNetworkGatewayName, parameter |
| | 8 | 397 | | return new VirtualNetworkGatewaysCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.Creat |
| | | 398 | | } |
| | 0 | 399 | | catch (Exception e) |
| | | 400 | | { |
| | 0 | 401 | | scope.Failed(e); |
| | 0 | 402 | | throw; |
| | | 403 | | } |
| | 8 | 404 | | } |
| | | 405 | | |
| | | 406 | | /// <summary> Deletes the specified virtual network gateway. </summary> |
| | | 407 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 408 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 409 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 410 | | public virtual async Task<VirtualNetworkGatewaysDeleteOperation> StartDeleteAsync(string resourceGroupName, stri |
| | | 411 | | { |
| | 0 | 412 | | if (resourceGroupName == null) |
| | | 413 | | { |
| | 0 | 414 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 415 | | } |
| | 0 | 416 | | if (virtualNetworkGatewayName == null) |
| | | 417 | | { |
| | 0 | 418 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 419 | | } |
| | | 420 | | |
| | 0 | 421 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartDelete"); |
| | 0 | 422 | | scope.Start(); |
| | | 423 | | try |
| | | 424 | | { |
| | 0 | 425 | | var originalResponse = await RestClient.DeleteAsync(resourceGroupName, virtualNetworkGatewayName, cancel |
| | 0 | 426 | | return new VirtualNetworkGatewaysDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteR |
| | | 427 | | } |
| | 0 | 428 | | catch (Exception e) |
| | | 429 | | { |
| | 0 | 430 | | scope.Failed(e); |
| | 0 | 431 | | throw; |
| | | 432 | | } |
| | 0 | 433 | | } |
| | | 434 | | |
| | | 435 | | /// <summary> Deletes the specified virtual network gateway. </summary> |
| | | 436 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 437 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 438 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 439 | | public virtual VirtualNetworkGatewaysDeleteOperation StartDelete(string resourceGroupName, string virtualNetwork |
| | | 440 | | { |
| | 0 | 441 | | if (resourceGroupName == null) |
| | | 442 | | { |
| | 0 | 443 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 444 | | } |
| | 0 | 445 | | if (virtualNetworkGatewayName == null) |
| | | 446 | | { |
| | 0 | 447 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 448 | | } |
| | | 449 | | |
| | 0 | 450 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartDelete"); |
| | 0 | 451 | | scope.Start(); |
| | | 452 | | try |
| | | 453 | | { |
| | 0 | 454 | | var originalResponse = RestClient.Delete(resourceGroupName, virtualNetworkGatewayName, cancellationToken |
| | 0 | 455 | | return new VirtualNetworkGatewaysDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteR |
| | | 456 | | } |
| | 0 | 457 | | catch (Exception e) |
| | | 458 | | { |
| | 0 | 459 | | scope.Failed(e); |
| | 0 | 460 | | throw; |
| | | 461 | | } |
| | 0 | 462 | | } |
| | | 463 | | |
| | | 464 | | /// <summary> Updates a virtual network gateway tags. </summary> |
| | | 465 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 466 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 467 | | /// <param name="parameters"> Parameters supplied to update virtual network gateway tags. </param> |
| | | 468 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 469 | | public virtual async Task<VirtualNetworkGatewaysUpdateTagsOperation> StartUpdateTagsAsync(string resourceGroupNa |
| | | 470 | | { |
| | 0 | 471 | | if (resourceGroupName == null) |
| | | 472 | | { |
| | 0 | 473 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 474 | | } |
| | 0 | 475 | | if (virtualNetworkGatewayName == null) |
| | | 476 | | { |
| | 0 | 477 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 478 | | } |
| | 0 | 479 | | if (parameters == null) |
| | | 480 | | { |
| | 0 | 481 | | throw new ArgumentNullException(nameof(parameters)); |
| | | 482 | | } |
| | | 483 | | |
| | 0 | 484 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartUpdateTags"); |
| | 0 | 485 | | scope.Start(); |
| | | 486 | | try |
| | | 487 | | { |
| | 0 | 488 | | var originalResponse = await RestClient.UpdateTagsAsync(resourceGroupName, virtualNetworkGatewayName, pa |
| | 0 | 489 | | return new VirtualNetworkGatewaysUpdateTagsOperation(_clientDiagnostics, _pipeline, RestClient.CreateUpd |
| | | 490 | | } |
| | 0 | 491 | | catch (Exception e) |
| | | 492 | | { |
| | 0 | 493 | | scope.Failed(e); |
| | 0 | 494 | | throw; |
| | | 495 | | } |
| | 0 | 496 | | } |
| | | 497 | | |
| | | 498 | | /// <summary> Updates a virtual network gateway tags. </summary> |
| | | 499 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 500 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 501 | | /// <param name="parameters"> Parameters supplied to update virtual network gateway tags. </param> |
| | | 502 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 503 | | public virtual VirtualNetworkGatewaysUpdateTagsOperation StartUpdateTags(string resourceGroupName, string virtua |
| | | 504 | | { |
| | 0 | 505 | | if (resourceGroupName == null) |
| | | 506 | | { |
| | 0 | 507 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 508 | | } |
| | 0 | 509 | | if (virtualNetworkGatewayName == null) |
| | | 510 | | { |
| | 0 | 511 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 512 | | } |
| | 0 | 513 | | if (parameters == null) |
| | | 514 | | { |
| | 0 | 515 | | throw new ArgumentNullException(nameof(parameters)); |
| | | 516 | | } |
| | | 517 | | |
| | 0 | 518 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartUpdateTags"); |
| | 0 | 519 | | scope.Start(); |
| | | 520 | | try |
| | | 521 | | { |
| | 0 | 522 | | var originalResponse = RestClient.UpdateTags(resourceGroupName, virtualNetworkGatewayName, parameters, c |
| | 0 | 523 | | return new VirtualNetworkGatewaysUpdateTagsOperation(_clientDiagnostics, _pipeline, RestClient.CreateUpd |
| | | 524 | | } |
| | 0 | 525 | | catch (Exception e) |
| | | 526 | | { |
| | 0 | 527 | | scope.Failed(e); |
| | 0 | 528 | | throw; |
| | | 529 | | } |
| | 0 | 530 | | } |
| | | 531 | | |
| | | 532 | | /// <summary> Resets the primary of the virtual network gateway in the specified resource group. </summary> |
| | | 533 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 534 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 535 | | /// <param name="gatewayVip"> Virtual network gateway vip address supplied to the begin reset of the active-acti |
| | | 536 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 537 | | public virtual async Task<VirtualNetworkGatewaysResetOperation> StartResetAsync(string resourceGroupName, string |
| | | 538 | | { |
| | 0 | 539 | | if (resourceGroupName == null) |
| | | 540 | | { |
| | 0 | 541 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 542 | | } |
| | 0 | 543 | | if (virtualNetworkGatewayName == null) |
| | | 544 | | { |
| | 0 | 545 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 546 | | } |
| | | 547 | | |
| | 0 | 548 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartReset"); |
| | 0 | 549 | | scope.Start(); |
| | | 550 | | try |
| | | 551 | | { |
| | 0 | 552 | | var originalResponse = await RestClient.ResetAsync(resourceGroupName, virtualNetworkGatewayName, gateway |
| | 0 | 553 | | return new VirtualNetworkGatewaysResetOperation(_clientDiagnostics, _pipeline, RestClient.CreateResetReq |
| | | 554 | | } |
| | 0 | 555 | | catch (Exception e) |
| | | 556 | | { |
| | 0 | 557 | | scope.Failed(e); |
| | 0 | 558 | | throw; |
| | | 559 | | } |
| | 0 | 560 | | } |
| | | 561 | | |
| | | 562 | | /// <summary> Resets the primary of the virtual network gateway in the specified resource group. </summary> |
| | | 563 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 564 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 565 | | /// <param name="gatewayVip"> Virtual network gateway vip address supplied to the begin reset of the active-acti |
| | | 566 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 567 | | public virtual VirtualNetworkGatewaysResetOperation StartReset(string resourceGroupName, string virtualNetworkGa |
| | | 568 | | { |
| | 0 | 569 | | if (resourceGroupName == null) |
| | | 570 | | { |
| | 0 | 571 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 572 | | } |
| | 0 | 573 | | if (virtualNetworkGatewayName == null) |
| | | 574 | | { |
| | 0 | 575 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 576 | | } |
| | | 577 | | |
| | 0 | 578 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartReset"); |
| | 0 | 579 | | scope.Start(); |
| | | 580 | | try |
| | | 581 | | { |
| | 0 | 582 | | var originalResponse = RestClient.Reset(resourceGroupName, virtualNetworkGatewayName, gatewayVip, cancel |
| | 0 | 583 | | return new VirtualNetworkGatewaysResetOperation(_clientDiagnostics, _pipeline, RestClient.CreateResetReq |
| | | 584 | | } |
| | 0 | 585 | | catch (Exception e) |
| | | 586 | | { |
| | 0 | 587 | | scope.Failed(e); |
| | 0 | 588 | | throw; |
| | | 589 | | } |
| | 0 | 590 | | } |
| | | 591 | | |
| | | 592 | | /// <summary> Resets the VPN client shared key of the virtual network gateway in the specified resource group. < |
| | | 593 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 594 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 595 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 596 | | public virtual async Task<VirtualNetworkGatewaysResetVpnClientSharedKeyOperation> StartResetVpnClientSharedKeyAs |
| | | 597 | | { |
| | 0 | 598 | | if (resourceGroupName == null) |
| | | 599 | | { |
| | 0 | 600 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 601 | | } |
| | 0 | 602 | | if (virtualNetworkGatewayName == null) |
| | | 603 | | { |
| | 0 | 604 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 605 | | } |
| | | 606 | | |
| | 0 | 607 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartResetVpnClientShared |
| | 0 | 608 | | scope.Start(); |
| | | 609 | | try |
| | | 610 | | { |
| | 0 | 611 | | var originalResponse = await RestClient.ResetVpnClientSharedKeyAsync(resourceGroupName, virtualNetworkGa |
| | 0 | 612 | | return new VirtualNetworkGatewaysResetVpnClientSharedKeyOperation(_clientDiagnostics, _pipeline, RestCli |
| | | 613 | | } |
| | 0 | 614 | | catch (Exception e) |
| | | 615 | | { |
| | 0 | 616 | | scope.Failed(e); |
| | 0 | 617 | | throw; |
| | | 618 | | } |
| | 0 | 619 | | } |
| | | 620 | | |
| | | 621 | | /// <summary> Resets the VPN client shared key of the virtual network gateway in the specified resource group. < |
| | | 622 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 623 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 624 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 625 | | public virtual VirtualNetworkGatewaysResetVpnClientSharedKeyOperation StartResetVpnClientSharedKey(string resour |
| | | 626 | | { |
| | 0 | 627 | | if (resourceGroupName == null) |
| | | 628 | | { |
| | 0 | 629 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 630 | | } |
| | 0 | 631 | | if (virtualNetworkGatewayName == null) |
| | | 632 | | { |
| | 0 | 633 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 634 | | } |
| | | 635 | | |
| | 0 | 636 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartResetVpnClientShared |
| | 0 | 637 | | scope.Start(); |
| | | 638 | | try |
| | | 639 | | { |
| | 0 | 640 | | var originalResponse = RestClient.ResetVpnClientSharedKey(resourceGroupName, virtualNetworkGatewayName, |
| | 0 | 641 | | return new VirtualNetworkGatewaysResetVpnClientSharedKeyOperation(_clientDiagnostics, _pipeline, RestCli |
| | | 642 | | } |
| | 0 | 643 | | catch (Exception e) |
| | | 644 | | { |
| | 0 | 645 | | scope.Failed(e); |
| | 0 | 646 | | throw; |
| | | 647 | | } |
| | 0 | 648 | | } |
| | | 649 | | |
| | | 650 | | /// <summary> Generates VPN client package for P2S client of the virtual network gateway in the specified resour |
| | | 651 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 652 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 653 | | /// <param name="parameters"> Parameters supplied to the generate virtual network gateway VPN client package ope |
| | | 654 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 655 | | public virtual async Task<VirtualNetworkGatewaysGeneratevpnclientpackageOperation> StartGeneratevpnclientpackage |
| | | 656 | | { |
| | 0 | 657 | | if (resourceGroupName == null) |
| | | 658 | | { |
| | 0 | 659 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 660 | | } |
| | 0 | 661 | | if (virtualNetworkGatewayName == null) |
| | | 662 | | { |
| | 0 | 663 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 664 | | } |
| | 0 | 665 | | if (parameters == null) |
| | | 666 | | { |
| | 0 | 667 | | throw new ArgumentNullException(nameof(parameters)); |
| | | 668 | | } |
| | | 669 | | |
| | 0 | 670 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartGeneratevpnclientpac |
| | 0 | 671 | | scope.Start(); |
| | | 672 | | try |
| | | 673 | | { |
| | 0 | 674 | | var originalResponse = await RestClient.GeneratevpnclientpackageAsync(resourceGroupName, virtualNetworkG |
| | 0 | 675 | | return new VirtualNetworkGatewaysGeneratevpnclientpackageOperation(_clientDiagnostics, _pipeline, RestCl |
| | | 676 | | } |
| | 0 | 677 | | catch (Exception e) |
| | | 678 | | { |
| | 0 | 679 | | scope.Failed(e); |
| | 0 | 680 | | throw; |
| | | 681 | | } |
| | 0 | 682 | | } |
| | | 683 | | |
| | | 684 | | /// <summary> Generates VPN client package for P2S client of the virtual network gateway in the specified resour |
| | | 685 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 686 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 687 | | /// <param name="parameters"> Parameters supplied to the generate virtual network gateway VPN client package ope |
| | | 688 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 689 | | public virtual VirtualNetworkGatewaysGeneratevpnclientpackageOperation StartGeneratevpnclientpackage(string reso |
| | | 690 | | { |
| | 0 | 691 | | if (resourceGroupName == null) |
| | | 692 | | { |
| | 0 | 693 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 694 | | } |
| | 0 | 695 | | if (virtualNetworkGatewayName == null) |
| | | 696 | | { |
| | 0 | 697 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 698 | | } |
| | 0 | 699 | | if (parameters == null) |
| | | 700 | | { |
| | 0 | 701 | | throw new ArgumentNullException(nameof(parameters)); |
| | | 702 | | } |
| | | 703 | | |
| | 0 | 704 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartGeneratevpnclientpac |
| | 0 | 705 | | scope.Start(); |
| | | 706 | | try |
| | | 707 | | { |
| | 0 | 708 | | var originalResponse = RestClient.Generatevpnclientpackage(resourceGroupName, virtualNetworkGatewayName, |
| | 0 | 709 | | return new VirtualNetworkGatewaysGeneratevpnclientpackageOperation(_clientDiagnostics, _pipeline, RestCl |
| | | 710 | | } |
| | 0 | 711 | | catch (Exception e) |
| | | 712 | | { |
| | 0 | 713 | | scope.Failed(e); |
| | 0 | 714 | | throw; |
| | | 715 | | } |
| | 0 | 716 | | } |
| | | 717 | | |
| | | 718 | | /// <summary> Generates VPN profile for P2S client of the virtual network gateway in the specified resource grou |
| | | 719 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 720 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 721 | | /// <param name="parameters"> Parameters supplied to the generate virtual network gateway VPN client package ope |
| | | 722 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 723 | | public virtual async Task<VirtualNetworkGatewaysGenerateVpnProfileOperation> StartGenerateVpnProfileAsync(string |
| | | 724 | | { |
| | 0 | 725 | | if (resourceGroupName == null) |
| | | 726 | | { |
| | 0 | 727 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 728 | | } |
| | 0 | 729 | | if (virtualNetworkGatewayName == null) |
| | | 730 | | { |
| | 0 | 731 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 732 | | } |
| | 0 | 733 | | if (parameters == null) |
| | | 734 | | { |
| | 0 | 735 | | throw new ArgumentNullException(nameof(parameters)); |
| | | 736 | | } |
| | | 737 | | |
| | 0 | 738 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartGenerateVpnProfile") |
| | 0 | 739 | | scope.Start(); |
| | | 740 | | try |
| | | 741 | | { |
| | 0 | 742 | | var originalResponse = await RestClient.GenerateVpnProfileAsync(resourceGroupName, virtualNetworkGateway |
| | 0 | 743 | | return new VirtualNetworkGatewaysGenerateVpnProfileOperation(_clientDiagnostics, _pipeline, RestClient.C |
| | | 744 | | } |
| | 0 | 745 | | catch (Exception e) |
| | | 746 | | { |
| | 0 | 747 | | scope.Failed(e); |
| | 0 | 748 | | throw; |
| | | 749 | | } |
| | 0 | 750 | | } |
| | | 751 | | |
| | | 752 | | /// <summary> Generates VPN profile for P2S client of the virtual network gateway in the specified resource grou |
| | | 753 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 754 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 755 | | /// <param name="parameters"> Parameters supplied to the generate virtual network gateway VPN client package ope |
| | | 756 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 757 | | public virtual VirtualNetworkGatewaysGenerateVpnProfileOperation StartGenerateVpnProfile(string resourceGroupNam |
| | | 758 | | { |
| | 0 | 759 | | if (resourceGroupName == null) |
| | | 760 | | { |
| | 0 | 761 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 762 | | } |
| | 0 | 763 | | if (virtualNetworkGatewayName == null) |
| | | 764 | | { |
| | 0 | 765 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 766 | | } |
| | 0 | 767 | | if (parameters == null) |
| | | 768 | | { |
| | 0 | 769 | | throw new ArgumentNullException(nameof(parameters)); |
| | | 770 | | } |
| | | 771 | | |
| | 0 | 772 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartGenerateVpnProfile") |
| | 0 | 773 | | scope.Start(); |
| | | 774 | | try |
| | | 775 | | { |
| | 0 | 776 | | var originalResponse = RestClient.GenerateVpnProfile(resourceGroupName, virtualNetworkGatewayName, param |
| | 0 | 777 | | return new VirtualNetworkGatewaysGenerateVpnProfileOperation(_clientDiagnostics, _pipeline, RestClient.C |
| | | 778 | | } |
| | 0 | 779 | | catch (Exception e) |
| | | 780 | | { |
| | 0 | 781 | | scope.Failed(e); |
| | 0 | 782 | | throw; |
| | | 783 | | } |
| | 0 | 784 | | } |
| | | 785 | | |
| | | 786 | | /// <summary> Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified reso |
| | | 787 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 788 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 789 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 790 | | public virtual async Task<VirtualNetworkGatewaysGetVpnProfilePackageUrlOperation> StartGetVpnProfilePackageUrlAs |
| | | 791 | | { |
| | 0 | 792 | | if (resourceGroupName == null) |
| | | 793 | | { |
| | 0 | 794 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 795 | | } |
| | 0 | 796 | | if (virtualNetworkGatewayName == null) |
| | | 797 | | { |
| | 0 | 798 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 799 | | } |
| | | 800 | | |
| | 0 | 801 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartGetVpnProfilePackage |
| | 0 | 802 | | scope.Start(); |
| | | 803 | | try |
| | | 804 | | { |
| | 0 | 805 | | var originalResponse = await RestClient.GetVpnProfilePackageUrlAsync(resourceGroupName, virtualNetworkGa |
| | 0 | 806 | | return new VirtualNetworkGatewaysGetVpnProfilePackageUrlOperation(_clientDiagnostics, _pipeline, RestCli |
| | | 807 | | } |
| | 0 | 808 | | catch (Exception e) |
| | | 809 | | { |
| | 0 | 810 | | scope.Failed(e); |
| | 0 | 811 | | throw; |
| | | 812 | | } |
| | 0 | 813 | | } |
| | | 814 | | |
| | | 815 | | /// <summary> Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified reso |
| | | 816 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 817 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 818 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 819 | | public virtual VirtualNetworkGatewaysGetVpnProfilePackageUrlOperation StartGetVpnProfilePackageUrl(string resour |
| | | 820 | | { |
| | 0 | 821 | | if (resourceGroupName == null) |
| | | 822 | | { |
| | 0 | 823 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 824 | | } |
| | 0 | 825 | | if (virtualNetworkGatewayName == null) |
| | | 826 | | { |
| | 0 | 827 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 828 | | } |
| | | 829 | | |
| | 0 | 830 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartGetVpnProfilePackage |
| | 0 | 831 | | scope.Start(); |
| | | 832 | | try |
| | | 833 | | { |
| | 0 | 834 | | var originalResponse = RestClient.GetVpnProfilePackageUrl(resourceGroupName, virtualNetworkGatewayName, |
| | 0 | 835 | | return new VirtualNetworkGatewaysGetVpnProfilePackageUrlOperation(_clientDiagnostics, _pipeline, RestCli |
| | | 836 | | } |
| | 0 | 837 | | catch (Exception e) |
| | | 838 | | { |
| | 0 | 839 | | scope.Failed(e); |
| | 0 | 840 | | throw; |
| | | 841 | | } |
| | 0 | 842 | | } |
| | | 843 | | |
| | | 844 | | /// <summary> The GetBgpPeerStatus operation retrieves the status of all BGP peers. </summary> |
| | | 845 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 846 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 847 | | /// <param name="peer"> The IP address of the peer to retrieve the status of. </param> |
| | | 848 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 849 | | public virtual async Task<VirtualNetworkGatewaysGetBgpPeerStatusOperation> StartGetBgpPeerStatusAsync(string res |
| | | 850 | | { |
| | 0 | 851 | | if (resourceGroupName == null) |
| | | 852 | | { |
| | 0 | 853 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 854 | | } |
| | 0 | 855 | | if (virtualNetworkGatewayName == null) |
| | | 856 | | { |
| | 0 | 857 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 858 | | } |
| | | 859 | | |
| | 0 | 860 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartGetBgpPeerStatus"); |
| | 0 | 861 | | scope.Start(); |
| | | 862 | | try |
| | | 863 | | { |
| | 0 | 864 | | var originalResponse = await RestClient.GetBgpPeerStatusAsync(resourceGroupName, virtualNetworkGatewayNa |
| | 0 | 865 | | return new VirtualNetworkGatewaysGetBgpPeerStatusOperation(_clientDiagnostics, _pipeline, RestClient.Cre |
| | | 866 | | } |
| | 0 | 867 | | catch (Exception e) |
| | | 868 | | { |
| | 0 | 869 | | scope.Failed(e); |
| | 0 | 870 | | throw; |
| | | 871 | | } |
| | 0 | 872 | | } |
| | | 873 | | |
| | | 874 | | /// <summary> The GetBgpPeerStatus operation retrieves the status of all BGP peers. </summary> |
| | | 875 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 876 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 877 | | /// <param name="peer"> The IP address of the peer to retrieve the status of. </param> |
| | | 878 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 879 | | public virtual VirtualNetworkGatewaysGetBgpPeerStatusOperation StartGetBgpPeerStatus(string resourceGroupName, s |
| | | 880 | | { |
| | 0 | 881 | | if (resourceGroupName == null) |
| | | 882 | | { |
| | 0 | 883 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 884 | | } |
| | 0 | 885 | | if (virtualNetworkGatewayName == null) |
| | | 886 | | { |
| | 0 | 887 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 888 | | } |
| | | 889 | | |
| | 0 | 890 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartGetBgpPeerStatus"); |
| | 0 | 891 | | scope.Start(); |
| | | 892 | | try |
| | | 893 | | { |
| | 0 | 894 | | var originalResponse = RestClient.GetBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, peer, c |
| | 0 | 895 | | return new VirtualNetworkGatewaysGetBgpPeerStatusOperation(_clientDiagnostics, _pipeline, RestClient.Cre |
| | | 896 | | } |
| | 0 | 897 | | catch (Exception e) |
| | | 898 | | { |
| | 0 | 899 | | scope.Failed(e); |
| | 0 | 900 | | throw; |
| | | 901 | | } |
| | 0 | 902 | | } |
| | | 903 | | |
| | | 904 | | /// <summary> This operation retrieves a list of routes the virtual network gateway has learned, including route |
| | | 905 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 906 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 907 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 908 | | public virtual async Task<VirtualNetworkGatewaysGetLearnedRoutesOperation> StartGetLearnedRoutesAsync(string res |
| | | 909 | | { |
| | 0 | 910 | | if (resourceGroupName == null) |
| | | 911 | | { |
| | 0 | 912 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 913 | | } |
| | 0 | 914 | | if (virtualNetworkGatewayName == null) |
| | | 915 | | { |
| | 0 | 916 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 917 | | } |
| | | 918 | | |
| | 0 | 919 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartGetLearnedRoutes"); |
| | 0 | 920 | | scope.Start(); |
| | | 921 | | try |
| | | 922 | | { |
| | 0 | 923 | | var originalResponse = await RestClient.GetLearnedRoutesAsync(resourceGroupName, virtualNetworkGatewayNa |
| | 0 | 924 | | return new VirtualNetworkGatewaysGetLearnedRoutesOperation(_clientDiagnostics, _pipeline, RestClient.Cre |
| | | 925 | | } |
| | 0 | 926 | | catch (Exception e) |
| | | 927 | | { |
| | 0 | 928 | | scope.Failed(e); |
| | 0 | 929 | | throw; |
| | | 930 | | } |
| | 0 | 931 | | } |
| | | 932 | | |
| | | 933 | | /// <summary> This operation retrieves a list of routes the virtual network gateway has learned, including route |
| | | 934 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 935 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 936 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 937 | | public virtual VirtualNetworkGatewaysGetLearnedRoutesOperation StartGetLearnedRoutes(string resourceGroupName, s |
| | | 938 | | { |
| | 0 | 939 | | if (resourceGroupName == null) |
| | | 940 | | { |
| | 0 | 941 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 942 | | } |
| | 0 | 943 | | if (virtualNetworkGatewayName == null) |
| | | 944 | | { |
| | 0 | 945 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 946 | | } |
| | | 947 | | |
| | 0 | 948 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartGetLearnedRoutes"); |
| | 0 | 949 | | scope.Start(); |
| | | 950 | | try |
| | | 951 | | { |
| | 0 | 952 | | var originalResponse = RestClient.GetLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, cancell |
| | 0 | 953 | | return new VirtualNetworkGatewaysGetLearnedRoutesOperation(_clientDiagnostics, _pipeline, RestClient.Cre |
| | | 954 | | } |
| | 0 | 955 | | catch (Exception e) |
| | | 956 | | { |
| | 0 | 957 | | scope.Failed(e); |
| | 0 | 958 | | throw; |
| | | 959 | | } |
| | 0 | 960 | | } |
| | | 961 | | |
| | | 962 | | /// <summary> This operation retrieves a list of routes the virtual network gateway is advertising to the specif |
| | | 963 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 964 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 965 | | /// <param name="peer"> The IP address of the peer. </param> |
| | | 966 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 967 | | public virtual async Task<VirtualNetworkGatewaysGetAdvertisedRoutesOperation> StartGetAdvertisedRoutesAsync(stri |
| | | 968 | | { |
| | 0 | 969 | | if (resourceGroupName == null) |
| | | 970 | | { |
| | 0 | 971 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 972 | | } |
| | 0 | 973 | | if (virtualNetworkGatewayName == null) |
| | | 974 | | { |
| | 0 | 975 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 976 | | } |
| | 0 | 977 | | if (peer == null) |
| | | 978 | | { |
| | 0 | 979 | | throw new ArgumentNullException(nameof(peer)); |
| | | 980 | | } |
| | | 981 | | |
| | 0 | 982 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartGetAdvertisedRoutes" |
| | 0 | 983 | | scope.Start(); |
| | | 984 | | try |
| | | 985 | | { |
| | 0 | 986 | | var originalResponse = await RestClient.GetAdvertisedRoutesAsync(resourceGroupName, virtualNetworkGatewa |
| | 0 | 987 | | return new VirtualNetworkGatewaysGetAdvertisedRoutesOperation(_clientDiagnostics, _pipeline, RestClient. |
| | | 988 | | } |
| | 0 | 989 | | catch (Exception e) |
| | | 990 | | { |
| | 0 | 991 | | scope.Failed(e); |
| | 0 | 992 | | throw; |
| | | 993 | | } |
| | 0 | 994 | | } |
| | | 995 | | |
| | | 996 | | /// <summary> This operation retrieves a list of routes the virtual network gateway is advertising to the specif |
| | | 997 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 998 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 999 | | /// <param name="peer"> The IP address of the peer. </param> |
| | | 1000 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 1001 | | public virtual VirtualNetworkGatewaysGetAdvertisedRoutesOperation StartGetAdvertisedRoutes(string resourceGroupN |
| | | 1002 | | { |
| | 0 | 1003 | | if (resourceGroupName == null) |
| | | 1004 | | { |
| | 0 | 1005 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 1006 | | } |
| | 0 | 1007 | | if (virtualNetworkGatewayName == null) |
| | | 1008 | | { |
| | 0 | 1009 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 1010 | | } |
| | 0 | 1011 | | if (peer == null) |
| | | 1012 | | { |
| | 0 | 1013 | | throw new ArgumentNullException(nameof(peer)); |
| | | 1014 | | } |
| | | 1015 | | |
| | 0 | 1016 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartGetAdvertisedRoutes" |
| | 0 | 1017 | | scope.Start(); |
| | | 1018 | | try |
| | | 1019 | | { |
| | 0 | 1020 | | var originalResponse = RestClient.GetAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, peer |
| | 0 | 1021 | | return new VirtualNetworkGatewaysGetAdvertisedRoutesOperation(_clientDiagnostics, _pipeline, RestClient. |
| | | 1022 | | } |
| | 0 | 1023 | | catch (Exception e) |
| | | 1024 | | { |
| | 0 | 1025 | | scope.Failed(e); |
| | 0 | 1026 | | throw; |
| | | 1027 | | } |
| | 0 | 1028 | | } |
| | | 1029 | | |
| | | 1030 | | /// <summary> The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtu |
| | | 1031 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 1032 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 1033 | | /// <param name="vpnclientIpsecParams"> Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtu |
| | | 1034 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 1035 | | public virtual async Task<VirtualNetworkGatewaysSetVpnclientIpsecParametersOperation> StartSetVpnclientIpsecPara |
| | | 1036 | | { |
| | 0 | 1037 | | if (resourceGroupName == null) |
| | | 1038 | | { |
| | 0 | 1039 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 1040 | | } |
| | 0 | 1041 | | if (virtualNetworkGatewayName == null) |
| | | 1042 | | { |
| | 0 | 1043 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 1044 | | } |
| | 0 | 1045 | | if (vpnclientIpsecParams == null) |
| | | 1046 | | { |
| | 0 | 1047 | | throw new ArgumentNullException(nameof(vpnclientIpsecParams)); |
| | | 1048 | | } |
| | | 1049 | | |
| | 0 | 1050 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartSetVpnclientIpsecPar |
| | 0 | 1051 | | scope.Start(); |
| | | 1052 | | try |
| | | 1053 | | { |
| | 0 | 1054 | | var originalResponse = await RestClient.SetVpnclientIpsecParametersAsync(resourceGroupName, virtualNetwo |
| | 0 | 1055 | | return new VirtualNetworkGatewaysSetVpnclientIpsecParametersOperation(_clientDiagnostics, _pipeline, Res |
| | | 1056 | | } |
| | 0 | 1057 | | catch (Exception e) |
| | | 1058 | | { |
| | 0 | 1059 | | scope.Failed(e); |
| | 0 | 1060 | | throw; |
| | | 1061 | | } |
| | 0 | 1062 | | } |
| | | 1063 | | |
| | | 1064 | | /// <summary> The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtu |
| | | 1065 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 1066 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 1067 | | /// <param name="vpnclientIpsecParams"> Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtu |
| | | 1068 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 1069 | | public virtual VirtualNetworkGatewaysSetVpnclientIpsecParametersOperation StartSetVpnclientIpsecParameters(strin |
| | | 1070 | | { |
| | 0 | 1071 | | if (resourceGroupName == null) |
| | | 1072 | | { |
| | 0 | 1073 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 1074 | | } |
| | 0 | 1075 | | if (virtualNetworkGatewayName == null) |
| | | 1076 | | { |
| | 0 | 1077 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 1078 | | } |
| | 0 | 1079 | | if (vpnclientIpsecParams == null) |
| | | 1080 | | { |
| | 0 | 1081 | | throw new ArgumentNullException(nameof(vpnclientIpsecParams)); |
| | | 1082 | | } |
| | | 1083 | | |
| | 0 | 1084 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartSetVpnclientIpsecPar |
| | 0 | 1085 | | scope.Start(); |
| | | 1086 | | try |
| | | 1087 | | { |
| | 0 | 1088 | | var originalResponse = RestClient.SetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayNa |
| | 0 | 1089 | | return new VirtualNetworkGatewaysSetVpnclientIpsecParametersOperation(_clientDiagnostics, _pipeline, Res |
| | | 1090 | | } |
| | 0 | 1091 | | catch (Exception e) |
| | | 1092 | | { |
| | 0 | 1093 | | scope.Failed(e); |
| | 0 | 1094 | | throw; |
| | | 1095 | | } |
| | 0 | 1096 | | } |
| | | 1097 | | |
| | | 1098 | | /// <summary> The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy |
| | | 1099 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 1100 | | /// <param name="virtualNetworkGatewayName"> The virtual network gateway name. </param> |
| | | 1101 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 1102 | | public virtual async Task<VirtualNetworkGatewaysGetVpnclientIpsecParametersOperation> StartGetVpnclientIpsecPara |
| | | 1103 | | { |
| | 0 | 1104 | | if (resourceGroupName == null) |
| | | 1105 | | { |
| | 0 | 1106 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 1107 | | } |
| | 0 | 1108 | | if (virtualNetworkGatewayName == null) |
| | | 1109 | | { |
| | 0 | 1110 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 1111 | | } |
| | | 1112 | | |
| | 0 | 1113 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartGetVpnclientIpsecPar |
| | 0 | 1114 | | scope.Start(); |
| | | 1115 | | try |
| | | 1116 | | { |
| | 0 | 1117 | | var originalResponse = await RestClient.GetVpnclientIpsecParametersAsync(resourceGroupName, virtualNetwo |
| | 0 | 1118 | | return new VirtualNetworkGatewaysGetVpnclientIpsecParametersOperation(_clientDiagnostics, _pipeline, Res |
| | | 1119 | | } |
| | 0 | 1120 | | catch (Exception e) |
| | | 1121 | | { |
| | 0 | 1122 | | scope.Failed(e); |
| | 0 | 1123 | | throw; |
| | | 1124 | | } |
| | 0 | 1125 | | } |
| | | 1126 | | |
| | | 1127 | | /// <summary> The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy |
| | | 1128 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 1129 | | /// <param name="virtualNetworkGatewayName"> The virtual network gateway name. </param> |
| | | 1130 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 1131 | | public virtual VirtualNetworkGatewaysGetVpnclientIpsecParametersOperation StartGetVpnclientIpsecParameters(strin |
| | | 1132 | | { |
| | 0 | 1133 | | if (resourceGroupName == null) |
| | | 1134 | | { |
| | 0 | 1135 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 1136 | | } |
| | 0 | 1137 | | if (virtualNetworkGatewayName == null) |
| | | 1138 | | { |
| | 0 | 1139 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 1140 | | } |
| | | 1141 | | |
| | 0 | 1142 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartGetVpnclientIpsecPar |
| | 0 | 1143 | | scope.Start(); |
| | | 1144 | | try |
| | | 1145 | | { |
| | 0 | 1146 | | var originalResponse = RestClient.GetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayNa |
| | 0 | 1147 | | return new VirtualNetworkGatewaysGetVpnclientIpsecParametersOperation(_clientDiagnostics, _pipeline, Res |
| | | 1148 | | } |
| | 0 | 1149 | | catch (Exception e) |
| | | 1150 | | { |
| | 0 | 1151 | | scope.Failed(e); |
| | 0 | 1152 | | throw; |
| | | 1153 | | } |
| | 0 | 1154 | | } |
| | | 1155 | | |
| | | 1156 | | /// <summary> Starts packet capture on virtual network gateway in the specified resource group. </summary> |
| | | 1157 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 1158 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 1159 | | /// <param name="parameters"> Virtual network gateway packet capture parameters supplied to start packet capture |
| | | 1160 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 1161 | | public virtual async Task<VirtualNetworkGatewaysStartPacketCaptureOperation> StartStartPacketCaptureAsync(string |
| | | 1162 | | { |
| | 0 | 1163 | | if (resourceGroupName == null) |
| | | 1164 | | { |
| | 0 | 1165 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 1166 | | } |
| | 0 | 1167 | | if (virtualNetworkGatewayName == null) |
| | | 1168 | | { |
| | 0 | 1169 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 1170 | | } |
| | | 1171 | | |
| | 0 | 1172 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartStartPacketCapture") |
| | 0 | 1173 | | scope.Start(); |
| | | 1174 | | try |
| | | 1175 | | { |
| | 0 | 1176 | | var originalResponse = await RestClient.StartPacketCaptureAsync(resourceGroupName, virtualNetworkGateway |
| | 0 | 1177 | | return new VirtualNetworkGatewaysStartPacketCaptureOperation(_clientDiagnostics, _pipeline, RestClient.C |
| | | 1178 | | } |
| | 0 | 1179 | | catch (Exception e) |
| | | 1180 | | { |
| | 0 | 1181 | | scope.Failed(e); |
| | 0 | 1182 | | throw; |
| | | 1183 | | } |
| | 0 | 1184 | | } |
| | | 1185 | | |
| | | 1186 | | /// <summary> Starts packet capture on virtual network gateway in the specified resource group. </summary> |
| | | 1187 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 1188 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 1189 | | /// <param name="parameters"> Virtual network gateway packet capture parameters supplied to start packet capture |
| | | 1190 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 1191 | | public virtual VirtualNetworkGatewaysStartPacketCaptureOperation StartStartPacketCapture(string resourceGroupNam |
| | | 1192 | | { |
| | 0 | 1193 | | if (resourceGroupName == null) |
| | | 1194 | | { |
| | 0 | 1195 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 1196 | | } |
| | 0 | 1197 | | if (virtualNetworkGatewayName == null) |
| | | 1198 | | { |
| | 0 | 1199 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 1200 | | } |
| | | 1201 | | |
| | 0 | 1202 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartStartPacketCapture") |
| | 0 | 1203 | | scope.Start(); |
| | | 1204 | | try |
| | | 1205 | | { |
| | 0 | 1206 | | var originalResponse = RestClient.StartPacketCapture(resourceGroupName, virtualNetworkGatewayName, param |
| | 0 | 1207 | | return new VirtualNetworkGatewaysStartPacketCaptureOperation(_clientDiagnostics, _pipeline, RestClient.C |
| | | 1208 | | } |
| | 0 | 1209 | | catch (Exception e) |
| | | 1210 | | { |
| | 0 | 1211 | | scope.Failed(e); |
| | 0 | 1212 | | throw; |
| | | 1213 | | } |
| | 0 | 1214 | | } |
| | | 1215 | | |
| | | 1216 | | /// <summary> Stops packet capture on virtual network gateway in the specified resource group. </summary> |
| | | 1217 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 1218 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 1219 | | /// <param name="parameters"> Virtual network gateway packet capture parameters supplied to stop packet capture |
| | | 1220 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 1221 | | public virtual async Task<VirtualNetworkGatewaysStopPacketCaptureOperation> StartStopPacketCaptureAsync(string r |
| | | 1222 | | { |
| | 0 | 1223 | | if (resourceGroupName == null) |
| | | 1224 | | { |
| | 0 | 1225 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 1226 | | } |
| | 0 | 1227 | | if (virtualNetworkGatewayName == null) |
| | | 1228 | | { |
| | 0 | 1229 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 1230 | | } |
| | 0 | 1231 | | if (parameters == null) |
| | | 1232 | | { |
| | 0 | 1233 | | throw new ArgumentNullException(nameof(parameters)); |
| | | 1234 | | } |
| | | 1235 | | |
| | 0 | 1236 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartStopPacketCapture"); |
| | 0 | 1237 | | scope.Start(); |
| | | 1238 | | try |
| | | 1239 | | { |
| | 0 | 1240 | | var originalResponse = await RestClient.StopPacketCaptureAsync(resourceGroupName, virtualNetworkGatewayN |
| | 0 | 1241 | | return new VirtualNetworkGatewaysStopPacketCaptureOperation(_clientDiagnostics, _pipeline, RestClient.Cr |
| | | 1242 | | } |
| | 0 | 1243 | | catch (Exception e) |
| | | 1244 | | { |
| | 0 | 1245 | | scope.Failed(e); |
| | 0 | 1246 | | throw; |
| | | 1247 | | } |
| | 0 | 1248 | | } |
| | | 1249 | | |
| | | 1250 | | /// <summary> Stops packet capture on virtual network gateway in the specified resource group. </summary> |
| | | 1251 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 1252 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 1253 | | /// <param name="parameters"> Virtual network gateway packet capture parameters supplied to stop packet capture |
| | | 1254 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 1255 | | public virtual VirtualNetworkGatewaysStopPacketCaptureOperation StartStopPacketCapture(string resourceGroupName, |
| | | 1256 | | { |
| | 0 | 1257 | | if (resourceGroupName == null) |
| | | 1258 | | { |
| | 0 | 1259 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 1260 | | } |
| | 0 | 1261 | | if (virtualNetworkGatewayName == null) |
| | | 1262 | | { |
| | 0 | 1263 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 1264 | | } |
| | 0 | 1265 | | if (parameters == null) |
| | | 1266 | | { |
| | 0 | 1267 | | throw new ArgumentNullException(nameof(parameters)); |
| | | 1268 | | } |
| | | 1269 | | |
| | 0 | 1270 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartStopPacketCapture"); |
| | 0 | 1271 | | scope.Start(); |
| | | 1272 | | try |
| | | 1273 | | { |
| | 0 | 1274 | | var originalResponse = RestClient.StopPacketCapture(resourceGroupName, virtualNetworkGatewayName, parame |
| | 0 | 1275 | | return new VirtualNetworkGatewaysStopPacketCaptureOperation(_clientDiagnostics, _pipeline, RestClient.Cr |
| | | 1276 | | } |
| | 0 | 1277 | | catch (Exception e) |
| | | 1278 | | { |
| | 0 | 1279 | | scope.Failed(e); |
| | 0 | 1280 | | throw; |
| | | 1281 | | } |
| | 0 | 1282 | | } |
| | | 1283 | | |
| | | 1284 | | /// <summary> Get VPN client connection health detail per P2S client connection of the virtual network gateway i |
| | | 1285 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 1286 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 1287 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 1288 | | public virtual async Task<VirtualNetworkGatewaysGetVpnclientConnectionHealthOperation> StartGetVpnclientConnecti |
| | | 1289 | | { |
| | 0 | 1290 | | if (resourceGroupName == null) |
| | | 1291 | | { |
| | 0 | 1292 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 1293 | | } |
| | 0 | 1294 | | if (virtualNetworkGatewayName == null) |
| | | 1295 | | { |
| | 0 | 1296 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 1297 | | } |
| | | 1298 | | |
| | 0 | 1299 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartGetVpnclientConnecti |
| | 0 | 1300 | | scope.Start(); |
| | | 1301 | | try |
| | | 1302 | | { |
| | 0 | 1303 | | var originalResponse = await RestClient.GetVpnclientConnectionHealthAsync(resourceGroupName, virtualNetw |
| | 0 | 1304 | | return new VirtualNetworkGatewaysGetVpnclientConnectionHealthOperation(_clientDiagnostics, _pipeline, Re |
| | | 1305 | | } |
| | 0 | 1306 | | catch (Exception e) |
| | | 1307 | | { |
| | 0 | 1308 | | scope.Failed(e); |
| | 0 | 1309 | | throw; |
| | | 1310 | | } |
| | 0 | 1311 | | } |
| | | 1312 | | |
| | | 1313 | | /// <summary> Get VPN client connection health detail per P2S client connection of the virtual network gateway i |
| | | 1314 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 1315 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 1316 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 1317 | | public virtual VirtualNetworkGatewaysGetVpnclientConnectionHealthOperation StartGetVpnclientConnectionHealth(str |
| | | 1318 | | { |
| | 0 | 1319 | | if (resourceGroupName == null) |
| | | 1320 | | { |
| | 0 | 1321 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 1322 | | } |
| | 0 | 1323 | | if (virtualNetworkGatewayName == null) |
| | | 1324 | | { |
| | 0 | 1325 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 1326 | | } |
| | | 1327 | | |
| | 0 | 1328 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartGetVpnclientConnecti |
| | 0 | 1329 | | scope.Start(); |
| | | 1330 | | try |
| | | 1331 | | { |
| | 0 | 1332 | | var originalResponse = RestClient.GetVpnclientConnectionHealth(resourceGroupName, virtualNetworkGatewayN |
| | 0 | 1333 | | return new VirtualNetworkGatewaysGetVpnclientConnectionHealthOperation(_clientDiagnostics, _pipeline, Re |
| | | 1334 | | } |
| | 0 | 1335 | | catch (Exception e) |
| | | 1336 | | { |
| | 0 | 1337 | | scope.Failed(e); |
| | 0 | 1338 | | throw; |
| | | 1339 | | } |
| | 0 | 1340 | | } |
| | | 1341 | | |
| | | 1342 | | /// <summary> Disconnect vpn connections of virtual network gateway in the specified resource group. </summary> |
| | | 1343 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 1344 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 1345 | | /// <param name="request"> The parameters are supplied to disconnect vpn connections. </param> |
| | | 1346 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 1347 | | public virtual async Task<VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOperation> StartDis |
| | | 1348 | | { |
| | 0 | 1349 | | if (resourceGroupName == null) |
| | | 1350 | | { |
| | 0 | 1351 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 1352 | | } |
| | 0 | 1353 | | if (virtualNetworkGatewayName == null) |
| | | 1354 | | { |
| | 0 | 1355 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 1356 | | } |
| | 0 | 1357 | | if (request == null) |
| | | 1358 | | { |
| | 0 | 1359 | | throw new ArgumentNullException(nameof(request)); |
| | | 1360 | | } |
| | | 1361 | | |
| | 0 | 1362 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartDisconnectVirtualNet |
| | 0 | 1363 | | scope.Start(); |
| | | 1364 | | try |
| | | 1365 | | { |
| | 0 | 1366 | | var originalResponse = await RestClient.DisconnectVirtualNetworkGatewayVpnConnectionsAsync(resourceGroup |
| | 0 | 1367 | | return new VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOperation(_clientDiagnosti |
| | | 1368 | | } |
| | 0 | 1369 | | catch (Exception e) |
| | | 1370 | | { |
| | 0 | 1371 | | scope.Failed(e); |
| | 0 | 1372 | | throw; |
| | | 1373 | | } |
| | 0 | 1374 | | } |
| | | 1375 | | |
| | | 1376 | | /// <summary> Disconnect vpn connections of virtual network gateway in the specified resource group. </summary> |
| | | 1377 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 1378 | | /// <param name="virtualNetworkGatewayName"> The name of the virtual network gateway. </param> |
| | | 1379 | | /// <param name="request"> The parameters are supplied to disconnect vpn connections. </param> |
| | | 1380 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 1381 | | public virtual VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOperation StartDisconnectVirtu |
| | | 1382 | | { |
| | 0 | 1383 | | if (resourceGroupName == null) |
| | | 1384 | | { |
| | 0 | 1385 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 1386 | | } |
| | 0 | 1387 | | if (virtualNetworkGatewayName == null) |
| | | 1388 | | { |
| | 0 | 1389 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayName)); |
| | | 1390 | | } |
| | 0 | 1391 | | if (request == null) |
| | | 1392 | | { |
| | 0 | 1393 | | throw new ArgumentNullException(nameof(request)); |
| | | 1394 | | } |
| | | 1395 | | |
| | 0 | 1396 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewaysOperations.StartDisconnectVirtualNet |
| | 0 | 1397 | | scope.Start(); |
| | | 1398 | | try |
| | | 1399 | | { |
| | 0 | 1400 | | var originalResponse = RestClient.DisconnectVirtualNetworkGatewayVpnConnections(resourceGroupName, virtu |
| | 0 | 1401 | | return new VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOperation(_clientDiagnosti |
| | | 1402 | | } |
| | 0 | 1403 | | catch (Exception e) |
| | | 1404 | | { |
| | 0 | 1405 | | scope.Failed(e); |
| | 0 | 1406 | | throw; |
| | | 1407 | | } |
| | 0 | 1408 | | } |
| | | 1409 | | } |
| | | 1410 | | } |