| | 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 VirtualNetworkGatewayConnections service client. </summary> |
| | 19 | | public partial class VirtualNetworkGatewayConnectionsOperations |
| | 20 | | { |
| | 21 | | private readonly ClientDiagnostics _clientDiagnostics; |
| | 22 | | private readonly HttpPipeline _pipeline; |
| 120 | 23 | | internal VirtualNetworkGatewayConnectionsRestOperations RestClient { get; } |
| | 24 | | /// <summary> Initializes a new instance of VirtualNetworkGatewayConnectionsOperations for mocking. </summary> |
| 84 | 25 | | protected VirtualNetworkGatewayConnectionsOperations() |
| | 26 | | { |
| 84 | 27 | | } |
| | 28 | | /// <summary> Initializes a new instance of VirtualNetworkGatewayConnectionsOperations. </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> |
| 84 | 33 | | internal VirtualNetworkGatewayConnectionsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, |
| | 34 | | { |
| 84 | 35 | | RestClient = new VirtualNetworkGatewayConnectionsRestOperations(clientDiagnostics, pipeline, subscriptionId, |
| 84 | 36 | | _clientDiagnostics = clientDiagnostics; |
| 84 | 37 | | _pipeline = pipeline; |
| 84 | 38 | | } |
| | 39 | |
|
| | 40 | | /// <summary> Gets the specified virtual network gateway connection by resource group. </summary> |
| | 41 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 42 | | /// <param name="virtualNetworkGatewayConnectionName"> The name of the virtual network gateway connection. </par |
| | 43 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 44 | | public virtual async Task<Response<VirtualNetworkGatewayConnection>> GetAsync(string resourceGroupName, string v |
| | 45 | | { |
| 12 | 46 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.Get"); |
| 12 | 47 | | scope.Start(); |
| | 48 | | try |
| | 49 | | { |
| 12 | 50 | | return await RestClient.GetAsync(resourceGroupName, virtualNetworkGatewayConnectionName, cancellationTok |
| | 51 | | } |
| 0 | 52 | | catch (Exception e) |
| | 53 | | { |
| 0 | 54 | | scope.Failed(e); |
| 0 | 55 | | throw; |
| | 56 | | } |
| 12 | 57 | | } |
| | 58 | |
|
| | 59 | | /// <summary> Gets the specified virtual network gateway connection by resource group. </summary> |
| | 60 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 61 | | /// <param name="virtualNetworkGatewayConnectionName"> The name of the virtual network gateway connection. </par |
| | 62 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 63 | | public virtual Response<VirtualNetworkGatewayConnection> Get(string resourceGroupName, string virtualNetworkGate |
| | 64 | | { |
| 12 | 65 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.Get"); |
| 12 | 66 | | scope.Start(); |
| | 67 | | try |
| | 68 | | { |
| 12 | 69 | | return RestClient.Get(resourceGroupName, virtualNetworkGatewayConnectionName, cancellationToken); |
| | 70 | | } |
| 0 | 71 | | catch (Exception e) |
| | 72 | | { |
| 0 | 73 | | scope.Failed(e); |
| 0 | 74 | | throw; |
| | 75 | | } |
| 12 | 76 | | } |
| | 77 | |
|
| | 78 | | /// <summary> The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specifi |
| | 79 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 80 | | /// <param name="virtualNetworkGatewayConnectionName"> The virtual network gateway connection shared key name. < |
| | 81 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 82 | | public virtual async Task<Response<ConnectionSharedKey>> GetSharedKeyAsync(string resourceGroupName, string virt |
| | 83 | | { |
| 0 | 84 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.GetSharedKey"); |
| 0 | 85 | | scope.Start(); |
| | 86 | | try |
| | 87 | | { |
| 0 | 88 | | return await RestClient.GetSharedKeyAsync(resourceGroupName, virtualNetworkGatewayConnectionName, cancel |
| | 89 | | } |
| 0 | 90 | | catch (Exception e) |
| | 91 | | { |
| 0 | 92 | | scope.Failed(e); |
| 0 | 93 | | throw; |
| | 94 | | } |
| 0 | 95 | | } |
| | 96 | |
|
| | 97 | | /// <summary> The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specifi |
| | 98 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 99 | | /// <param name="virtualNetworkGatewayConnectionName"> The virtual network gateway connection shared key name. < |
| | 100 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 101 | | public virtual Response<ConnectionSharedKey> GetSharedKey(string resourceGroupName, string virtualNetworkGateway |
| | 102 | | { |
| 0 | 103 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.GetSharedKey"); |
| 0 | 104 | | scope.Start(); |
| | 105 | | try |
| | 106 | | { |
| 0 | 107 | | return RestClient.GetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, cancellationToken |
| | 108 | | } |
| 0 | 109 | | catch (Exception e) |
| | 110 | | { |
| 0 | 111 | | scope.Failed(e); |
| 0 | 112 | | throw; |
| | 113 | | } |
| 0 | 114 | | } |
| | 115 | |
|
| | 116 | | /// <summary> The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways con |
| | 117 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 118 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 119 | | public virtual AsyncPageable<VirtualNetworkGatewayConnection> ListAsync(string resourceGroupName, CancellationTo |
| | 120 | | { |
| 12 | 121 | | if (resourceGroupName == null) |
| | 122 | | { |
| 0 | 123 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 124 | | } |
| | 125 | |
|
| | 126 | | async Task<Page<VirtualNetworkGatewayConnection>> FirstPageFunc(int? pageSizeHint) |
| | 127 | | { |
| 12 | 128 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.List"); |
| 12 | 129 | | scope.Start(); |
| | 130 | | try |
| | 131 | | { |
| 12 | 132 | | var response = await RestClient.ListAsync(resourceGroupName, cancellationToken).ConfigureAwait(false |
| 12 | 133 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 134 | | } |
| 0 | 135 | | catch (Exception e) |
| | 136 | | { |
| 0 | 137 | | scope.Failed(e); |
| 0 | 138 | | throw; |
| | 139 | | } |
| 12 | 140 | | } |
| | 141 | | async Task<Page<VirtualNetworkGatewayConnection>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 142 | | { |
| 0 | 143 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.List"); |
| 0 | 144 | | scope.Start(); |
| | 145 | | try |
| | 146 | | { |
| 0 | 147 | | var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, cancellationToken).Co |
| 0 | 148 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 149 | | } |
| 0 | 150 | | catch (Exception e) |
| | 151 | | { |
| 0 | 152 | | scope.Failed(e); |
| 0 | 153 | | throw; |
| | 154 | | } |
| 0 | 155 | | } |
| 12 | 156 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 157 | | } |
| | 158 | |
|
| | 159 | | /// <summary> The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways con |
| | 160 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 161 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 162 | | public virtual Pageable<VirtualNetworkGatewayConnection> List(string resourceGroupName, CancellationToken cancel |
| | 163 | | { |
| 12 | 164 | | if (resourceGroupName == null) |
| | 165 | | { |
| 0 | 166 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 167 | | } |
| | 168 | |
|
| | 169 | | Page<VirtualNetworkGatewayConnection> FirstPageFunc(int? pageSizeHint) |
| | 170 | | { |
| 12 | 171 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.List"); |
| 12 | 172 | | scope.Start(); |
| | 173 | | try |
| | 174 | | { |
| 12 | 175 | | var response = RestClient.List(resourceGroupName, cancellationToken); |
| 12 | 176 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 177 | | } |
| 0 | 178 | | catch (Exception e) |
| | 179 | | { |
| 0 | 180 | | scope.Failed(e); |
| 0 | 181 | | throw; |
| | 182 | | } |
| 12 | 183 | | } |
| | 184 | | Page<VirtualNetworkGatewayConnection> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 185 | | { |
| 0 | 186 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.List"); |
| 0 | 187 | | scope.Start(); |
| | 188 | | try |
| | 189 | | { |
| 0 | 190 | | var response = RestClient.ListNextPage(nextLink, resourceGroupName, cancellationToken); |
| 0 | 191 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 192 | | } |
| 0 | 193 | | catch (Exception e) |
| | 194 | | { |
| 0 | 195 | | scope.Failed(e); |
| 0 | 196 | | throw; |
| | 197 | | } |
| 0 | 198 | | } |
| 12 | 199 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 200 | | } |
| | 201 | |
|
| | 202 | | /// <summary> Creates or updates a virtual network gateway connection in the specified resource group. </summary |
| | 203 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 204 | | /// <param name="virtualNetworkGatewayConnectionName"> The name of the virtual network gateway connection. </par |
| | 205 | | /// <param name="parameters"> Parameters supplied to the create or update virtual network gateway connection ope |
| | 206 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 207 | | public virtual async Task<VirtualNetworkGatewayConnectionsCreateOrUpdateOperation> StartCreateOrUpdateAsync(stri |
| | 208 | | { |
| 12 | 209 | | if (resourceGroupName == null) |
| | 210 | | { |
| 0 | 211 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 212 | | } |
| 12 | 213 | | if (virtualNetworkGatewayConnectionName == null) |
| | 214 | | { |
| 0 | 215 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayConnectionName)); |
| | 216 | | } |
| 12 | 217 | | if (parameters == null) |
| | 218 | | { |
| 0 | 219 | | throw new ArgumentNullException(nameof(parameters)); |
| | 220 | | } |
| | 221 | |
|
| 12 | 222 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.StartCreateOrUp |
| 12 | 223 | | scope.Start(); |
| | 224 | | try |
| | 225 | | { |
| 12 | 226 | | var originalResponse = await RestClient.CreateOrUpdateAsync(resourceGroupName, virtualNetworkGatewayConn |
| 12 | 227 | | return new VirtualNetworkGatewayConnectionsCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestCl |
| | 228 | | } |
| 0 | 229 | | catch (Exception e) |
| | 230 | | { |
| 0 | 231 | | scope.Failed(e); |
| 0 | 232 | | throw; |
| | 233 | | } |
| 12 | 234 | | } |
| | 235 | |
|
| | 236 | | /// <summary> Creates or updates a virtual network gateway connection in the specified resource group. </summary |
| | 237 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 238 | | /// <param name="virtualNetworkGatewayConnectionName"> The name of the virtual network gateway connection. </par |
| | 239 | | /// <param name="parameters"> Parameters supplied to the create or update virtual network gateway connection ope |
| | 240 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 241 | | public virtual VirtualNetworkGatewayConnectionsCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupN |
| | 242 | | { |
| 12 | 243 | | if (resourceGroupName == null) |
| | 244 | | { |
| 0 | 245 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 246 | | } |
| 12 | 247 | | if (virtualNetworkGatewayConnectionName == null) |
| | 248 | | { |
| 0 | 249 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayConnectionName)); |
| | 250 | | } |
| 12 | 251 | | if (parameters == null) |
| | 252 | | { |
| 0 | 253 | | throw new ArgumentNullException(nameof(parameters)); |
| | 254 | | } |
| | 255 | |
|
| 12 | 256 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.StartCreateOrUp |
| 12 | 257 | | scope.Start(); |
| | 258 | | try |
| | 259 | | { |
| 12 | 260 | | var originalResponse = RestClient.CreateOrUpdate(resourceGroupName, virtualNetworkGatewayConnectionName, |
| 12 | 261 | | return new VirtualNetworkGatewayConnectionsCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestCl |
| | 262 | | } |
| 0 | 263 | | catch (Exception e) |
| | 264 | | { |
| 0 | 265 | | scope.Failed(e); |
| 0 | 266 | | throw; |
| | 267 | | } |
| 12 | 268 | | } |
| | 269 | |
|
| | 270 | | /// <summary> Deletes the specified virtual network Gateway connection. </summary> |
| | 271 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 272 | | /// <param name="virtualNetworkGatewayConnectionName"> The name of the virtual network gateway connection. </par |
| | 273 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 274 | | public virtual async Task<VirtualNetworkGatewayConnectionsDeleteOperation> StartDeleteAsync(string resourceGroup |
| | 275 | | { |
| 6 | 276 | | if (resourceGroupName == null) |
| | 277 | | { |
| 0 | 278 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 279 | | } |
| 6 | 280 | | if (virtualNetworkGatewayConnectionName == null) |
| | 281 | | { |
| 0 | 282 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayConnectionName)); |
| | 283 | | } |
| | 284 | |
|
| 6 | 285 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.StartDelete"); |
| 6 | 286 | | scope.Start(); |
| | 287 | | try |
| | 288 | | { |
| 6 | 289 | | var originalResponse = await RestClient.DeleteAsync(resourceGroupName, virtualNetworkGatewayConnectionNa |
| 6 | 290 | | return new VirtualNetworkGatewayConnectionsDeleteOperation(_clientDiagnostics, _pipeline, RestClient.Cre |
| | 291 | | } |
| 0 | 292 | | catch (Exception e) |
| | 293 | | { |
| 0 | 294 | | scope.Failed(e); |
| 0 | 295 | | throw; |
| | 296 | | } |
| 6 | 297 | | } |
| | 298 | |
|
| | 299 | | /// <summary> Deletes the specified virtual network Gateway connection. </summary> |
| | 300 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 301 | | /// <param name="virtualNetworkGatewayConnectionName"> The name of the virtual network gateway connection. </par |
| | 302 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 303 | | public virtual VirtualNetworkGatewayConnectionsDeleteOperation StartDelete(string resourceGroupName, string virt |
| | 304 | | { |
| 6 | 305 | | if (resourceGroupName == null) |
| | 306 | | { |
| 0 | 307 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 308 | | } |
| 6 | 309 | | if (virtualNetworkGatewayConnectionName == null) |
| | 310 | | { |
| 0 | 311 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayConnectionName)); |
| | 312 | | } |
| | 313 | |
|
| 6 | 314 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.StartDelete"); |
| 6 | 315 | | scope.Start(); |
| | 316 | | try |
| | 317 | | { |
| 6 | 318 | | var originalResponse = RestClient.Delete(resourceGroupName, virtualNetworkGatewayConnectionName, cancell |
| 6 | 319 | | return new VirtualNetworkGatewayConnectionsDeleteOperation(_clientDiagnostics, _pipeline, RestClient.Cre |
| | 320 | | } |
| 0 | 321 | | catch (Exception e) |
| | 322 | | { |
| 0 | 323 | | scope.Failed(e); |
| 0 | 324 | | throw; |
| | 325 | | } |
| 6 | 326 | | } |
| | 327 | |
|
| | 328 | | /// <summary> Updates a virtual network gateway connection tags. </summary> |
| | 329 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 330 | | /// <param name="virtualNetworkGatewayConnectionName"> The name of the virtual network gateway connection. </par |
| | 331 | | /// <param name="parameters"> Parameters supplied to update virtual network gateway connection tags. </param> |
| | 332 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 333 | | public virtual async Task<VirtualNetworkGatewayConnectionsUpdateTagsOperation> StartUpdateTagsAsync(string resou |
| | 334 | | { |
| 0 | 335 | | if (resourceGroupName == null) |
| | 336 | | { |
| 0 | 337 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 338 | | } |
| 0 | 339 | | if (virtualNetworkGatewayConnectionName == null) |
| | 340 | | { |
| 0 | 341 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayConnectionName)); |
| | 342 | | } |
| 0 | 343 | | if (parameters == null) |
| | 344 | | { |
| 0 | 345 | | throw new ArgumentNullException(nameof(parameters)); |
| | 346 | | } |
| | 347 | |
|
| 0 | 348 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.StartUpdateTags |
| 0 | 349 | | scope.Start(); |
| | 350 | | try |
| | 351 | | { |
| 0 | 352 | | var originalResponse = await RestClient.UpdateTagsAsync(resourceGroupName, virtualNetworkGatewayConnecti |
| 0 | 353 | | return new VirtualNetworkGatewayConnectionsUpdateTagsOperation(_clientDiagnostics, _pipeline, RestClient |
| | 354 | | } |
| 0 | 355 | | catch (Exception e) |
| | 356 | | { |
| 0 | 357 | | scope.Failed(e); |
| 0 | 358 | | throw; |
| | 359 | | } |
| 0 | 360 | | } |
| | 361 | |
|
| | 362 | | /// <summary> Updates a virtual network gateway connection tags. </summary> |
| | 363 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 364 | | /// <param name="virtualNetworkGatewayConnectionName"> The name of the virtual network gateway connection. </par |
| | 365 | | /// <param name="parameters"> Parameters supplied to update virtual network gateway connection tags. </param> |
| | 366 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 367 | | public virtual VirtualNetworkGatewayConnectionsUpdateTagsOperation StartUpdateTags(string resourceGroupName, str |
| | 368 | | { |
| 0 | 369 | | if (resourceGroupName == null) |
| | 370 | | { |
| 0 | 371 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 372 | | } |
| 0 | 373 | | if (virtualNetworkGatewayConnectionName == null) |
| | 374 | | { |
| 0 | 375 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayConnectionName)); |
| | 376 | | } |
| 0 | 377 | | if (parameters == null) |
| | 378 | | { |
| 0 | 379 | | throw new ArgumentNullException(nameof(parameters)); |
| | 380 | | } |
| | 381 | |
|
| 0 | 382 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.StartUpdateTags |
| 0 | 383 | | scope.Start(); |
| | 384 | | try |
| | 385 | | { |
| 0 | 386 | | var originalResponse = RestClient.UpdateTags(resourceGroupName, virtualNetworkGatewayConnectionName, par |
| 0 | 387 | | return new VirtualNetworkGatewayConnectionsUpdateTagsOperation(_clientDiagnostics, _pipeline, RestClient |
| | 388 | | } |
| 0 | 389 | | catch (Exception e) |
| | 390 | | { |
| 0 | 391 | | scope.Failed(e); |
| 0 | 392 | | throw; |
| | 393 | | } |
| 0 | 394 | | } |
| | 395 | |
|
| | 396 | | /// <summary> The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connec |
| | 397 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 398 | | /// <param name="virtualNetworkGatewayConnectionName"> The virtual network gateway connection name. </param> |
| | 399 | | /// <param name="parameters"> Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key |
| | 400 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 401 | | public virtual async Task<VirtualNetworkGatewayConnectionsSetSharedKeyOperation> StartSetSharedKeyAsync(string r |
| | 402 | | { |
| 0 | 403 | | if (resourceGroupName == null) |
| | 404 | | { |
| 0 | 405 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 406 | | } |
| 0 | 407 | | if (virtualNetworkGatewayConnectionName == null) |
| | 408 | | { |
| 0 | 409 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayConnectionName)); |
| | 410 | | } |
| 0 | 411 | | if (parameters == null) |
| | 412 | | { |
| 0 | 413 | | throw new ArgumentNullException(nameof(parameters)); |
| | 414 | | } |
| | 415 | |
|
| 0 | 416 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.StartSetSharedK |
| 0 | 417 | | scope.Start(); |
| | 418 | | try |
| | 419 | | { |
| 0 | 420 | | var originalResponse = await RestClient.SetSharedKeyAsync(resourceGroupName, virtualNetworkGatewayConnec |
| 0 | 421 | | return new VirtualNetworkGatewayConnectionsSetSharedKeyOperation(_clientDiagnostics, _pipeline, RestClie |
| | 422 | | } |
| 0 | 423 | | catch (Exception e) |
| | 424 | | { |
| 0 | 425 | | scope.Failed(e); |
| 0 | 426 | | throw; |
| | 427 | | } |
| 0 | 428 | | } |
| | 429 | |
|
| | 430 | | /// <summary> The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connec |
| | 431 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 432 | | /// <param name="virtualNetworkGatewayConnectionName"> The virtual network gateway connection name. </param> |
| | 433 | | /// <param name="parameters"> Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key |
| | 434 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 435 | | public virtual VirtualNetworkGatewayConnectionsSetSharedKeyOperation StartSetSharedKey(string resourceGroupName, |
| | 436 | | { |
| 0 | 437 | | if (resourceGroupName == null) |
| | 438 | | { |
| 0 | 439 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 440 | | } |
| 0 | 441 | | if (virtualNetworkGatewayConnectionName == null) |
| | 442 | | { |
| 0 | 443 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayConnectionName)); |
| | 444 | | } |
| 0 | 445 | | if (parameters == null) |
| | 446 | | { |
| 0 | 447 | | throw new ArgumentNullException(nameof(parameters)); |
| | 448 | | } |
| | 449 | |
|
| 0 | 450 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.StartSetSharedK |
| 0 | 451 | | scope.Start(); |
| | 452 | | try |
| | 453 | | { |
| 0 | 454 | | var originalResponse = RestClient.SetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, p |
| 0 | 455 | | return new VirtualNetworkGatewayConnectionsSetSharedKeyOperation(_clientDiagnostics, _pipeline, RestClie |
| | 456 | | } |
| 0 | 457 | | catch (Exception e) |
| | 458 | | { |
| 0 | 459 | | scope.Failed(e); |
| 0 | 460 | | throw; |
| | 461 | | } |
| 0 | 462 | | } |
| | 463 | |
|
| | 464 | | /// <summary> The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway con |
| | 465 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 466 | | /// <param name="virtualNetworkGatewayConnectionName"> The virtual network gateway connection reset shared key N |
| | 467 | | /// <param name="parameters"> Parameters supplied to the begin reset virtual network gateway connection shared k |
| | 468 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 469 | | public virtual async Task<VirtualNetworkGatewayConnectionsResetSharedKeyOperation> StartResetSharedKeyAsync(stri |
| | 470 | | { |
| 0 | 471 | | if (resourceGroupName == null) |
| | 472 | | { |
| 0 | 473 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 474 | | } |
| 0 | 475 | | if (virtualNetworkGatewayConnectionName == null) |
| | 476 | | { |
| 0 | 477 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayConnectionName)); |
| | 478 | | } |
| 0 | 479 | | if (parameters == null) |
| | 480 | | { |
| 0 | 481 | | throw new ArgumentNullException(nameof(parameters)); |
| | 482 | | } |
| | 483 | |
|
| 0 | 484 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.StartResetShare |
| 0 | 485 | | scope.Start(); |
| | 486 | | try |
| | 487 | | { |
| 0 | 488 | | var originalResponse = await RestClient.ResetSharedKeyAsync(resourceGroupName, virtualNetworkGatewayConn |
| 0 | 489 | | return new VirtualNetworkGatewayConnectionsResetSharedKeyOperation(_clientDiagnostics, _pipeline, RestCl |
| | 490 | | } |
| 0 | 491 | | catch (Exception e) |
| | 492 | | { |
| 0 | 493 | | scope.Failed(e); |
| 0 | 494 | | throw; |
| | 495 | | } |
| 0 | 496 | | } |
| | 497 | |
|
| | 498 | | /// <summary> The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway con |
| | 499 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 500 | | /// <param name="virtualNetworkGatewayConnectionName"> The virtual network gateway connection reset shared key N |
| | 501 | | /// <param name="parameters"> Parameters supplied to the begin reset virtual network gateway connection shared k |
| | 502 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 503 | | public virtual VirtualNetworkGatewayConnectionsResetSharedKeyOperation StartResetSharedKey(string resourceGroupN |
| | 504 | | { |
| 0 | 505 | | if (resourceGroupName == null) |
| | 506 | | { |
| 0 | 507 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 508 | | } |
| 0 | 509 | | if (virtualNetworkGatewayConnectionName == null) |
| | 510 | | { |
| 0 | 511 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayConnectionName)); |
| | 512 | | } |
| 0 | 513 | | if (parameters == null) |
| | 514 | | { |
| 0 | 515 | | throw new ArgumentNullException(nameof(parameters)); |
| | 516 | | } |
| | 517 | |
|
| 0 | 518 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.StartResetShare |
| 0 | 519 | | scope.Start(); |
| | 520 | | try |
| | 521 | | { |
| 0 | 522 | | var originalResponse = RestClient.ResetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, |
| 0 | 523 | | return new VirtualNetworkGatewayConnectionsResetSharedKeyOperation(_clientDiagnostics, _pipeline, RestCl |
| | 524 | | } |
| 0 | 525 | | catch (Exception e) |
| | 526 | | { |
| 0 | 527 | | scope.Failed(e); |
| 0 | 528 | | throw; |
| | 529 | | } |
| 0 | 530 | | } |
| | 531 | |
|
| | 532 | | /// <summary> Starts packet capture on virtual network gateway connection in the specified resource group. </sum |
| | 533 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 534 | | /// <param name="virtualNetworkGatewayConnectionName"> The name of the virtual network gateway connection. </par |
| | 535 | | /// <param name="parameters"> Virtual network gateway packet capture parameters supplied to start packet capture |
| | 536 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 537 | | public virtual async Task<VirtualNetworkGatewayConnectionsStartPacketCaptureOperation> StartStartPacketCaptureAs |
| | 538 | | { |
| 0 | 539 | | if (resourceGroupName == null) |
| | 540 | | { |
| 0 | 541 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 542 | | } |
| 0 | 543 | | if (virtualNetworkGatewayConnectionName == null) |
| | 544 | | { |
| 0 | 545 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayConnectionName)); |
| | 546 | | } |
| | 547 | |
|
| 0 | 548 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.StartStartPacke |
| 0 | 549 | | scope.Start(); |
| | 550 | | try |
| | 551 | | { |
| 0 | 552 | | var originalResponse = await RestClient.StartPacketCaptureAsync(resourceGroupName, virtualNetworkGateway |
| 0 | 553 | | return new VirtualNetworkGatewayConnectionsStartPacketCaptureOperation(_clientDiagnostics, _pipeline, Re |
| | 554 | | } |
| 0 | 555 | | catch (Exception e) |
| | 556 | | { |
| 0 | 557 | | scope.Failed(e); |
| 0 | 558 | | throw; |
| | 559 | | } |
| 0 | 560 | | } |
| | 561 | |
|
| | 562 | | /// <summary> Starts packet capture on virtual network gateway connection in the specified resource group. </sum |
| | 563 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 564 | | /// <param name="virtualNetworkGatewayConnectionName"> The name of the virtual network gateway connection. </par |
| | 565 | | /// <param name="parameters"> Virtual network gateway packet capture parameters supplied to start packet capture |
| | 566 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 567 | | public virtual VirtualNetworkGatewayConnectionsStartPacketCaptureOperation StartStartPacketCapture(string resour |
| | 568 | | { |
| 0 | 569 | | if (resourceGroupName == null) |
| | 570 | | { |
| 0 | 571 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 572 | | } |
| 0 | 573 | | if (virtualNetworkGatewayConnectionName == null) |
| | 574 | | { |
| 0 | 575 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayConnectionName)); |
| | 576 | | } |
| | 577 | |
|
| 0 | 578 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.StartStartPacke |
| 0 | 579 | | scope.Start(); |
| | 580 | | try |
| | 581 | | { |
| 0 | 582 | | var originalResponse = RestClient.StartPacketCapture(resourceGroupName, virtualNetworkGatewayConnectionN |
| 0 | 583 | | return new VirtualNetworkGatewayConnectionsStartPacketCaptureOperation(_clientDiagnostics, _pipeline, Re |
| | 584 | | } |
| 0 | 585 | | catch (Exception e) |
| | 586 | | { |
| 0 | 587 | | scope.Failed(e); |
| 0 | 588 | | throw; |
| | 589 | | } |
| 0 | 590 | | } |
| | 591 | |
|
| | 592 | | /// <summary> Stops packet capture on virtual network gateway connection in the specified resource group. </summ |
| | 593 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 594 | | /// <param name="virtualNetworkGatewayConnectionName"> The name of the virtual network gateway Connection. </par |
| | 595 | | /// <param name="parameters"> Virtual network gateway packet capture parameters supplied to stop packet capture |
| | 596 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 597 | | public virtual async Task<VirtualNetworkGatewayConnectionsStopPacketCaptureOperation> StartStopPacketCaptureAsyn |
| | 598 | | { |
| 0 | 599 | | if (resourceGroupName == null) |
| | 600 | | { |
| 0 | 601 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 602 | | } |
| 0 | 603 | | if (virtualNetworkGatewayConnectionName == null) |
| | 604 | | { |
| 0 | 605 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayConnectionName)); |
| | 606 | | } |
| 0 | 607 | | if (parameters == null) |
| | 608 | | { |
| 0 | 609 | | throw new ArgumentNullException(nameof(parameters)); |
| | 610 | | } |
| | 611 | |
|
| 0 | 612 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.StartStopPacket |
| 0 | 613 | | scope.Start(); |
| | 614 | | try |
| | 615 | | { |
| 0 | 616 | | var originalResponse = await RestClient.StopPacketCaptureAsync(resourceGroupName, virtualNetworkGatewayC |
| 0 | 617 | | return new VirtualNetworkGatewayConnectionsStopPacketCaptureOperation(_clientDiagnostics, _pipeline, Res |
| | 618 | | } |
| 0 | 619 | | catch (Exception e) |
| | 620 | | { |
| 0 | 621 | | scope.Failed(e); |
| 0 | 622 | | throw; |
| | 623 | | } |
| 0 | 624 | | } |
| | 625 | |
|
| | 626 | | /// <summary> Stops packet capture on virtual network gateway connection in the specified resource group. </summ |
| | 627 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 628 | | /// <param name="virtualNetworkGatewayConnectionName"> The name of the virtual network gateway Connection. </par |
| | 629 | | /// <param name="parameters"> Virtual network gateway packet capture parameters supplied to stop packet capture |
| | 630 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 631 | | public virtual VirtualNetworkGatewayConnectionsStopPacketCaptureOperation StartStopPacketCapture(string resource |
| | 632 | | { |
| 0 | 633 | | if (resourceGroupName == null) |
| | 634 | | { |
| 0 | 635 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 636 | | } |
| 0 | 637 | | if (virtualNetworkGatewayConnectionName == null) |
| | 638 | | { |
| 0 | 639 | | throw new ArgumentNullException(nameof(virtualNetworkGatewayConnectionName)); |
| | 640 | | } |
| 0 | 641 | | if (parameters == null) |
| | 642 | | { |
| 0 | 643 | | throw new ArgumentNullException(nameof(parameters)); |
| | 644 | | } |
| | 645 | |
|
| 0 | 646 | | using var scope = _clientDiagnostics.CreateScope("VirtualNetworkGatewayConnectionsOperations.StartStopPacket |
| 0 | 647 | | scope.Start(); |
| | 648 | | try |
| | 649 | | { |
| 0 | 650 | | var originalResponse = RestClient.StopPacketCapture(resourceGroupName, virtualNetworkGatewayConnectionNa |
| 0 | 651 | | return new VirtualNetworkGatewayConnectionsStopPacketCaptureOperation(_clientDiagnostics, _pipeline, Res |
| | 652 | | } |
| 0 | 653 | | catch (Exception e) |
| | 654 | | { |
| 0 | 655 | | scope.Failed(e); |
| 0 | 656 | | throw; |
| | 657 | | } |
| 0 | 658 | | } |
| | 659 | | } |
| | 660 | | } |