| | 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 Service service client. </summary> |
| | 19 | | public partial class ServiceOperations |
| | 20 | | { |
| | 21 | | private readonly ClientDiagnostics _clientDiagnostics; |
| | 22 | | private readonly HttpPipeline _pipeline; |
| 4 | 23 | | internal ServiceRestOperations RestClient { get; } |
| | 24 | | /// <summary> Initializes a new instance of ServiceOperations for mocking. </summary> |
| 204 | 25 | | protected ServiceOperations() |
| | 26 | | { |
| 204 | 27 | | } |
| | 28 | | /// <summary> Initializes a new instance of ServiceOperations. </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> |
| 204 | 33 | | internal ServiceOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Ur |
| | 34 | | { |
| 204 | 35 | | RestClient = new ServiceRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint); |
| 204 | 36 | | _clientDiagnostics = clientDiagnostics; |
| 204 | 37 | | _pipeline = pipeline; |
| 204 | 38 | | } |
| | 39 | |
|
| | 40 | | /// <summary> Checks whether a domain name in the cloudapp.azure.com zone is available for use. </summary> |
| | 41 | | /// <param name="location"> The location of the domain name. </param> |
| | 42 | | /// <param name="domainNameLabel"> The domain name to be verified. It must conform to the following regular expr |
| | 43 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 44 | | public virtual async Task<Response<DnsNameAvailabilityResult>> CheckDnsNameAvailabilityAsync(string location, st |
| | 45 | | { |
| 2 | 46 | | using var scope = _clientDiagnostics.CreateScope("ServiceOperations.CheckDnsNameAvailability"); |
| 2 | 47 | | scope.Start(); |
| | 48 | | try |
| | 49 | | { |
| 2 | 50 | | return await RestClient.CheckDnsNameAvailabilityAsync(location, domainNameLabel, cancellationToken).Conf |
| | 51 | | } |
| 0 | 52 | | catch (Exception e) |
| | 53 | | { |
| 0 | 54 | | scope.Failed(e); |
| 0 | 55 | | throw; |
| | 56 | | } |
| 2 | 57 | | } |
| | 58 | |
|
| | 59 | | /// <summary> Checks whether a domain name in the cloudapp.azure.com zone is available for use. </summary> |
| | 60 | | /// <param name="location"> The location of the domain name. </param> |
| | 61 | | /// <param name="domainNameLabel"> The domain name to be verified. It must conform to the following regular expr |
| | 62 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 63 | | public virtual Response<DnsNameAvailabilityResult> CheckDnsNameAvailability(string location, string domainNameLa |
| | 64 | | { |
| 2 | 65 | | using var scope = _clientDiagnostics.CreateScope("ServiceOperations.CheckDnsNameAvailability"); |
| 2 | 66 | | scope.Start(); |
| | 67 | | try |
| | 68 | | { |
| 2 | 69 | | return RestClient.CheckDnsNameAvailability(location, domainNameLabel, cancellationToken); |
| | 70 | | } |
| 0 | 71 | | catch (Exception e) |
| | 72 | | { |
| 0 | 73 | | scope.Failed(e); |
| 0 | 74 | | throw; |
| | 75 | | } |
| 2 | 76 | | } |
| | 77 | |
|
| | 78 | | /// <summary> Gives the supported security providers for the virtual wan. </summary> |
| | 79 | | /// <param name="resourceGroupName"> The resource group name. </param> |
| | 80 | | /// <param name="virtualWANName"> The name of the VirtualWAN for which supported security providers are needed. |
| | 81 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 82 | | public virtual async Task<Response<VirtualWanSecurityProviders>> SupportedSecurityProvidersAsync(string resource |
| | 83 | | { |
| 0 | 84 | | using var scope = _clientDiagnostics.CreateScope("ServiceOperations.SupportedSecurityProviders"); |
| 0 | 85 | | scope.Start(); |
| | 86 | | try |
| | 87 | | { |
| 0 | 88 | | return await RestClient.SupportedSecurityProvidersAsync(resourceGroupName, virtualWANName, cancellationT |
| | 89 | | } |
| 0 | 90 | | catch (Exception e) |
| | 91 | | { |
| 0 | 92 | | scope.Failed(e); |
| 0 | 93 | | throw; |
| | 94 | | } |
| 0 | 95 | | } |
| | 96 | |
|
| | 97 | | /// <summary> Gives the supported security providers for the virtual wan. </summary> |
| | 98 | | /// <param name="resourceGroupName"> The resource group name. </param> |
| | 99 | | /// <param name="virtualWANName"> The name of the VirtualWAN for which supported security providers are needed. |
| | 100 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 101 | | public virtual Response<VirtualWanSecurityProviders> SupportedSecurityProviders(string resourceGroupName, string |
| | 102 | | { |
| 0 | 103 | | using var scope = _clientDiagnostics.CreateScope("ServiceOperations.SupportedSecurityProviders"); |
| 0 | 104 | | scope.Start(); |
| | 105 | | try |
| | 106 | | { |
| 0 | 107 | | return RestClient.SupportedSecurityProviders(resourceGroupName, virtualWANName, cancellationToken); |
| | 108 | | } |
| 0 | 109 | | catch (Exception e) |
| | 110 | | { |
| 0 | 111 | | scope.Failed(e); |
| 0 | 112 | | throw; |
| | 113 | | } |
| 0 | 114 | | } |
| | 115 | |
|
| | 116 | | /// <summary> Return the Bastion Shareable Links for all the VMs specified in the request. </summary> |
| | 117 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 118 | | /// <param name="bastionHostName"> The name of the Bastion Host. </param> |
| | 119 | | /// <param name="bslRequest"> Post request for all the Bastion Shareable Link endpoints. </param> |
| | 120 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 121 | | public virtual AsyncPageable<BastionShareableLink> GetBastionShareableLinkAsync(string resourceGroupName, string |
| | 122 | | { |
| 0 | 123 | | if (resourceGroupName == null) |
| | 124 | | { |
| 0 | 125 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 126 | | } |
| 0 | 127 | | if (bastionHostName == null) |
| | 128 | | { |
| 0 | 129 | | throw new ArgumentNullException(nameof(bastionHostName)); |
| | 130 | | } |
| 0 | 131 | | if (bslRequest == null) |
| | 132 | | { |
| 0 | 133 | | throw new ArgumentNullException(nameof(bslRequest)); |
| | 134 | | } |
| | 135 | |
|
| | 136 | | async Task<Page<BastionShareableLink>> FirstPageFunc(int? pageSizeHint) |
| | 137 | | { |
| 0 | 138 | | using var scope = _clientDiagnostics.CreateScope("ServiceOperations.GetBastionShareableLink"); |
| 0 | 139 | | scope.Start(); |
| | 140 | | try |
| | 141 | | { |
| 0 | 142 | | var response = await RestClient.GetBastionShareableLinkAsync(resourceGroupName, bastionHostName, bsl |
| 0 | 143 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 144 | | } |
| 0 | 145 | | catch (Exception e) |
| | 146 | | { |
| 0 | 147 | | scope.Failed(e); |
| 0 | 148 | | throw; |
| | 149 | | } |
| 0 | 150 | | } |
| | 151 | | async Task<Page<BastionShareableLink>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 152 | | { |
| 0 | 153 | | using var scope = _clientDiagnostics.CreateScope("ServiceOperations.GetBastionShareableLink"); |
| 0 | 154 | | scope.Start(); |
| | 155 | | try |
| | 156 | | { |
| 0 | 157 | | var response = await RestClient.GetBastionShareableLinkNextPageAsync(nextLink, resourceGroupName, ba |
| 0 | 158 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 159 | | } |
| 0 | 160 | | catch (Exception e) |
| | 161 | | { |
| 0 | 162 | | scope.Failed(e); |
| 0 | 163 | | throw; |
| | 164 | | } |
| 0 | 165 | | } |
| 0 | 166 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 167 | | } |
| | 168 | |
|
| | 169 | | /// <summary> Return the Bastion Shareable Links for all the VMs specified in the request. </summary> |
| | 170 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 171 | | /// <param name="bastionHostName"> The name of the Bastion Host. </param> |
| | 172 | | /// <param name="bslRequest"> Post request for all the Bastion Shareable Link endpoints. </param> |
| | 173 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 174 | | public virtual Pageable<BastionShareableLink> GetBastionShareableLink(string resourceGroupName, string bastionHo |
| | 175 | | { |
| 0 | 176 | | if (resourceGroupName == null) |
| | 177 | | { |
| 0 | 178 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 179 | | } |
| 0 | 180 | | if (bastionHostName == null) |
| | 181 | | { |
| 0 | 182 | | throw new ArgumentNullException(nameof(bastionHostName)); |
| | 183 | | } |
| 0 | 184 | | if (bslRequest == null) |
| | 185 | | { |
| 0 | 186 | | throw new ArgumentNullException(nameof(bslRequest)); |
| | 187 | | } |
| | 188 | |
|
| | 189 | | Page<BastionShareableLink> FirstPageFunc(int? pageSizeHint) |
| | 190 | | { |
| 0 | 191 | | using var scope = _clientDiagnostics.CreateScope("ServiceOperations.GetBastionShareableLink"); |
| 0 | 192 | | scope.Start(); |
| | 193 | | try |
| | 194 | | { |
| 0 | 195 | | var response = RestClient.GetBastionShareableLink(resourceGroupName, bastionHostName, bslRequest, ca |
| 0 | 196 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 197 | | } |
| 0 | 198 | | catch (Exception e) |
| | 199 | | { |
| 0 | 200 | | scope.Failed(e); |
| 0 | 201 | | throw; |
| | 202 | | } |
| 0 | 203 | | } |
| | 204 | | Page<BastionShareableLink> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 205 | | { |
| 0 | 206 | | using var scope = _clientDiagnostics.CreateScope("ServiceOperations.GetBastionShareableLink"); |
| 0 | 207 | | scope.Start(); |
| | 208 | | try |
| | 209 | | { |
| 0 | 210 | | var response = RestClient.GetBastionShareableLinkNextPage(nextLink, resourceGroupName, bastionHostNa |
| 0 | 211 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 212 | | } |
| 0 | 213 | | catch (Exception e) |
| | 214 | | { |
| 0 | 215 | | scope.Failed(e); |
| 0 | 216 | | throw; |
| | 217 | | } |
| 0 | 218 | | } |
| 0 | 219 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 220 | | } |
| | 221 | |
|
| | 222 | | /// <summary> Returns the list of currently active sessions on the Bastion. </summary> |
| | 223 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 224 | | /// <param name="bastionHostName"> The name of the Bastion Host. </param> |
| | 225 | | /// <param name="sessionIds"> The list of sessionids to disconnect. </param> |
| | 226 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 227 | | public virtual AsyncPageable<BastionSessionState> DisconnectActiveSessionsAsync(string resourceGroupName, string |
| | 228 | | { |
| 0 | 229 | | if (resourceGroupName == null) |
| | 230 | | { |
| 0 | 231 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 232 | | } |
| 0 | 233 | | if (bastionHostName == null) |
| | 234 | | { |
| 0 | 235 | | throw new ArgumentNullException(nameof(bastionHostName)); |
| | 236 | | } |
| 0 | 237 | | if (sessionIds == null) |
| | 238 | | { |
| 0 | 239 | | throw new ArgumentNullException(nameof(sessionIds)); |
| | 240 | | } |
| | 241 | |
|
| | 242 | | async Task<Page<BastionSessionState>> FirstPageFunc(int? pageSizeHint) |
| | 243 | | { |
| 0 | 244 | | using var scope = _clientDiagnostics.CreateScope("ServiceOperations.DisconnectActiveSessions"); |
| 0 | 245 | | scope.Start(); |
| | 246 | | try |
| | 247 | | { |
| 0 | 248 | | var response = await RestClient.DisconnectActiveSessionsAsync(resourceGroupName, bastionHostName, se |
| 0 | 249 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 250 | | } |
| 0 | 251 | | catch (Exception e) |
| | 252 | | { |
| 0 | 253 | | scope.Failed(e); |
| 0 | 254 | | throw; |
| | 255 | | } |
| 0 | 256 | | } |
| | 257 | | async Task<Page<BastionSessionState>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 258 | | { |
| 0 | 259 | | using var scope = _clientDiagnostics.CreateScope("ServiceOperations.DisconnectActiveSessions"); |
| 0 | 260 | | scope.Start(); |
| | 261 | | try |
| | 262 | | { |
| 0 | 263 | | var response = await RestClient.DisconnectActiveSessionsNextPageAsync(nextLink, resourceGroupName, b |
| 0 | 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 | | } |
| 0 | 271 | | } |
| 0 | 272 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 273 | | } |
| | 274 | |
|
| | 275 | | /// <summary> Returns the list of currently active sessions on the Bastion. </summary> |
| | 276 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 277 | | /// <param name="bastionHostName"> The name of the Bastion Host. </param> |
| | 278 | | /// <param name="sessionIds"> The list of sessionids to disconnect. </param> |
| | 279 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 280 | | public virtual Pageable<BastionSessionState> DisconnectActiveSessions(string resourceGroupName, string bastionHo |
| | 281 | | { |
| 0 | 282 | | if (resourceGroupName == null) |
| | 283 | | { |
| 0 | 284 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 285 | | } |
| 0 | 286 | | if (bastionHostName == null) |
| | 287 | | { |
| 0 | 288 | | throw new ArgumentNullException(nameof(bastionHostName)); |
| | 289 | | } |
| 0 | 290 | | if (sessionIds == null) |
| | 291 | | { |
| 0 | 292 | | throw new ArgumentNullException(nameof(sessionIds)); |
| | 293 | | } |
| | 294 | |
|
| | 295 | | Page<BastionSessionState> FirstPageFunc(int? pageSizeHint) |
| | 296 | | { |
| 0 | 297 | | using var scope = _clientDiagnostics.CreateScope("ServiceOperations.DisconnectActiveSessions"); |
| 0 | 298 | | scope.Start(); |
| | 299 | | try |
| | 300 | | { |
| 0 | 301 | | var response = RestClient.DisconnectActiveSessions(resourceGroupName, bastionHostName, sessionIds, c |
| 0 | 302 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 303 | | } |
| 0 | 304 | | catch (Exception e) |
| | 305 | | { |
| 0 | 306 | | scope.Failed(e); |
| 0 | 307 | | throw; |
| | 308 | | } |
| 0 | 309 | | } |
| | 310 | | Page<BastionSessionState> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 311 | | { |
| 0 | 312 | | using var scope = _clientDiagnostics.CreateScope("ServiceOperations.DisconnectActiveSessions"); |
| 0 | 313 | | scope.Start(); |
| | 314 | | try |
| | 315 | | { |
| 0 | 316 | | var response = RestClient.DisconnectActiveSessionsNextPage(nextLink, resourceGroupName, bastionHostN |
| 0 | 317 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 318 | | } |
| 0 | 319 | | catch (Exception e) |
| | 320 | | { |
| 0 | 321 | | scope.Failed(e); |
| 0 | 322 | | throw; |
| | 323 | | } |
| 0 | 324 | | } |
| 0 | 325 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 326 | | } |
| | 327 | |
|
| | 328 | | /// <summary> Creates a Bastion Shareable Links for all the VMs specified in the request. </summary> |
| | 329 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 330 | | /// <param name="bastionHostName"> The name of the Bastion Host. </param> |
| | 331 | | /// <param name="bslRequest"> Post request for all the Bastion Shareable Link endpoints. </param> |
| | 332 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 333 | | public virtual async Task<ServicePutBastionShareableLinkOperation> StartPutBastionShareableLinkAsync(string reso |
| | 334 | | { |
| 0 | 335 | | if (resourceGroupName == null) |
| | 336 | | { |
| 0 | 337 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 338 | | } |
| 0 | 339 | | if (bastionHostName == null) |
| | 340 | | { |
| 0 | 341 | | throw new ArgumentNullException(nameof(bastionHostName)); |
| | 342 | | } |
| 0 | 343 | | if (bslRequest == null) |
| | 344 | | { |
| 0 | 345 | | throw new ArgumentNullException(nameof(bslRequest)); |
| | 346 | | } |
| | 347 | |
|
| 0 | 348 | | using var scope = _clientDiagnostics.CreateScope("ServiceOperations.StartPutBastionShareableLink"); |
| 0 | 349 | | scope.Start(); |
| | 350 | | try |
| | 351 | | { |
| 0 | 352 | | var originalResponse = await RestClient.PutBastionShareableLinkAsync(resourceGroupName, bastionHostName, |
| 0 | 353 | | return new ServicePutBastionShareableLinkOperation(_clientDiagnostics, _pipeline, RestClient.CreatePutBa |
| | 354 | | } |
| 0 | 355 | | catch (Exception e) |
| | 356 | | { |
| 0 | 357 | | scope.Failed(e); |
| 0 | 358 | | throw; |
| | 359 | | } |
| 0 | 360 | | } |
| | 361 | |
|
| | 362 | | /// <summary> Creates a Bastion Shareable Links for all the VMs specified in the request. </summary> |
| | 363 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 364 | | /// <param name="bastionHostName"> The name of the Bastion Host. </param> |
| | 365 | | /// <param name="bslRequest"> Post request for all the Bastion Shareable Link endpoints. </param> |
| | 366 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 367 | | public virtual ServicePutBastionShareableLinkOperation StartPutBastionShareableLink(string resourceGroupName, st |
| | 368 | | { |
| 0 | 369 | | if (resourceGroupName == null) |
| | 370 | | { |
| 0 | 371 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 372 | | } |
| 0 | 373 | | if (bastionHostName == null) |
| | 374 | | { |
| 0 | 375 | | throw new ArgumentNullException(nameof(bastionHostName)); |
| | 376 | | } |
| 0 | 377 | | if (bslRequest == null) |
| | 378 | | { |
| 0 | 379 | | throw new ArgumentNullException(nameof(bslRequest)); |
| | 380 | | } |
| | 381 | |
|
| 0 | 382 | | using var scope = _clientDiagnostics.CreateScope("ServiceOperations.StartPutBastionShareableLink"); |
| 0 | 383 | | scope.Start(); |
| | 384 | | try |
| | 385 | | { |
| 0 | 386 | | var originalResponse = RestClient.PutBastionShareableLink(resourceGroupName, bastionHostName, bslRequest |
| 0 | 387 | | return new ServicePutBastionShareableLinkOperation(_clientDiagnostics, _pipeline, RestClient.CreatePutBa |
| | 388 | | } |
| 0 | 389 | | catch (Exception e) |
| | 390 | | { |
| 0 | 391 | | scope.Failed(e); |
| 0 | 392 | | throw; |
| | 393 | | } |
| 0 | 394 | | } |
| | 395 | |
|
| | 396 | | /// <summary> Deletes the Bastion Shareable Links for all the VMs specified in the request. </summary> |
| | 397 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 398 | | /// <param name="bastionHostName"> The name of the Bastion Host. </param> |
| | 399 | | /// <param name="bslRequest"> Post request for all the Bastion Shareable Link endpoints. </param> |
| | 400 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 401 | | public virtual async Task<ServiceDeleteBastionShareableLinkOperation> StartDeleteBastionShareableLinkAsync(strin |
| | 402 | | { |
| 0 | 403 | | if (resourceGroupName == null) |
| | 404 | | { |
| 0 | 405 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 406 | | } |
| 0 | 407 | | if (bastionHostName == null) |
| | 408 | | { |
| 0 | 409 | | throw new ArgumentNullException(nameof(bastionHostName)); |
| | 410 | | } |
| 0 | 411 | | if (bslRequest == null) |
| | 412 | | { |
| 0 | 413 | | throw new ArgumentNullException(nameof(bslRequest)); |
| | 414 | | } |
| | 415 | |
|
| 0 | 416 | | using var scope = _clientDiagnostics.CreateScope("ServiceOperations.StartDeleteBastionShareableLink"); |
| 0 | 417 | | scope.Start(); |
| | 418 | | try |
| | 419 | | { |
| 0 | 420 | | var originalResponse = await RestClient.DeleteBastionShareableLinkAsync(resourceGroupName, bastionHostNa |
| 0 | 421 | | return new ServiceDeleteBastionShareableLinkOperation(_clientDiagnostics, _pipeline, RestClient.CreateDe |
| | 422 | | } |
| 0 | 423 | | catch (Exception e) |
| | 424 | | { |
| 0 | 425 | | scope.Failed(e); |
| 0 | 426 | | throw; |
| | 427 | | } |
| 0 | 428 | | } |
| | 429 | |
|
| | 430 | | /// <summary> Deletes the Bastion Shareable Links for all the VMs specified in the request. </summary> |
| | 431 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 432 | | /// <param name="bastionHostName"> The name of the Bastion Host. </param> |
| | 433 | | /// <param name="bslRequest"> Post request for all the Bastion Shareable Link endpoints. </param> |
| | 434 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 435 | | public virtual ServiceDeleteBastionShareableLinkOperation StartDeleteBastionShareableLink(string resourceGroupNa |
| | 436 | | { |
| 0 | 437 | | if (resourceGroupName == null) |
| | 438 | | { |
| 0 | 439 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 440 | | } |
| 0 | 441 | | if (bastionHostName == null) |
| | 442 | | { |
| 0 | 443 | | throw new ArgumentNullException(nameof(bastionHostName)); |
| | 444 | | } |
| 0 | 445 | | if (bslRequest == null) |
| | 446 | | { |
| 0 | 447 | | throw new ArgumentNullException(nameof(bslRequest)); |
| | 448 | | } |
| | 449 | |
|
| 0 | 450 | | using var scope = _clientDiagnostics.CreateScope("ServiceOperations.StartDeleteBastionShareableLink"); |
| 0 | 451 | | scope.Start(); |
| | 452 | | try |
| | 453 | | { |
| 0 | 454 | | var originalResponse = RestClient.DeleteBastionShareableLink(resourceGroupName, bastionHostName, bslRequ |
| 0 | 455 | | return new ServiceDeleteBastionShareableLinkOperation(_clientDiagnostics, _pipeline, RestClient.CreateDe |
| | 456 | | } |
| 0 | 457 | | catch (Exception e) |
| | 458 | | { |
| 0 | 459 | | scope.Failed(e); |
| 0 | 460 | | throw; |
| | 461 | | } |
| 0 | 462 | | } |
| | 463 | |
|
| | 464 | | /// <summary> Returns the list of currently active sessions on the Bastion. </summary> |
| | 465 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 466 | | /// <param name="bastionHostName"> The name of the Bastion Host. </param> |
| | 467 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 468 | | public virtual async Task<ServiceGetActiveSessionsOperation> StartGetActiveSessionsAsync(string resourceGroupNam |
| | 469 | | { |
| 0 | 470 | | if (resourceGroupName == null) |
| | 471 | | { |
| 0 | 472 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 473 | | } |
| 0 | 474 | | if (bastionHostName == null) |
| | 475 | | { |
| 0 | 476 | | throw new ArgumentNullException(nameof(bastionHostName)); |
| | 477 | | } |
| | 478 | |
|
| 0 | 479 | | using var scope = _clientDiagnostics.CreateScope("ServiceOperations.StartGetActiveSessions"); |
| 0 | 480 | | scope.Start(); |
| | 481 | | try |
| | 482 | | { |
| 0 | 483 | | var originalResponse = await RestClient.GetActiveSessionsAsync(resourceGroupName, bastionHostName, cance |
| 0 | 484 | | return new ServiceGetActiveSessionsOperation(_clientDiagnostics, _pipeline, RestClient.CreateGetActiveSe |
| | 485 | | } |
| 0 | 486 | | catch (Exception e) |
| | 487 | | { |
| 0 | 488 | | scope.Failed(e); |
| 0 | 489 | | throw; |
| | 490 | | } |
| 0 | 491 | | } |
| | 492 | |
|
| | 493 | | /// <summary> Returns the list of currently active sessions on the Bastion. </summary> |
| | 494 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 495 | | /// <param name="bastionHostName"> The name of the Bastion Host. </param> |
| | 496 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 497 | | public virtual ServiceGetActiveSessionsOperation StartGetActiveSessions(string resourceGroupName, string bastion |
| | 498 | | { |
| 0 | 499 | | if (resourceGroupName == null) |
| | 500 | | { |
| 0 | 501 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 502 | | } |
| 0 | 503 | | if (bastionHostName == null) |
| | 504 | | { |
| 0 | 505 | | throw new ArgumentNullException(nameof(bastionHostName)); |
| | 506 | | } |
| | 507 | |
|
| 0 | 508 | | using var scope = _clientDiagnostics.CreateScope("ServiceOperations.StartGetActiveSessions"); |
| 0 | 509 | | scope.Start(); |
| | 510 | | try |
| | 511 | | { |
| 0 | 512 | | var originalResponse = RestClient.GetActiveSessions(resourceGroupName, bastionHostName, cancellationToke |
| 0 | 513 | | return new ServiceGetActiveSessionsOperation(_clientDiagnostics, _pipeline, RestClient.CreateGetActiveSe |
| | 514 | | } |
| 0 | 515 | | catch (Exception e) |
| | 516 | | { |
| 0 | 517 | | scope.Failed(e); |
| 0 | 518 | | throw; |
| | 519 | | } |
| 0 | 520 | | } |
| | 521 | |
|
| | 522 | | /// <summary> Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguratio |
| | 523 | | /// <param name="resourceGroupName"> The resource group name. </param> |
| | 524 | | /// <param name="virtualWANName"> The name of the VirtualWAN whose associated VpnServerConfigurations is needed. |
| | 525 | | /// <param name="vpnClientParams"> Parameters supplied to the generate VirtualWan VPN profile generation operati |
| | 526 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 527 | | public virtual async Task<ServiceGeneratevirtualwanvpnserverconfigurationvpnprofileOperation> StartGeneratevirtu |
| | 528 | | { |
| 0 | 529 | | if (resourceGroupName == null) |
| | 530 | | { |
| 0 | 531 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 532 | | } |
| 0 | 533 | | if (virtualWANName == null) |
| | 534 | | { |
| 0 | 535 | | throw new ArgumentNullException(nameof(virtualWANName)); |
| | 536 | | } |
| 0 | 537 | | if (vpnClientParams == null) |
| | 538 | | { |
| 0 | 539 | | throw new ArgumentNullException(nameof(vpnClientParams)); |
| | 540 | | } |
| | 541 | |
|
| 0 | 542 | | using var scope = _clientDiagnostics.CreateScope("ServiceOperations.StartGeneratevirtualwanvpnserverconfigur |
| 0 | 543 | | scope.Start(); |
| | 544 | | try |
| | 545 | | { |
| 0 | 546 | | var originalResponse = await RestClient.GeneratevirtualwanvpnserverconfigurationvpnprofileAsync(resource |
| 0 | 547 | | return new ServiceGeneratevirtualwanvpnserverconfigurationvpnprofileOperation(_clientDiagnostics, _pipel |
| | 548 | | } |
| 0 | 549 | | catch (Exception e) |
| | 550 | | { |
| 0 | 551 | | scope.Failed(e); |
| 0 | 552 | | throw; |
| | 553 | | } |
| 0 | 554 | | } |
| | 555 | |
|
| | 556 | | /// <summary> Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguratio |
| | 557 | | /// <param name="resourceGroupName"> The resource group name. </param> |
| | 558 | | /// <param name="virtualWANName"> The name of the VirtualWAN whose associated VpnServerConfigurations is needed. |
| | 559 | | /// <param name="vpnClientParams"> Parameters supplied to the generate VirtualWan VPN profile generation operati |
| | 560 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 561 | | public virtual ServiceGeneratevirtualwanvpnserverconfigurationvpnprofileOperation StartGeneratevirtualwanvpnserv |
| | 562 | | { |
| 0 | 563 | | if (resourceGroupName == null) |
| | 564 | | { |
| 0 | 565 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 566 | | } |
| 0 | 567 | | if (virtualWANName == null) |
| | 568 | | { |
| 0 | 569 | | throw new ArgumentNullException(nameof(virtualWANName)); |
| | 570 | | } |
| 0 | 571 | | if (vpnClientParams == null) |
| | 572 | | { |
| 0 | 573 | | throw new ArgumentNullException(nameof(vpnClientParams)); |
| | 574 | | } |
| | 575 | |
|
| 0 | 576 | | using var scope = _clientDiagnostics.CreateScope("ServiceOperations.StartGeneratevirtualwanvpnserverconfigur |
| 0 | 577 | | scope.Start(); |
| | 578 | | try |
| | 579 | | { |
| 0 | 580 | | var originalResponse = RestClient.Generatevirtualwanvpnserverconfigurationvpnprofile(resourceGroupName, |
| 0 | 581 | | return new ServiceGeneratevirtualwanvpnserverconfigurationvpnprofileOperation(_clientDiagnostics, _pipel |
| | 582 | | } |
| 0 | 583 | | catch (Exception e) |
| | 584 | | { |
| 0 | 585 | | scope.Failed(e); |
| 0 | 586 | | throw; |
| | 587 | | } |
| 0 | 588 | | } |
| | 589 | | } |
| | 590 | | } |