| | 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.Compute.Models; |
| | 15 | |
|
| | 16 | | namespace Azure.ResourceManager.Compute |
| | 17 | | { |
| | 18 | | /// <summary> The DiskEncryptionSets service client. </summary> |
| | 19 | | public partial class DiskEncryptionSetsOperations |
| | 20 | | { |
| | 21 | | private readonly ClientDiagnostics _clientDiagnostics; |
| | 22 | | private readonly HttpPipeline _pipeline; |
| 108 | 23 | | internal DiskEncryptionSetsRestOperations RestClient { get; } |
| | 24 | | /// <summary> Initializes a new instance of DiskEncryptionSetsOperations for mocking. </summary> |
| 396 | 25 | | protected DiskEncryptionSetsOperations() |
| | 26 | | { |
| 396 | 27 | | } |
| | 28 | | /// <summary> Initializes a new instance of DiskEncryptionSetsOperations. </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"> Subscription credentials which uniquely identify Microsoft Azure subscription. |
| | 32 | | /// <param name="endpoint"> server parameter. </param> |
| 396 | 33 | | internal DiskEncryptionSetsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscri |
| | 34 | | { |
| 396 | 35 | | RestClient = new DiskEncryptionSetsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint); |
| 396 | 36 | | _clientDiagnostics = clientDiagnostics; |
| 396 | 37 | | _pipeline = pipeline; |
| 396 | 38 | | } |
| | 39 | |
|
| | 40 | | /// <summary> Gets information about a disk encryption set. </summary> |
| | 41 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 42 | | /// <param name="diskEncryptionSetName"> The name of the disk encryption set that is being created. The name can |
| | 43 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 44 | | public virtual async Task<Response<DiskEncryptionSet>> GetAsync(string resourceGroupName, string diskEncryptionS |
| | 45 | | { |
| 4 | 46 | | using var scope = _clientDiagnostics.CreateScope("DiskEncryptionSetsOperations.Get"); |
| 4 | 47 | | scope.Start(); |
| | 48 | | try |
| | 49 | | { |
| 4 | 50 | | return await RestClient.GetAsync(resourceGroupName, diskEncryptionSetName, cancellationToken).ConfigureA |
| | 51 | | } |
| 2 | 52 | | catch (Exception e) |
| | 53 | | { |
| 2 | 54 | | scope.Failed(e); |
| 2 | 55 | | throw; |
| | 56 | | } |
| 2 | 57 | | } |
| | 58 | |
|
| | 59 | | /// <summary> Gets information about a disk encryption set. </summary> |
| | 60 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 61 | | /// <param name="diskEncryptionSetName"> The name of the disk encryption set that is being created. The name can |
| | 62 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 63 | | public virtual Response<DiskEncryptionSet> Get(string resourceGroupName, string diskEncryptionSetName, Cancellat |
| | 64 | | { |
| 4 | 65 | | using var scope = _clientDiagnostics.CreateScope("DiskEncryptionSetsOperations.Get"); |
| 4 | 66 | | scope.Start(); |
| | 67 | | try |
| | 68 | | { |
| 4 | 69 | | return RestClient.Get(resourceGroupName, diskEncryptionSetName, cancellationToken); |
| | 70 | | } |
| 2 | 71 | | catch (Exception e) |
| | 72 | | { |
| 2 | 73 | | scope.Failed(e); |
| 2 | 74 | | throw; |
| | 75 | | } |
| 2 | 76 | | } |
| | 77 | |
|
| | 78 | | /// <summary> Lists all the disk encryption sets under a resource group. </summary> |
| | 79 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 80 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 81 | | public virtual AsyncPageable<DiskEncryptionSet> ListByResourceGroupAsync(string resourceGroupName, CancellationT |
| | 82 | | { |
| 4 | 83 | | if (resourceGroupName == null) |
| | 84 | | { |
| 0 | 85 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 86 | | } |
| | 87 | |
|
| | 88 | | async Task<Page<DiskEncryptionSet>> FirstPageFunc(int? pageSizeHint) |
| | 89 | | { |
| 4 | 90 | | using var scope = _clientDiagnostics.CreateScope("DiskEncryptionSetsOperations.ListByResourceGroup"); |
| 4 | 91 | | scope.Start(); |
| | 92 | | try |
| | 93 | | { |
| 4 | 94 | | var response = await RestClient.ListByResourceGroupAsync(resourceGroupName, cancellationToken).Confi |
| 4 | 95 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 96 | | } |
| 0 | 97 | | catch (Exception e) |
| | 98 | | { |
| 0 | 99 | | scope.Failed(e); |
| 0 | 100 | | throw; |
| | 101 | | } |
| 4 | 102 | | } |
| | 103 | | async Task<Page<DiskEncryptionSet>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 104 | | { |
| 0 | 105 | | using var scope = _clientDiagnostics.CreateScope("DiskEncryptionSetsOperations.ListByResourceGroup"); |
| 0 | 106 | | scope.Start(); |
| | 107 | | try |
| | 108 | | { |
| 0 | 109 | | var response = await RestClient.ListByResourceGroupNextPageAsync(nextLink, resourceGroupName, cancel |
| 0 | 110 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 111 | | } |
| 0 | 112 | | catch (Exception e) |
| | 113 | | { |
| 0 | 114 | | scope.Failed(e); |
| 0 | 115 | | throw; |
| | 116 | | } |
| 0 | 117 | | } |
| 4 | 118 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 119 | | } |
| | 120 | |
|
| | 121 | | /// <summary> Lists all the disk encryption sets under a resource group. </summary> |
| | 122 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 123 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 124 | | public virtual Pageable<DiskEncryptionSet> ListByResourceGroup(string resourceGroupName, CancellationToken cance |
| | 125 | | { |
| 4 | 126 | | if (resourceGroupName == null) |
| | 127 | | { |
| 0 | 128 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 129 | | } |
| | 130 | |
|
| | 131 | | Page<DiskEncryptionSet> FirstPageFunc(int? pageSizeHint) |
| | 132 | | { |
| 4 | 133 | | using var scope = _clientDiagnostics.CreateScope("DiskEncryptionSetsOperations.ListByResourceGroup"); |
| 4 | 134 | | scope.Start(); |
| | 135 | | try |
| | 136 | | { |
| 4 | 137 | | var response = RestClient.ListByResourceGroup(resourceGroupName, cancellationToken); |
| 4 | 138 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 139 | | } |
| 0 | 140 | | catch (Exception e) |
| | 141 | | { |
| 0 | 142 | | scope.Failed(e); |
| 0 | 143 | | throw; |
| | 144 | | } |
| 4 | 145 | | } |
| | 146 | | Page<DiskEncryptionSet> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 147 | | { |
| 0 | 148 | | using var scope = _clientDiagnostics.CreateScope("DiskEncryptionSetsOperations.ListByResourceGroup"); |
| 0 | 149 | | scope.Start(); |
| | 150 | | try |
| | 151 | | { |
| 0 | 152 | | var response = RestClient.ListByResourceGroupNextPage(nextLink, resourceGroupName, cancellationToken |
| 0 | 153 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 154 | | } |
| 0 | 155 | | catch (Exception e) |
| | 156 | | { |
| 0 | 157 | | scope.Failed(e); |
| 0 | 158 | | throw; |
| | 159 | | } |
| 0 | 160 | | } |
| 4 | 161 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 162 | | } |
| | 163 | |
|
| | 164 | | /// <summary> Lists all the disk encryption sets under a subscription. </summary> |
| | 165 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 166 | | public virtual AsyncPageable<DiskEncryptionSet> ListAsync(CancellationToken cancellationToken = default) |
| | 167 | | { |
| | 168 | | async Task<Page<DiskEncryptionSet>> FirstPageFunc(int? pageSizeHint) |
| | 169 | | { |
| 2 | 170 | | using var scope = _clientDiagnostics.CreateScope("DiskEncryptionSetsOperations.List"); |
| 2 | 171 | | scope.Start(); |
| | 172 | | try |
| | 173 | | { |
| 2 | 174 | | var response = await RestClient.ListAsync(cancellationToken).ConfigureAwait(false); |
| 2 | 175 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 176 | | } |
| 0 | 177 | | catch (Exception e) |
| | 178 | | { |
| 0 | 179 | | scope.Failed(e); |
| 0 | 180 | | throw; |
| | 181 | | } |
| 2 | 182 | | } |
| | 183 | | async Task<Page<DiskEncryptionSet>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 184 | | { |
| 0 | 185 | | using var scope = _clientDiagnostics.CreateScope("DiskEncryptionSetsOperations.List"); |
| 0 | 186 | | scope.Start(); |
| | 187 | | try |
| | 188 | | { |
| 0 | 189 | | var response = await RestClient.ListNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false) |
| 0 | 190 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 191 | | } |
| 0 | 192 | | catch (Exception e) |
| | 193 | | { |
| 0 | 194 | | scope.Failed(e); |
| 0 | 195 | | throw; |
| | 196 | | } |
| 0 | 197 | | } |
| 2 | 198 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 199 | | } |
| | 200 | |
|
| | 201 | | /// <summary> Lists all the disk encryption sets under a subscription. </summary> |
| | 202 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 203 | | public virtual Pageable<DiskEncryptionSet> List(CancellationToken cancellationToken = default) |
| | 204 | | { |
| | 205 | | Page<DiskEncryptionSet> FirstPageFunc(int? pageSizeHint) |
| | 206 | | { |
| 2 | 207 | | using var scope = _clientDiagnostics.CreateScope("DiskEncryptionSetsOperations.List"); |
| 2 | 208 | | scope.Start(); |
| | 209 | | try |
| | 210 | | { |
| 2 | 211 | | var response = RestClient.List(cancellationToken); |
| 2 | 212 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 213 | | } |
| 0 | 214 | | catch (Exception e) |
| | 215 | | { |
| 0 | 216 | | scope.Failed(e); |
| 0 | 217 | | throw; |
| | 218 | | } |
| 2 | 219 | | } |
| | 220 | | Page<DiskEncryptionSet> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 221 | | { |
| 0 | 222 | | using var scope = _clientDiagnostics.CreateScope("DiskEncryptionSetsOperations.List"); |
| 0 | 223 | | scope.Start(); |
| | 224 | | try |
| | 225 | | { |
| 0 | 226 | | var response = RestClient.ListNextPage(nextLink, cancellationToken); |
| 0 | 227 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 228 | | } |
| 0 | 229 | | catch (Exception e) |
| | 230 | | { |
| 0 | 231 | | scope.Failed(e); |
| 0 | 232 | | throw; |
| | 233 | | } |
| 0 | 234 | | } |
| 2 | 235 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 236 | | } |
| | 237 | |
|
| | 238 | | /// <summary> Creates or updates a disk encryption set. </summary> |
| | 239 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 240 | | /// <param name="diskEncryptionSetName"> The name of the disk encryption set that is being created. The name can |
| | 241 | | /// <param name="diskEncryptionSet"> disk encryption set object supplied in the body of the Put disk encryption |
| | 242 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 243 | | public virtual async Task<DiskEncryptionSetsCreateOrUpdateOperation> StartCreateOrUpdateAsync(string resourceGro |
| | 244 | | { |
| 10 | 245 | | if (resourceGroupName == null) |
| | 246 | | { |
| 0 | 247 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 248 | | } |
| 10 | 249 | | if (diskEncryptionSetName == null) |
| | 250 | | { |
| 0 | 251 | | throw new ArgumentNullException(nameof(diskEncryptionSetName)); |
| | 252 | | } |
| 10 | 253 | | if (diskEncryptionSet == null) |
| | 254 | | { |
| 0 | 255 | | throw new ArgumentNullException(nameof(diskEncryptionSet)); |
| | 256 | | } |
| | 257 | |
|
| 10 | 258 | | using var scope = _clientDiagnostics.CreateScope("DiskEncryptionSetsOperations.StartCreateOrUpdate"); |
| 10 | 259 | | scope.Start(); |
| | 260 | | try |
| | 261 | | { |
| 10 | 262 | | var originalResponse = await RestClient.CreateOrUpdateAsync(resourceGroupName, diskEncryptionSetName, di |
| 10 | 263 | | return new DiskEncryptionSetsCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCre |
| | 264 | | } |
| 0 | 265 | | catch (Exception e) |
| | 266 | | { |
| 0 | 267 | | scope.Failed(e); |
| 0 | 268 | | throw; |
| | 269 | | } |
| 10 | 270 | | } |
| | 271 | |
|
| | 272 | | /// <summary> Creates or updates a disk encryption set. </summary> |
| | 273 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 274 | | /// <param name="diskEncryptionSetName"> The name of the disk encryption set that is being created. The name can |
| | 275 | | /// <param name="diskEncryptionSet"> disk encryption set object supplied in the body of the Put disk encryption |
| | 276 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 277 | | public virtual DiskEncryptionSetsCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string di |
| | 278 | | { |
| 10 | 279 | | if (resourceGroupName == null) |
| | 280 | | { |
| 0 | 281 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 282 | | } |
| 10 | 283 | | if (diskEncryptionSetName == null) |
| | 284 | | { |
| 0 | 285 | | throw new ArgumentNullException(nameof(diskEncryptionSetName)); |
| | 286 | | } |
| 10 | 287 | | if (diskEncryptionSet == null) |
| | 288 | | { |
| 0 | 289 | | throw new ArgumentNullException(nameof(diskEncryptionSet)); |
| | 290 | | } |
| | 291 | |
|
| 10 | 292 | | using var scope = _clientDiagnostics.CreateScope("DiskEncryptionSetsOperations.StartCreateOrUpdate"); |
| 10 | 293 | | scope.Start(); |
| | 294 | | try |
| | 295 | | { |
| 10 | 296 | | var originalResponse = RestClient.CreateOrUpdate(resourceGroupName, diskEncryptionSetName, diskEncryptio |
| 10 | 297 | | return new DiskEncryptionSetsCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCre |
| | 298 | | } |
| 0 | 299 | | catch (Exception e) |
| | 300 | | { |
| 0 | 301 | | scope.Failed(e); |
| 0 | 302 | | throw; |
| | 303 | | } |
| 10 | 304 | | } |
| | 305 | |
|
| | 306 | | /// <summary> Updates (patches) a disk encryption set. </summary> |
| | 307 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 308 | | /// <param name="diskEncryptionSetName"> The name of the disk encryption set that is being created. The name can |
| | 309 | | /// <param name="diskEncryptionSet"> disk encryption set object supplied in the body of the Patch disk encryptio |
| | 310 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 311 | | public virtual async Task<DiskEncryptionSetsUpdateOperation> StartUpdateAsync(string resourceGroupName, string d |
| | 312 | | { |
| 2 | 313 | | if (resourceGroupName == null) |
| | 314 | | { |
| 0 | 315 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 316 | | } |
| 2 | 317 | | if (diskEncryptionSetName == null) |
| | 318 | | { |
| 0 | 319 | | throw new ArgumentNullException(nameof(diskEncryptionSetName)); |
| | 320 | | } |
| 2 | 321 | | if (diskEncryptionSet == null) |
| | 322 | | { |
| 0 | 323 | | throw new ArgumentNullException(nameof(diskEncryptionSet)); |
| | 324 | | } |
| | 325 | |
|
| 2 | 326 | | using var scope = _clientDiagnostics.CreateScope("DiskEncryptionSetsOperations.StartUpdate"); |
| 2 | 327 | | scope.Start(); |
| | 328 | | try |
| | 329 | | { |
| 2 | 330 | | var originalResponse = await RestClient.UpdateAsync(resourceGroupName, diskEncryptionSetName, diskEncryp |
| 2 | 331 | | return new DiskEncryptionSetsUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateUpdateReque |
| | 332 | | } |
| 0 | 333 | | catch (Exception e) |
| | 334 | | { |
| 0 | 335 | | scope.Failed(e); |
| 0 | 336 | | throw; |
| | 337 | | } |
| 2 | 338 | | } |
| | 339 | |
|
| | 340 | | /// <summary> Updates (patches) a disk encryption set. </summary> |
| | 341 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 342 | | /// <param name="diskEncryptionSetName"> The name of the disk encryption set that is being created. The name can |
| | 343 | | /// <param name="diskEncryptionSet"> disk encryption set object supplied in the body of the Patch disk encryptio |
| | 344 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 345 | | public virtual DiskEncryptionSetsUpdateOperation StartUpdate(string resourceGroupName, string diskEncryptionSetN |
| | 346 | | { |
| 2 | 347 | | if (resourceGroupName == null) |
| | 348 | | { |
| 0 | 349 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 350 | | } |
| 2 | 351 | | if (diskEncryptionSetName == null) |
| | 352 | | { |
| 0 | 353 | | throw new ArgumentNullException(nameof(diskEncryptionSetName)); |
| | 354 | | } |
| 2 | 355 | | if (diskEncryptionSet == null) |
| | 356 | | { |
| 0 | 357 | | throw new ArgumentNullException(nameof(diskEncryptionSet)); |
| | 358 | | } |
| | 359 | |
|
| 2 | 360 | | using var scope = _clientDiagnostics.CreateScope("DiskEncryptionSetsOperations.StartUpdate"); |
| 2 | 361 | | scope.Start(); |
| | 362 | | try |
| | 363 | | { |
| 2 | 364 | | var originalResponse = RestClient.Update(resourceGroupName, diskEncryptionSetName, diskEncryptionSet, ca |
| 2 | 365 | | return new DiskEncryptionSetsUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateUpdateReque |
| | 366 | | } |
| 0 | 367 | | catch (Exception e) |
| | 368 | | { |
| 0 | 369 | | scope.Failed(e); |
| 0 | 370 | | throw; |
| | 371 | | } |
| 2 | 372 | | } |
| | 373 | |
|
| | 374 | | /// <summary> Deletes a disk encryption set. </summary> |
| | 375 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 376 | | /// <param name="diskEncryptionSetName"> The name of the disk encryption set that is being created. The name can |
| | 377 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 378 | | public virtual async Task<DiskEncryptionSetsDeleteOperation> StartDeleteAsync(string resourceGroupName, string d |
| | 379 | | { |
| 10 | 380 | | if (resourceGroupName == null) |
| | 381 | | { |
| 0 | 382 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 383 | | } |
| 10 | 384 | | if (diskEncryptionSetName == null) |
| | 385 | | { |
| 0 | 386 | | throw new ArgumentNullException(nameof(diskEncryptionSetName)); |
| | 387 | | } |
| | 388 | |
|
| 10 | 389 | | using var scope = _clientDiagnostics.CreateScope("DiskEncryptionSetsOperations.StartDelete"); |
| 10 | 390 | | scope.Start(); |
| | 391 | | try |
| | 392 | | { |
| 10 | 393 | | var originalResponse = await RestClient.DeleteAsync(resourceGroupName, diskEncryptionSetName, cancellati |
| 10 | 394 | | return new DiskEncryptionSetsDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteReque |
| | 395 | | } |
| 0 | 396 | | catch (Exception e) |
| | 397 | | { |
| 0 | 398 | | scope.Failed(e); |
| 0 | 399 | | throw; |
| | 400 | | } |
| 10 | 401 | | } |
| | 402 | |
|
| | 403 | | /// <summary> Deletes a disk encryption set. </summary> |
| | 404 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | 405 | | /// <param name="diskEncryptionSetName"> The name of the disk encryption set that is being created. The name can |
| | 406 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 407 | | public virtual DiskEncryptionSetsDeleteOperation StartDelete(string resourceGroupName, string diskEncryptionSetN |
| | 408 | | { |
| 10 | 409 | | if (resourceGroupName == null) |
| | 410 | | { |
| 0 | 411 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 412 | | } |
| 10 | 413 | | if (diskEncryptionSetName == null) |
| | 414 | | { |
| 0 | 415 | | throw new ArgumentNullException(nameof(diskEncryptionSetName)); |
| | 416 | | } |
| | 417 | |
|
| 10 | 418 | | using var scope = _clientDiagnostics.CreateScope("DiskEncryptionSetsOperations.StartDelete"); |
| 10 | 419 | | scope.Start(); |
| | 420 | | try |
| | 421 | | { |
| 10 | 422 | | var originalResponse = RestClient.Delete(resourceGroupName, diskEncryptionSetName, cancellationToken); |
| 10 | 423 | | return new DiskEncryptionSetsDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteReque |
| | 424 | | } |
| 0 | 425 | | catch (Exception e) |
| | 426 | | { |
| 0 | 427 | | scope.Failed(e); |
| 0 | 428 | | throw; |
| | 429 | | } |
| 10 | 430 | | } |
| | 431 | | } |
| | 432 | | } |