| | 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.Resources.Models; |
| | 15 | |
|
| | 16 | | namespace Azure.ResourceManager.Resources |
| | 17 | | { |
| | 18 | | /// <summary> The Deployment service client. </summary> |
| | 19 | | public partial class DeploymentOperations |
| | 20 | | { |
| | 21 | | private readonly ClientDiagnostics _clientDiagnostics; |
| | 22 | | private readonly HttpPipeline _pipeline; |
| 32 | 23 | | internal DeploymentRestOperations RestClient { get; } |
| | 24 | | /// <summary> Initializes a new instance of DeploymentOperations for mocking. </summary> |
| 272 | 25 | | protected DeploymentOperations() |
| | 26 | | { |
| 272 | 27 | | } |
| | 28 | | /// <summary> Initializes a new instance of DeploymentOperations. </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 ID of the target subscription. </param> |
| | 32 | | /// <param name="endpoint"> server parameter. </param> |
| 272 | 33 | | internal DeploymentOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, |
| | 34 | | { |
| 272 | 35 | | RestClient = new DeploymentRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint); |
| 272 | 36 | | _clientDiagnostics = clientDiagnostics; |
| 272 | 37 | | _pipeline = pipeline; |
| 272 | 38 | | } |
| | 39 | |
|
| | 40 | | /// <summary> Gets a deployments operation. </summary> |
| | 41 | | /// <param name="scope"> The resource scope. </param> |
| | 42 | | /// <param name="deploymentName"> The name of the deployment. </param> |
| | 43 | | /// <param name="operationId"> The ID of the operation to get. </param> |
| | 44 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 45 | | public virtual async Task<Response<DeploymentOperation>> GetAtScopeAsync(string scope, string deploymentName, st |
| | 46 | | { |
| 0 | 47 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.GetAtScope"); |
| 0 | 48 | | scope0.Start(); |
| | 49 | | try |
| | 50 | | { |
| 0 | 51 | | return await RestClient.GetAtScopeAsync(scope, deploymentName, operationId, cancellationToken).Configure |
| | 52 | | } |
| 0 | 53 | | catch (Exception e) |
| | 54 | | { |
| 0 | 55 | | scope0.Failed(e); |
| 0 | 56 | | throw; |
| | 57 | | } |
| 0 | 58 | | } |
| | 59 | |
|
| | 60 | | /// <summary> Gets a deployments operation. </summary> |
| | 61 | | /// <param name="scope"> The resource scope. </param> |
| | 62 | | /// <param name="deploymentName"> The name of the deployment. </param> |
| | 63 | | /// <param name="operationId"> The ID of the operation to get. </param> |
| | 64 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 65 | | public virtual Response<DeploymentOperation> GetAtScope(string scope, string deploymentName, string operationId, |
| | 66 | | { |
| 0 | 67 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.GetAtScope"); |
| 0 | 68 | | scope0.Start(); |
| | 69 | | try |
| | 70 | | { |
| 0 | 71 | | return RestClient.GetAtScope(scope, deploymentName, operationId, cancellationToken); |
| | 72 | | } |
| 0 | 73 | | catch (Exception e) |
| | 74 | | { |
| 0 | 75 | | scope0.Failed(e); |
| 0 | 76 | | throw; |
| | 77 | | } |
| 0 | 78 | | } |
| | 79 | |
|
| | 80 | | /// <summary> Gets a deployments operation. </summary> |
| | 81 | | /// <param name="deploymentName"> The name of the deployment. </param> |
| | 82 | | /// <param name="operationId"> The ID of the operation to get. </param> |
| | 83 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 84 | | public virtual async Task<Response<DeploymentOperation>> GetAtTenantScopeAsync(string deploymentName, string ope |
| | 85 | | { |
| 0 | 86 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.GetAtTenantScope"); |
| 0 | 87 | | scope0.Start(); |
| | 88 | | try |
| | 89 | | { |
| 0 | 90 | | return await RestClient.GetAtTenantScopeAsync(deploymentName, operationId, cancellationToken).ConfigureA |
| | 91 | | } |
| 0 | 92 | | catch (Exception e) |
| | 93 | | { |
| 0 | 94 | | scope0.Failed(e); |
| 0 | 95 | | throw; |
| | 96 | | } |
| 0 | 97 | | } |
| | 98 | |
|
| | 99 | | /// <summary> Gets a deployments operation. </summary> |
| | 100 | | /// <param name="deploymentName"> The name of the deployment. </param> |
| | 101 | | /// <param name="operationId"> The ID of the operation to get. </param> |
| | 102 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 103 | | public virtual Response<DeploymentOperation> GetAtTenantScope(string deploymentName, string operationId, Cancell |
| | 104 | | { |
| 0 | 105 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.GetAtTenantScope"); |
| 0 | 106 | | scope0.Start(); |
| | 107 | | try |
| | 108 | | { |
| 0 | 109 | | return RestClient.GetAtTenantScope(deploymentName, operationId, cancellationToken); |
| | 110 | | } |
| 0 | 111 | | catch (Exception e) |
| | 112 | | { |
| 0 | 113 | | scope0.Failed(e); |
| 0 | 114 | | throw; |
| | 115 | | } |
| 0 | 116 | | } |
| | 117 | |
|
| | 118 | | /// <summary> Gets a deployments operation. </summary> |
| | 119 | | /// <param name="groupId"> The management group ID. </param> |
| | 120 | | /// <param name="deploymentName"> The name of the deployment. </param> |
| | 121 | | /// <param name="operationId"> The ID of the operation to get. </param> |
| | 122 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 123 | | public virtual async Task<Response<DeploymentOperation>> GetAtManagementGroupScopeAsync(string groupId, string d |
| | 124 | | { |
| 0 | 125 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.GetAtManagementGroupScope"); |
| 0 | 126 | | scope0.Start(); |
| | 127 | | try |
| | 128 | | { |
| 0 | 129 | | return await RestClient.GetAtManagementGroupScopeAsync(groupId, deploymentName, operationId, cancellatio |
| | 130 | | } |
| 0 | 131 | | catch (Exception e) |
| | 132 | | { |
| 0 | 133 | | scope0.Failed(e); |
| 0 | 134 | | throw; |
| | 135 | | } |
| 0 | 136 | | } |
| | 137 | |
|
| | 138 | | /// <summary> Gets a deployments operation. </summary> |
| | 139 | | /// <param name="groupId"> The management group ID. </param> |
| | 140 | | /// <param name="deploymentName"> The name of the deployment. </param> |
| | 141 | | /// <param name="operationId"> The ID of the operation to get. </param> |
| | 142 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 143 | | public virtual Response<DeploymentOperation> GetAtManagementGroupScope(string groupId, string deploymentName, st |
| | 144 | | { |
| 0 | 145 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.GetAtManagementGroupScope"); |
| 0 | 146 | | scope0.Start(); |
| | 147 | | try |
| | 148 | | { |
| 0 | 149 | | return RestClient.GetAtManagementGroupScope(groupId, deploymentName, operationId, cancellationToken); |
| | 150 | | } |
| 0 | 151 | | catch (Exception e) |
| | 152 | | { |
| 0 | 153 | | scope0.Failed(e); |
| 0 | 154 | | throw; |
| | 155 | | } |
| 0 | 156 | | } |
| | 157 | |
|
| | 158 | | /// <summary> Gets a deployments operation. </summary> |
| | 159 | | /// <param name="deploymentName"> The name of the deployment. </param> |
| | 160 | | /// <param name="operationId"> The ID of the operation to get. </param> |
| | 161 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 162 | | public virtual async Task<Response<DeploymentOperation>> GetAtSubscriptionScopeAsync(string deploymentName, stri |
| | 163 | | { |
| 0 | 164 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.GetAtSubscriptionScope"); |
| 0 | 165 | | scope0.Start(); |
| | 166 | | try |
| | 167 | | { |
| 0 | 168 | | return await RestClient.GetAtSubscriptionScopeAsync(deploymentName, operationId, cancellationToken).Conf |
| | 169 | | } |
| 0 | 170 | | catch (Exception e) |
| | 171 | | { |
| 0 | 172 | | scope0.Failed(e); |
| 0 | 173 | | throw; |
| | 174 | | } |
| 0 | 175 | | } |
| | 176 | |
|
| | 177 | | /// <summary> Gets a deployments operation. </summary> |
| | 178 | | /// <param name="deploymentName"> The name of the deployment. </param> |
| | 179 | | /// <param name="operationId"> The ID of the operation to get. </param> |
| | 180 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 181 | | public virtual Response<DeploymentOperation> GetAtSubscriptionScope(string deploymentName, string operationId, C |
| | 182 | | { |
| 0 | 183 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.GetAtSubscriptionScope"); |
| 0 | 184 | | scope0.Start(); |
| | 185 | | try |
| | 186 | | { |
| 0 | 187 | | return RestClient.GetAtSubscriptionScope(deploymentName, operationId, cancellationToken); |
| | 188 | | } |
| 0 | 189 | | catch (Exception e) |
| | 190 | | { |
| 0 | 191 | | scope0.Failed(e); |
| 0 | 192 | | throw; |
| | 193 | | } |
| 0 | 194 | | } |
| | 195 | |
|
| | 196 | | /// <summary> Gets a deployments operation. </summary> |
| | 197 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 198 | | /// <param name="deploymentName"> The name of the deployment. </param> |
| | 199 | | /// <param name="operationId"> The ID of the operation to get. </param> |
| | 200 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 201 | | public virtual async Task<Response<DeploymentOperation>> GetAsync(string resourceGroupName, string deploymentNam |
| | 202 | | { |
| 2 | 203 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.Get"); |
| 2 | 204 | | scope0.Start(); |
| | 205 | | try |
| | 206 | | { |
| 2 | 207 | | return await RestClient.GetAsync(resourceGroupName, deploymentName, operationId, cancellationToken).Conf |
| | 208 | | } |
| 0 | 209 | | catch (Exception e) |
| | 210 | | { |
| 0 | 211 | | scope0.Failed(e); |
| 0 | 212 | | throw; |
| | 213 | | } |
| 2 | 214 | | } |
| | 215 | |
|
| | 216 | | /// <summary> Gets a deployments operation. </summary> |
| | 217 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 218 | | /// <param name="deploymentName"> The name of the deployment. </param> |
| | 219 | | /// <param name="operationId"> The ID of the operation to get. </param> |
| | 220 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 221 | | public virtual Response<DeploymentOperation> Get(string resourceGroupName, string deploymentName, string operati |
| | 222 | | { |
| 2 | 223 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.Get"); |
| 2 | 224 | | scope0.Start(); |
| | 225 | | try |
| | 226 | | { |
| 2 | 227 | | return RestClient.Get(resourceGroupName, deploymentName, operationId, cancellationToken); |
| | 228 | | } |
| 0 | 229 | | catch (Exception e) |
| | 230 | | { |
| 0 | 231 | | scope0.Failed(e); |
| 0 | 232 | | throw; |
| | 233 | | } |
| 2 | 234 | | } |
| | 235 | |
|
| | 236 | | /// <summary> Gets all deployments operations for a deployment. </summary> |
| | 237 | | /// <param name="scope"> The resource scope. </param> |
| | 238 | | /// <param name="deploymentName"> The name of the deployment. </param> |
| | 239 | | /// <param name="top"> The number of results to return. </param> |
| | 240 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 241 | | public virtual AsyncPageable<DeploymentOperation> ListAtScopeAsync(string scope, string deploymentName, int? top |
| | 242 | | { |
| 6 | 243 | | if (scope == null) |
| | 244 | | { |
| 0 | 245 | | throw new ArgumentNullException(nameof(scope)); |
| | 246 | | } |
| 6 | 247 | | if (deploymentName == null) |
| | 248 | | { |
| 0 | 249 | | throw new ArgumentNullException(nameof(deploymentName)); |
| | 250 | | } |
| | 251 | |
|
| | 252 | | async Task<Page<DeploymentOperation>> FirstPageFunc(int? pageSizeHint) |
| | 253 | | { |
| 6 | 254 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtScope"); |
| 6 | 255 | | scope0.Start(); |
| | 256 | | try |
| | 257 | | { |
| 6 | 258 | | var response = await RestClient.ListAtScopeAsync(scope, deploymentName, top, cancellationToken).Conf |
| 6 | 259 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 260 | | } |
| 0 | 261 | | catch (Exception e) |
| | 262 | | { |
| 0 | 263 | | scope0.Failed(e); |
| 0 | 264 | | throw; |
| | 265 | | } |
| 6 | 266 | | } |
| | 267 | | async Task<Page<DeploymentOperation>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 268 | | { |
| 0 | 269 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtScope"); |
| 0 | 270 | | scope0.Start(); |
| | 271 | | try |
| | 272 | | { |
| 0 | 273 | | var response = await RestClient.ListAtScopeNextPageAsync(nextLink, scope, deploymentName, top, cance |
| 0 | 274 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 275 | | } |
| 0 | 276 | | catch (Exception e) |
| | 277 | | { |
| 0 | 278 | | scope0.Failed(e); |
| 0 | 279 | | throw; |
| | 280 | | } |
| 0 | 281 | | } |
| 6 | 282 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 283 | | } |
| | 284 | |
|
| | 285 | | /// <summary> Gets all deployments operations for a deployment. </summary> |
| | 286 | | /// <param name="scope"> The resource scope. </param> |
| | 287 | | /// <param name="deploymentName"> The name of the deployment. </param> |
| | 288 | | /// <param name="top"> The number of results to return. </param> |
| | 289 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 290 | | public virtual Pageable<DeploymentOperation> ListAtScope(string scope, string deploymentName, int? top = null, C |
| | 291 | | { |
| 6 | 292 | | if (scope == null) |
| | 293 | | { |
| 0 | 294 | | throw new ArgumentNullException(nameof(scope)); |
| | 295 | | } |
| 6 | 296 | | if (deploymentName == null) |
| | 297 | | { |
| 0 | 298 | | throw new ArgumentNullException(nameof(deploymentName)); |
| | 299 | | } |
| | 300 | |
|
| | 301 | | Page<DeploymentOperation> FirstPageFunc(int? pageSizeHint) |
| | 302 | | { |
| 6 | 303 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtScope"); |
| 6 | 304 | | scope0.Start(); |
| | 305 | | try |
| | 306 | | { |
| 6 | 307 | | var response = RestClient.ListAtScope(scope, deploymentName, top, cancellationToken); |
| 6 | 308 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 309 | | } |
| 0 | 310 | | catch (Exception e) |
| | 311 | | { |
| 0 | 312 | | scope0.Failed(e); |
| 0 | 313 | | throw; |
| | 314 | | } |
| 6 | 315 | | } |
| | 316 | | Page<DeploymentOperation> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 317 | | { |
| 0 | 318 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtScope"); |
| 0 | 319 | | scope0.Start(); |
| | 320 | | try |
| | 321 | | { |
| 0 | 322 | | var response = RestClient.ListAtScopeNextPage(nextLink, scope, deploymentName, top, cancellationToke |
| 0 | 323 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 324 | | } |
| 0 | 325 | | catch (Exception e) |
| | 326 | | { |
| 0 | 327 | | scope0.Failed(e); |
| 0 | 328 | | throw; |
| | 329 | | } |
| 0 | 330 | | } |
| 6 | 331 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 332 | | } |
| | 333 | |
|
| | 334 | | /// <summary> Gets all deployments operations for a deployment. </summary> |
| | 335 | | /// <param name="deploymentName"> The name of the deployment. </param> |
| | 336 | | /// <param name="top"> The number of results to return. </param> |
| | 337 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 338 | | public virtual AsyncPageable<DeploymentOperation> ListAtTenantScopeAsync(string deploymentName, int? top = null, |
| | 339 | | { |
| 0 | 340 | | if (deploymentName == null) |
| | 341 | | { |
| 0 | 342 | | throw new ArgumentNullException(nameof(deploymentName)); |
| | 343 | | } |
| | 344 | |
|
| | 345 | | async Task<Page<DeploymentOperation>> FirstPageFunc(int? pageSizeHint) |
| | 346 | | { |
| 0 | 347 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtTenantScope"); |
| 0 | 348 | | scope0.Start(); |
| | 349 | | try |
| | 350 | | { |
| 0 | 351 | | var response = await RestClient.ListAtTenantScopeAsync(deploymentName, top, cancellationToken).Confi |
| 0 | 352 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 353 | | } |
| 0 | 354 | | catch (Exception e) |
| | 355 | | { |
| 0 | 356 | | scope0.Failed(e); |
| 0 | 357 | | throw; |
| | 358 | | } |
| 0 | 359 | | } |
| | 360 | | async Task<Page<DeploymentOperation>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 361 | | { |
| 0 | 362 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtTenantScope"); |
| 0 | 363 | | scope0.Start(); |
| | 364 | | try |
| | 365 | | { |
| 0 | 366 | | var response = await RestClient.ListAtTenantScopeNextPageAsync(nextLink, deploymentName, top, cancel |
| 0 | 367 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 368 | | } |
| 0 | 369 | | catch (Exception e) |
| | 370 | | { |
| 0 | 371 | | scope0.Failed(e); |
| 0 | 372 | | throw; |
| | 373 | | } |
| 0 | 374 | | } |
| 0 | 375 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 376 | | } |
| | 377 | |
|
| | 378 | | /// <summary> Gets all deployments operations for a deployment. </summary> |
| | 379 | | /// <param name="deploymentName"> The name of the deployment. </param> |
| | 380 | | /// <param name="top"> The number of results to return. </param> |
| | 381 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 382 | | public virtual Pageable<DeploymentOperation> ListAtTenantScope(string deploymentName, int? top = null, Cancellat |
| | 383 | | { |
| 0 | 384 | | if (deploymentName == null) |
| | 385 | | { |
| 0 | 386 | | throw new ArgumentNullException(nameof(deploymentName)); |
| | 387 | | } |
| | 388 | |
|
| | 389 | | Page<DeploymentOperation> FirstPageFunc(int? pageSizeHint) |
| | 390 | | { |
| 0 | 391 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtTenantScope"); |
| 0 | 392 | | scope0.Start(); |
| | 393 | | try |
| | 394 | | { |
| 0 | 395 | | var response = RestClient.ListAtTenantScope(deploymentName, top, cancellationToken); |
| 0 | 396 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 397 | | } |
| 0 | 398 | | catch (Exception e) |
| | 399 | | { |
| 0 | 400 | | scope0.Failed(e); |
| 0 | 401 | | throw; |
| | 402 | | } |
| 0 | 403 | | } |
| | 404 | | Page<DeploymentOperation> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 405 | | { |
| 0 | 406 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtTenantScope"); |
| 0 | 407 | | scope0.Start(); |
| | 408 | | try |
| | 409 | | { |
| 0 | 410 | | var response = RestClient.ListAtTenantScopeNextPage(nextLink, deploymentName, top, cancellationToken |
| 0 | 411 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 412 | | } |
| 0 | 413 | | catch (Exception e) |
| | 414 | | { |
| 0 | 415 | | scope0.Failed(e); |
| 0 | 416 | | throw; |
| | 417 | | } |
| 0 | 418 | | } |
| 0 | 419 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 420 | | } |
| | 421 | |
|
| | 422 | | /// <summary> Gets all deployments operations for a deployment. </summary> |
| | 423 | | /// <param name="groupId"> The management group ID. </param> |
| | 424 | | /// <param name="deploymentName"> The name of the deployment. </param> |
| | 425 | | /// <param name="top"> The number of results to return. </param> |
| | 426 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 427 | | public virtual AsyncPageable<DeploymentOperation> ListAtManagementGroupScopeAsync(string groupId, string deploym |
| | 428 | | { |
| 0 | 429 | | if (groupId == null) |
| | 430 | | { |
| 0 | 431 | | throw new ArgumentNullException(nameof(groupId)); |
| | 432 | | } |
| 0 | 433 | | if (deploymentName == null) |
| | 434 | | { |
| 0 | 435 | | throw new ArgumentNullException(nameof(deploymentName)); |
| | 436 | | } |
| | 437 | |
|
| | 438 | | async Task<Page<DeploymentOperation>> FirstPageFunc(int? pageSizeHint) |
| | 439 | | { |
| 0 | 440 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtManagementGroupScope"); |
| 0 | 441 | | scope0.Start(); |
| | 442 | | try |
| | 443 | | { |
| 0 | 444 | | var response = await RestClient.ListAtManagementGroupScopeAsync(groupId, deploymentName, top, cancel |
| 0 | 445 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 446 | | } |
| 0 | 447 | | catch (Exception e) |
| | 448 | | { |
| 0 | 449 | | scope0.Failed(e); |
| 0 | 450 | | throw; |
| | 451 | | } |
| 0 | 452 | | } |
| | 453 | | async Task<Page<DeploymentOperation>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 454 | | { |
| 0 | 455 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtManagementGroupScope"); |
| 0 | 456 | | scope0.Start(); |
| | 457 | | try |
| | 458 | | { |
| 0 | 459 | | var response = await RestClient.ListAtManagementGroupScopeNextPageAsync(nextLink, groupId, deploymen |
| 0 | 460 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 461 | | } |
| 0 | 462 | | catch (Exception e) |
| | 463 | | { |
| 0 | 464 | | scope0.Failed(e); |
| 0 | 465 | | throw; |
| | 466 | | } |
| 0 | 467 | | } |
| 0 | 468 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 469 | | } |
| | 470 | |
|
| | 471 | | /// <summary> Gets all deployments operations for a deployment. </summary> |
| | 472 | | /// <param name="groupId"> The management group ID. </param> |
| | 473 | | /// <param name="deploymentName"> The name of the deployment. </param> |
| | 474 | | /// <param name="top"> The number of results to return. </param> |
| | 475 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 476 | | public virtual Pageable<DeploymentOperation> ListAtManagementGroupScope(string groupId, string deploymentName, i |
| | 477 | | { |
| 0 | 478 | | if (groupId == null) |
| | 479 | | { |
| 0 | 480 | | throw new ArgumentNullException(nameof(groupId)); |
| | 481 | | } |
| 0 | 482 | | if (deploymentName == null) |
| | 483 | | { |
| 0 | 484 | | throw new ArgumentNullException(nameof(deploymentName)); |
| | 485 | | } |
| | 486 | |
|
| | 487 | | Page<DeploymentOperation> FirstPageFunc(int? pageSizeHint) |
| | 488 | | { |
| 0 | 489 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtManagementGroupScope"); |
| 0 | 490 | | scope0.Start(); |
| | 491 | | try |
| | 492 | | { |
| 0 | 493 | | var response = RestClient.ListAtManagementGroupScope(groupId, deploymentName, top, cancellationToken |
| 0 | 494 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 495 | | } |
| 0 | 496 | | catch (Exception e) |
| | 497 | | { |
| 0 | 498 | | scope0.Failed(e); |
| 0 | 499 | | throw; |
| | 500 | | } |
| 0 | 501 | | } |
| | 502 | | Page<DeploymentOperation> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 503 | | { |
| 0 | 504 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtManagementGroupScope"); |
| 0 | 505 | | scope0.Start(); |
| | 506 | | try |
| | 507 | | { |
| 0 | 508 | | var response = RestClient.ListAtManagementGroupScopeNextPage(nextLink, groupId, deploymentName, top, |
| 0 | 509 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 510 | | } |
| 0 | 511 | | catch (Exception e) |
| | 512 | | { |
| 0 | 513 | | scope0.Failed(e); |
| 0 | 514 | | throw; |
| | 515 | | } |
| 0 | 516 | | } |
| 0 | 517 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 518 | | } |
| | 519 | |
|
| | 520 | | /// <summary> Gets all deployments operations for a deployment. </summary> |
| | 521 | | /// <param name="deploymentName"> The name of the deployment. </param> |
| | 522 | | /// <param name="top"> The number of results to return. </param> |
| | 523 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 524 | | public virtual AsyncPageable<DeploymentOperation> ListAtSubscriptionScopeAsync(string deploymentName, int? top = |
| | 525 | | { |
| 0 | 526 | | if (deploymentName == null) |
| | 527 | | { |
| 0 | 528 | | throw new ArgumentNullException(nameof(deploymentName)); |
| | 529 | | } |
| | 530 | |
|
| | 531 | | async Task<Page<DeploymentOperation>> FirstPageFunc(int? pageSizeHint) |
| | 532 | | { |
| 0 | 533 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtSubscriptionScope"); |
| 0 | 534 | | scope0.Start(); |
| | 535 | | try |
| | 536 | | { |
| 0 | 537 | | var response = await RestClient.ListAtSubscriptionScopeAsync(deploymentName, top, cancellationToken) |
| 0 | 538 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 539 | | } |
| 0 | 540 | | catch (Exception e) |
| | 541 | | { |
| 0 | 542 | | scope0.Failed(e); |
| 0 | 543 | | throw; |
| | 544 | | } |
| 0 | 545 | | } |
| | 546 | | async Task<Page<DeploymentOperation>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 547 | | { |
| 0 | 548 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtSubscriptionScope"); |
| 0 | 549 | | scope0.Start(); |
| | 550 | | try |
| | 551 | | { |
| 0 | 552 | | var response = await RestClient.ListAtSubscriptionScopeNextPageAsync(nextLink, deploymentName, top, |
| 0 | 553 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 554 | | } |
| 0 | 555 | | catch (Exception e) |
| | 556 | | { |
| 0 | 557 | | scope0.Failed(e); |
| 0 | 558 | | throw; |
| | 559 | | } |
| 0 | 560 | | } |
| 0 | 561 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 562 | | } |
| | 563 | |
|
| | 564 | | /// <summary> Gets all deployments operations for a deployment. </summary> |
| | 565 | | /// <param name="deploymentName"> The name of the deployment. </param> |
| | 566 | | /// <param name="top"> The number of results to return. </param> |
| | 567 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 568 | | public virtual Pageable<DeploymentOperation> ListAtSubscriptionScope(string deploymentName, int? top = null, Can |
| | 569 | | { |
| 0 | 570 | | if (deploymentName == null) |
| | 571 | | { |
| 0 | 572 | | throw new ArgumentNullException(nameof(deploymentName)); |
| | 573 | | } |
| | 574 | |
|
| | 575 | | Page<DeploymentOperation> FirstPageFunc(int? pageSizeHint) |
| | 576 | | { |
| 0 | 577 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtSubscriptionScope"); |
| 0 | 578 | | scope0.Start(); |
| | 579 | | try |
| | 580 | | { |
| 0 | 581 | | var response = RestClient.ListAtSubscriptionScope(deploymentName, top, cancellationToken); |
| 0 | 582 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 583 | | } |
| 0 | 584 | | catch (Exception e) |
| | 585 | | { |
| 0 | 586 | | scope0.Failed(e); |
| 0 | 587 | | throw; |
| | 588 | | } |
| 0 | 589 | | } |
| | 590 | | Page<DeploymentOperation> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 591 | | { |
| 0 | 592 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtSubscriptionScope"); |
| 0 | 593 | | scope0.Start(); |
| | 594 | | try |
| | 595 | | { |
| 0 | 596 | | var response = RestClient.ListAtSubscriptionScopeNextPage(nextLink, deploymentName, top, cancellatio |
| 0 | 597 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 598 | | } |
| 0 | 599 | | catch (Exception e) |
| | 600 | | { |
| 0 | 601 | | scope0.Failed(e); |
| 0 | 602 | | throw; |
| | 603 | | } |
| 0 | 604 | | } |
| 0 | 605 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 606 | | } |
| | 607 | |
|
| | 608 | | /// <summary> Gets all deployments operations for a deployment. </summary> |
| | 609 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 610 | | /// <param name="deploymentName"> The name of the deployment. </param> |
| | 611 | | /// <param name="top"> The number of results to return. </param> |
| | 612 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 613 | | public virtual AsyncPageable<DeploymentOperation> ListAsync(string resourceGroupName, string deploymentName, int |
| | 614 | | { |
| 8 | 615 | | if (resourceGroupName == null) |
| | 616 | | { |
| 0 | 617 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 618 | | } |
| 8 | 619 | | if (deploymentName == null) |
| | 620 | | { |
| 0 | 621 | | throw new ArgumentNullException(nameof(deploymentName)); |
| | 622 | | } |
| | 623 | |
|
| | 624 | | async Task<Page<DeploymentOperation>> FirstPageFunc(int? pageSizeHint) |
| | 625 | | { |
| 8 | 626 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.List"); |
| 8 | 627 | | scope0.Start(); |
| | 628 | | try |
| | 629 | | { |
| 8 | 630 | | var response = await RestClient.ListAsync(resourceGroupName, deploymentName, top, cancellationToken) |
| 8 | 631 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 632 | | } |
| 0 | 633 | | catch (Exception e) |
| | 634 | | { |
| 0 | 635 | | scope0.Failed(e); |
| 0 | 636 | | throw; |
| | 637 | | } |
| 8 | 638 | | } |
| | 639 | | async Task<Page<DeploymentOperation>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 640 | | { |
| 0 | 641 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.List"); |
| 0 | 642 | | scope0.Start(); |
| | 643 | | try |
| | 644 | | { |
| 0 | 645 | | var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, deploymentName, top, |
| 0 | 646 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 647 | | } |
| 0 | 648 | | catch (Exception e) |
| | 649 | | { |
| 0 | 650 | | scope0.Failed(e); |
| 0 | 651 | | throw; |
| | 652 | | } |
| 0 | 653 | | } |
| 8 | 654 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 655 | | } |
| | 656 | |
|
| | 657 | | /// <summary> Gets all deployments operations for a deployment. </summary> |
| | 658 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 659 | | /// <param name="deploymentName"> The name of the deployment. </param> |
| | 660 | | /// <param name="top"> The number of results to return. </param> |
| | 661 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 662 | | public virtual Pageable<DeploymentOperation> List(string resourceGroupName, string deploymentName, int? top = nu |
| | 663 | | { |
| 8 | 664 | | if (resourceGroupName == null) |
| | 665 | | { |
| 0 | 666 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 667 | | } |
| 8 | 668 | | if (deploymentName == null) |
| | 669 | | { |
| 0 | 670 | | throw new ArgumentNullException(nameof(deploymentName)); |
| | 671 | | } |
| | 672 | |
|
| | 673 | | Page<DeploymentOperation> FirstPageFunc(int? pageSizeHint) |
| | 674 | | { |
| 8 | 675 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.List"); |
| 8 | 676 | | scope0.Start(); |
| | 677 | | try |
| | 678 | | { |
| 8 | 679 | | var response = RestClient.List(resourceGroupName, deploymentName, top, cancellationToken); |
| 8 | 680 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 681 | | } |
| 0 | 682 | | catch (Exception e) |
| | 683 | | { |
| 0 | 684 | | scope0.Failed(e); |
| 0 | 685 | | throw; |
| | 686 | | } |
| 8 | 687 | | } |
| | 688 | | Page<DeploymentOperation> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 689 | | { |
| 0 | 690 | | using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.List"); |
| 0 | 691 | | scope0.Start(); |
| | 692 | | try |
| | 693 | | { |
| 0 | 694 | | var response = RestClient.ListNextPage(nextLink, resourceGroupName, deploymentName, top, cancellatio |
| 0 | 695 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 696 | | } |
| 0 | 697 | | catch (Exception e) |
| | 698 | | { |
| 0 | 699 | | scope0.Failed(e); |
| 0 | 700 | | throw; |
| | 701 | | } |
| 0 | 702 | | } |
| 8 | 703 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 704 | | } |
| | 705 | | } |
| | 706 | | } |