< Summary

Class:Azure.ResourceManager.Resources.DeploymentsOperations
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\DeploymentsOperations.cs
Covered lines:222
Uncovered lines:690
Coverable lines:912
Total lines:2282
Line coverage:24.3% (222 of 912)
Covered branches:56
Total branches:168
Branch coverage:33.3% (56 of 168)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_RestClient()-100%100%
.ctor()-100%100%
.ctor(...)-100%100%
CheckExistenceAtScopeAsync()-0%100%
CheckExistenceAtScope(...)-0%100%
GetAtScopeAsync()-57.14%100%
GetAtScope(...)-57.14%100%
CancelAtScopeAsync()-0%100%
CancelAtScope(...)-0%100%
ExportTemplateAtScopeAsync()-0%100%
ExportTemplateAtScope(...)-0%100%
CheckExistenceAtTenantScopeAsync()-0%100%
CheckExistenceAtTenantScope(...)-0%100%
GetAtTenantScopeAsync()-0%100%
GetAtTenantScope(...)-0%100%
CancelAtTenantScopeAsync()-0%100%
CancelAtTenantScope(...)-0%100%
ExportTemplateAtTenantScopeAsync()-0%100%
ExportTemplateAtTenantScope(...)-0%100%
CheckExistenceAtManagementGroupScopeAsync()-0%100%
CheckExistenceAtManagementGroupScope(...)-0%100%
GetAtManagementGroupScopeAsync()-57.14%100%
GetAtManagementGroupScope(...)-57.14%100%
CancelAtManagementGroupScopeAsync()-0%100%
CancelAtManagementGroupScope(...)-0%100%
ExportTemplateAtManagementGroupScopeAsync()-0%100%
ExportTemplateAtManagementGroupScope(...)-0%100%
CheckExistenceAtSubscriptionScopeAsync()-0%100%
CheckExistenceAtSubscriptionScope(...)-0%100%
GetAtSubscriptionScopeAsync()-57.14%100%
GetAtSubscriptionScope(...)-57.14%100%
CancelAtSubscriptionScopeAsync()-0%100%
CancelAtSubscriptionScope(...)-0%100%
ExportTemplateAtSubscriptionScopeAsync()-0%100%
ExportTemplateAtSubscriptionScope(...)-0%100%
CheckExistenceAsync()-0%100%
CheckExistence(...)-0%100%
GetAsync()-57.14%100%
Get(...)-57.14%100%
CancelAsync()-100%100%
Cancel(...)-100%100%
ExportTemplateAsync()-0%100%
ExportTemplate(...)-0%100%
CalculateTemplateHashAsync()-0%100%
CalculateTemplateHash(...)-0%100%
ListAtScopeAsync(...)-0%0%
<ListAtScopeAsync()-0%100%
<ListAtScopeAsync()-0%100%
ListAtScope(...)-0%0%
<ListAtTenantScopeAsync()-0%100%
<ListAtTenantScopeAsync()-0%100%
ListAtTenantScopeAsync(...)-0%100%
ListAtTenantScope(...)-0%100%
ListAtManagementGroupScopeAsync(...)-0%0%
<ListAtManagementGroupScopeAsync()-0%100%
<ListAtManagementGroupScopeAsync()-0%100%
ListAtManagementGroupScope(...)-0%0%
<ListAtSubscriptionScopeAsync()-0%100%
<ListAtSubscriptionScopeAsync()-0%100%
ListAtSubscriptionScopeAsync(...)-0%100%
ListAtSubscriptionScope(...)-0%100%
ListByResourceGroupAsync(...)-36.84%50%
<ListByResourceGroupAsync()-62.5%100%
<ListByResourceGroupAsync()-0%100%
ListByResourceGroup(...)-36.84%50%
StartDeleteAtScopeAsync()-0%0%
StartDeleteAtScope(...)-0%0%
StartCreateOrUpdateAtScopeAsync()-57.14%50%
StartCreateOrUpdateAtScope(...)-57.14%50%
StartValidateAtScopeAsync()-57.14%50%
StartValidateAtScope(...)-57.14%50%
StartDeleteAtTenantScopeAsync()-0%0%
StartDeleteAtTenantScope(...)-0%0%
StartCreateOrUpdateAtTenantScopeAsync()-0%0%
StartCreateOrUpdateAtTenantScope(...)-0%0%
StartValidateAtTenantScopeAsync()-0%0%
StartValidateAtTenantScope(...)-0%0%
StartDeleteAtManagementGroupScopeAsync()-0%0%
StartDeleteAtManagementGroupScope(...)-0%0%
StartCreateOrUpdateAtManagementGroupScopeAsync()-57.14%50%
StartCreateOrUpdateAtManagementGroupScope(...)-57.14%50%
StartValidateAtManagementGroupScopeAsync()-57.14%50%
StartValidateAtManagementGroupScope(...)-57.14%50%
StartDeleteAtSubscriptionScopeAsync()-0%0%
StartDeleteAtSubscriptionScope(...)-0%0%
StartCreateOrUpdateAtSubscriptionScopeAsync()-58.33%50%
StartCreateOrUpdateAtSubscriptionScope(...)-58.33%50%
StartValidateAtSubscriptionScopeAsync()-58.33%50%
StartValidateAtSubscriptionScope(...)-58.33%50%
StartWhatIfAtSubscriptionScopeAsync()-58.33%50%
StartWhatIfAtSubscriptionScope(...)-58.33%50%
StartDeleteAsync()-0%0%
StartDelete(...)-0%0%
StartCreateOrUpdateAsync()-57.14%50%
StartCreateOrUpdate(...)-57.14%50%
StartValidateAsync()-57.14%50%
StartValidate(...)-57.14%50%
StartWhatIfAsync()-57.14%50%
StartWhatIf(...)-57.14%50%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\DeploymentsOperations.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System;
 9using System.Threading;
 10using System.Threading.Tasks;
 11using Azure;
 12using Azure.Core;
 13using Azure.Core.Pipeline;
 14using Azure.ResourceManager.Resources.Models;
 15
 16namespace Azure.ResourceManager.Resources
 17{
 18    /// <summary> The Deployments service client. </summary>
 19    public partial class DeploymentsOperations
 20    {
 21        private readonly ClientDiagnostics _clientDiagnostics;
 22        private readonly HttpPipeline _pipeline;
 41223        internal DeploymentsRestOperations RestClient { get; }
 24        /// <summary> Initializes a new instance of DeploymentsOperations for mocking. </summary>
 35225        protected DeploymentsOperations()
 26        {
 35227        }
 28        /// <summary> Initializes a new instance of DeploymentsOperations. </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>
 35233        internal DeploymentsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId
 34        {
 35235            RestClient = new DeploymentsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint);
 35236            _clientDiagnostics = clientDiagnostics;
 35237            _pipeline = pipeline;
 35238        }
 39
 40        /// <summary> Checks whether the deployment exists. </summary>
 41        /// <param name="scope"> The resource scope. </param>
 42        /// <param name="deploymentName"> The name of the deployment. </param>
 43        /// <param name="cancellationToken"> The cancellation token to use. </param>
 44        public virtual async Task<Response> CheckExistenceAtScopeAsync(string scope, string deploymentName, Cancellation
 45        {
 046            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.CheckExistenceAtScope");
 047            scope0.Start();
 48            try
 49            {
 050                return await RestClient.CheckExistenceAtScopeAsync(scope, deploymentName, cancellationToken).ConfigureAw
 51            }
 052            catch (Exception e)
 53            {
 054                scope0.Failed(e);
 055                throw;
 56            }
 057        }
 58
 59        /// <summary> Checks whether the deployment exists. </summary>
 60        /// <param name="scope"> The resource scope. </param>
 61        /// <param name="deploymentName"> The name of the deployment. </param>
 62        /// <param name="cancellationToken"> The cancellation token to use. </param>
 63        public virtual Response CheckExistenceAtScope(string scope, string deploymentName, CancellationToken cancellatio
 64        {
 065            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.CheckExistenceAtScope");
 066            scope0.Start();
 67            try
 68            {
 069                return RestClient.CheckExistenceAtScope(scope, deploymentName, cancellationToken);
 70            }
 071            catch (Exception e)
 72            {
 073                scope0.Failed(e);
 074                throw;
 75            }
 076        }
 77
 78        /// <summary> Gets a deployment. </summary>
 79        /// <param name="scope"> The resource scope. </param>
 80        /// <param name="deploymentName"> The name of the deployment. </param>
 81        /// <param name="cancellationToken"> The cancellation token to use. </param>
 82        public virtual async Task<Response<DeploymentExtended>> GetAtScopeAsync(string scope, string deploymentName, Can
 83        {
 684            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.GetAtScope");
 685            scope0.Start();
 86            try
 87            {
 688                return await RestClient.GetAtScopeAsync(scope, deploymentName, cancellationToken).ConfigureAwait(false);
 89            }
 090            catch (Exception e)
 91            {
 092                scope0.Failed(e);
 093                throw;
 94            }
 695        }
 96
 97        /// <summary> Gets a deployment. </summary>
 98        /// <param name="scope"> The resource scope. </param>
 99        /// <param name="deploymentName"> The name of the deployment. </param>
 100        /// <param name="cancellationToken"> The cancellation token to use. </param>
 101        public virtual Response<DeploymentExtended> GetAtScope(string scope, string deploymentName, CancellationToken ca
 102        {
 6103            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.GetAtScope");
 6104            scope0.Start();
 105            try
 106            {
 6107                return RestClient.GetAtScope(scope, deploymentName, cancellationToken);
 108            }
 0109            catch (Exception e)
 110            {
 0111                scope0.Failed(e);
 0112                throw;
 113            }
 6114        }
 115
 116        /// <summary> You can cancel a deployment only if the provisioningState is Accepted or Running. After the deploy
 117        /// <param name="scope"> The resource scope. </param>
 118        /// <param name="deploymentName"> The name of the deployment. </param>
 119        /// <param name="cancellationToken"> The cancellation token to use. </param>
 120        public virtual async Task<Response> CancelAtScopeAsync(string scope, string deploymentName, CancellationToken ca
 121        {
 0122            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.CancelAtScope");
 0123            scope0.Start();
 124            try
 125            {
 0126                return await RestClient.CancelAtScopeAsync(scope, deploymentName, cancellationToken).ConfigureAwait(fals
 127            }
 0128            catch (Exception e)
 129            {
 0130                scope0.Failed(e);
 0131                throw;
 132            }
 0133        }
 134
 135        /// <summary> You can cancel a deployment only if the provisioningState is Accepted or Running. After the deploy
 136        /// <param name="scope"> The resource scope. </param>
 137        /// <param name="deploymentName"> The name of the deployment. </param>
 138        /// <param name="cancellationToken"> The cancellation token to use. </param>
 139        public virtual Response CancelAtScope(string scope, string deploymentName, CancellationToken cancellationToken =
 140        {
 0141            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.CancelAtScope");
 0142            scope0.Start();
 143            try
 144            {
 0145                return RestClient.CancelAtScope(scope, deploymentName, cancellationToken);
 146            }
 0147            catch (Exception e)
 148            {
 0149                scope0.Failed(e);
 0150                throw;
 151            }
 0152        }
 153
 154        /// <summary> Exports the template used for specified deployment. </summary>
 155        /// <param name="scope"> The resource scope. </param>
 156        /// <param name="deploymentName"> The name of the deployment. </param>
 157        /// <param name="cancellationToken"> The cancellation token to use. </param>
 158        public virtual async Task<Response<DeploymentExportResult>> ExportTemplateAtScopeAsync(string scope, string depl
 159        {
 0160            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ExportTemplateAtScope");
 0161            scope0.Start();
 162            try
 163            {
 0164                return await RestClient.ExportTemplateAtScopeAsync(scope, deploymentName, cancellationToken).ConfigureAw
 165            }
 0166            catch (Exception e)
 167            {
 0168                scope0.Failed(e);
 0169                throw;
 170            }
 0171        }
 172
 173        /// <summary> Exports the template used for specified deployment. </summary>
 174        /// <param name="scope"> The resource scope. </param>
 175        /// <param name="deploymentName"> The name of the deployment. </param>
 176        /// <param name="cancellationToken"> The cancellation token to use. </param>
 177        public virtual Response<DeploymentExportResult> ExportTemplateAtScope(string scope, string deploymentName, Cance
 178        {
 0179            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ExportTemplateAtScope");
 0180            scope0.Start();
 181            try
 182            {
 0183                return RestClient.ExportTemplateAtScope(scope, deploymentName, cancellationToken);
 184            }
 0185            catch (Exception e)
 186            {
 0187                scope0.Failed(e);
 0188                throw;
 189            }
 0190        }
 191
 192        /// <summary> Checks whether the deployment exists. </summary>
 193        /// <param name="deploymentName"> The name of the deployment. </param>
 194        /// <param name="cancellationToken"> The cancellation token to use. </param>
 195        public virtual async Task<Response> CheckExistenceAtTenantScopeAsync(string deploymentName, CancellationToken ca
 196        {
 0197            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.CheckExistenceAtTenantScope");
 0198            scope0.Start();
 199            try
 200            {
 0201                return await RestClient.CheckExistenceAtTenantScopeAsync(deploymentName, cancellationToken).ConfigureAwa
 202            }
 0203            catch (Exception e)
 204            {
 0205                scope0.Failed(e);
 0206                throw;
 207            }
 0208        }
 209
 210        /// <summary> Checks whether the deployment exists. </summary>
 211        /// <param name="deploymentName"> The name of the deployment. </param>
 212        /// <param name="cancellationToken"> The cancellation token to use. </param>
 213        public virtual Response CheckExistenceAtTenantScope(string deploymentName, CancellationToken cancellationToken =
 214        {
 0215            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.CheckExistenceAtTenantScope");
 0216            scope0.Start();
 217            try
 218            {
 0219                return RestClient.CheckExistenceAtTenantScope(deploymentName, cancellationToken);
 220            }
 0221            catch (Exception e)
 222            {
 0223                scope0.Failed(e);
 0224                throw;
 225            }
 0226        }
 227
 228        /// <summary> Gets a deployment. </summary>
 229        /// <param name="deploymentName"> The name of the deployment. </param>
 230        /// <param name="cancellationToken"> The cancellation token to use. </param>
 231        public virtual async Task<Response<DeploymentExtended>> GetAtTenantScopeAsync(string deploymentName, Cancellatio
 232        {
 0233            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.GetAtTenantScope");
 0234            scope0.Start();
 235            try
 236            {
 0237                return await RestClient.GetAtTenantScopeAsync(deploymentName, cancellationToken).ConfigureAwait(false);
 238            }
 0239            catch (Exception e)
 240            {
 0241                scope0.Failed(e);
 0242                throw;
 243            }
 0244        }
 245
 246        /// <summary> Gets a deployment. </summary>
 247        /// <param name="deploymentName"> The name of the deployment. </param>
 248        /// <param name="cancellationToken"> The cancellation token to use. </param>
 249        public virtual Response<DeploymentExtended> GetAtTenantScope(string deploymentName, CancellationToken cancellati
 250        {
 0251            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.GetAtTenantScope");
 0252            scope0.Start();
 253            try
 254            {
 0255                return RestClient.GetAtTenantScope(deploymentName, cancellationToken);
 256            }
 0257            catch (Exception e)
 258            {
 0259                scope0.Failed(e);
 0260                throw;
 261            }
 0262        }
 263
 264        /// <summary> You can cancel a deployment only if the provisioningState is Accepted or Running. After the deploy
 265        /// <param name="deploymentName"> The name of the deployment. </param>
 266        /// <param name="cancellationToken"> The cancellation token to use. </param>
 267        public virtual async Task<Response> CancelAtTenantScopeAsync(string deploymentName, CancellationToken cancellati
 268        {
 0269            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.CancelAtTenantScope");
 0270            scope0.Start();
 271            try
 272            {
 0273                return await RestClient.CancelAtTenantScopeAsync(deploymentName, cancellationToken).ConfigureAwait(false
 274            }
 0275            catch (Exception e)
 276            {
 0277                scope0.Failed(e);
 0278                throw;
 279            }
 0280        }
 281
 282        /// <summary> You can cancel a deployment only if the provisioningState is Accepted or Running. After the deploy
 283        /// <param name="deploymentName"> The name of the deployment. </param>
 284        /// <param name="cancellationToken"> The cancellation token to use. </param>
 285        public virtual Response CancelAtTenantScope(string deploymentName, CancellationToken cancellationToken = default
 286        {
 0287            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.CancelAtTenantScope");
 0288            scope0.Start();
 289            try
 290            {
 0291                return RestClient.CancelAtTenantScope(deploymentName, cancellationToken);
 292            }
 0293            catch (Exception e)
 294            {
 0295                scope0.Failed(e);
 0296                throw;
 297            }
 0298        }
 299
 300        /// <summary> Exports the template used for specified deployment. </summary>
 301        /// <param name="deploymentName"> The name of the deployment. </param>
 302        /// <param name="cancellationToken"> The cancellation token to use. </param>
 303        public virtual async Task<Response<DeploymentExportResult>> ExportTemplateAtTenantScopeAsync(string deploymentNa
 304        {
 0305            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ExportTemplateAtTenantScope");
 0306            scope0.Start();
 307            try
 308            {
 0309                return await RestClient.ExportTemplateAtTenantScopeAsync(deploymentName, cancellationToken).ConfigureAwa
 310            }
 0311            catch (Exception e)
 312            {
 0313                scope0.Failed(e);
 0314                throw;
 315            }
 0316        }
 317
 318        /// <summary> Exports the template used for specified deployment. </summary>
 319        /// <param name="deploymentName"> The name of the deployment. </param>
 320        /// <param name="cancellationToken"> The cancellation token to use. </param>
 321        public virtual Response<DeploymentExportResult> ExportTemplateAtTenantScope(string deploymentName, CancellationT
 322        {
 0323            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ExportTemplateAtTenantScope");
 0324            scope0.Start();
 325            try
 326            {
 0327                return RestClient.ExportTemplateAtTenantScope(deploymentName, cancellationToken);
 328            }
 0329            catch (Exception e)
 330            {
 0331                scope0.Failed(e);
 0332                throw;
 333            }
 0334        }
 335
 336        /// <summary> Checks whether the deployment exists. </summary>
 337        /// <param name="groupId"> The management group ID. </param>
 338        /// <param name="deploymentName"> The name of the deployment. </param>
 339        /// <param name="cancellationToken"> The cancellation token to use. </param>
 340        public virtual async Task<Response> CheckExistenceAtManagementGroupScopeAsync(string groupId, string deploymentN
 341        {
 0342            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.CheckExistenceAtManagementGroupScop
 0343            scope0.Start();
 344            try
 345            {
 0346                return await RestClient.CheckExistenceAtManagementGroupScopeAsync(groupId, deploymentName, cancellationT
 347            }
 0348            catch (Exception e)
 349            {
 0350                scope0.Failed(e);
 0351                throw;
 352            }
 0353        }
 354
 355        /// <summary> Checks whether the deployment exists. </summary>
 356        /// <param name="groupId"> The management group ID. </param>
 357        /// <param name="deploymentName"> The name of the deployment. </param>
 358        /// <param name="cancellationToken"> The cancellation token to use. </param>
 359        public virtual Response CheckExistenceAtManagementGroupScope(string groupId, string deploymentName, Cancellation
 360        {
 0361            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.CheckExistenceAtManagementGroupScop
 0362            scope0.Start();
 363            try
 364            {
 0365                return RestClient.CheckExistenceAtManagementGroupScope(groupId, deploymentName, cancellationToken);
 366            }
 0367            catch (Exception e)
 368            {
 0369                scope0.Failed(e);
 0370                throw;
 371            }
 0372        }
 373
 374        /// <summary> Gets a deployment. </summary>
 375        /// <param name="groupId"> The management group ID. </param>
 376        /// <param name="deploymentName"> The name of the deployment. </param>
 377        /// <param name="cancellationToken"> The cancellation token to use. </param>
 378        public virtual async Task<Response<DeploymentExtended>> GetAtManagementGroupScopeAsync(string groupId, string de
 379        {
 2380            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.GetAtManagementGroupScope");
 2381            scope0.Start();
 382            try
 383            {
 2384                return await RestClient.GetAtManagementGroupScopeAsync(groupId, deploymentName, cancellationToken).Confi
 385            }
 0386            catch (Exception e)
 387            {
 0388                scope0.Failed(e);
 0389                throw;
 390            }
 2391        }
 392
 393        /// <summary> Gets a deployment. </summary>
 394        /// <param name="groupId"> The management group ID. </param>
 395        /// <param name="deploymentName"> The name of the deployment. </param>
 396        /// <param name="cancellationToken"> The cancellation token to use. </param>
 397        public virtual Response<DeploymentExtended> GetAtManagementGroupScope(string groupId, string deploymentName, Can
 398        {
 2399            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.GetAtManagementGroupScope");
 2400            scope0.Start();
 401            try
 402            {
 2403                return RestClient.GetAtManagementGroupScope(groupId, deploymentName, cancellationToken);
 404            }
 0405            catch (Exception e)
 406            {
 0407                scope0.Failed(e);
 0408                throw;
 409            }
 2410        }
 411
 412        /// <summary> You can cancel a deployment only if the provisioningState is Accepted or Running. After the deploy
 413        /// <param name="groupId"> The management group ID. </param>
 414        /// <param name="deploymentName"> The name of the deployment. </param>
 415        /// <param name="cancellationToken"> The cancellation token to use. </param>
 416        public virtual async Task<Response> CancelAtManagementGroupScopeAsync(string groupId, string deploymentName, Can
 417        {
 0418            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.CancelAtManagementGroupScope");
 0419            scope0.Start();
 420            try
 421            {
 0422                return await RestClient.CancelAtManagementGroupScopeAsync(groupId, deploymentName, cancellationToken).Co
 423            }
 0424            catch (Exception e)
 425            {
 0426                scope0.Failed(e);
 0427                throw;
 428            }
 0429        }
 430
 431        /// <summary> You can cancel a deployment only if the provisioningState is Accepted or Running. After the deploy
 432        /// <param name="groupId"> The management group ID. </param>
 433        /// <param name="deploymentName"> The name of the deployment. </param>
 434        /// <param name="cancellationToken"> The cancellation token to use. </param>
 435        public virtual Response CancelAtManagementGroupScope(string groupId, string deploymentName, CancellationToken ca
 436        {
 0437            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.CancelAtManagementGroupScope");
 0438            scope0.Start();
 439            try
 440            {
 0441                return RestClient.CancelAtManagementGroupScope(groupId, deploymentName, cancellationToken);
 442            }
 0443            catch (Exception e)
 444            {
 0445                scope0.Failed(e);
 0446                throw;
 447            }
 0448        }
 449
 450        /// <summary> Exports the template used for specified deployment. </summary>
 451        /// <param name="groupId"> The management group ID. </param>
 452        /// <param name="deploymentName"> The name of the deployment. </param>
 453        /// <param name="cancellationToken"> The cancellation token to use. </param>
 454        public virtual async Task<Response<DeploymentExportResult>> ExportTemplateAtManagementGroupScopeAsync(string gro
 455        {
 0456            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ExportTemplateAtManagementGroupScop
 0457            scope0.Start();
 458            try
 459            {
 0460                return await RestClient.ExportTemplateAtManagementGroupScopeAsync(groupId, deploymentName, cancellationT
 461            }
 0462            catch (Exception e)
 463            {
 0464                scope0.Failed(e);
 0465                throw;
 466            }
 0467        }
 468
 469        /// <summary> Exports the template used for specified deployment. </summary>
 470        /// <param name="groupId"> The management group ID. </param>
 471        /// <param name="deploymentName"> The name of the deployment. </param>
 472        /// <param name="cancellationToken"> The cancellation token to use. </param>
 473        public virtual Response<DeploymentExportResult> ExportTemplateAtManagementGroupScope(string groupId, string depl
 474        {
 0475            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ExportTemplateAtManagementGroupScop
 0476            scope0.Start();
 477            try
 478            {
 0479                return RestClient.ExportTemplateAtManagementGroupScope(groupId, deploymentName, cancellationToken);
 480            }
 0481            catch (Exception e)
 482            {
 0483                scope0.Failed(e);
 0484                throw;
 485            }
 0486        }
 487
 488        /// <summary> Checks whether the deployment exists. </summary>
 489        /// <param name="deploymentName"> The name of the deployment. </param>
 490        /// <param name="cancellationToken"> The cancellation token to use. </param>
 491        public virtual async Task<Response> CheckExistenceAtSubscriptionScopeAsync(string deploymentName, CancellationTo
 492        {
 0493            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.CheckExistenceAtSubscriptionScope")
 0494            scope0.Start();
 495            try
 496            {
 0497                return await RestClient.CheckExistenceAtSubscriptionScopeAsync(deploymentName, cancellationToken).Config
 498            }
 0499            catch (Exception e)
 500            {
 0501                scope0.Failed(e);
 0502                throw;
 503            }
 0504        }
 505
 506        /// <summary> Checks whether the deployment exists. </summary>
 507        /// <param name="deploymentName"> The name of the deployment. </param>
 508        /// <param name="cancellationToken"> The cancellation token to use. </param>
 509        public virtual Response CheckExistenceAtSubscriptionScope(string deploymentName, CancellationToken cancellationT
 510        {
 0511            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.CheckExistenceAtSubscriptionScope")
 0512            scope0.Start();
 513            try
 514            {
 0515                return RestClient.CheckExistenceAtSubscriptionScope(deploymentName, cancellationToken);
 516            }
 0517            catch (Exception e)
 518            {
 0519                scope0.Failed(e);
 0520                throw;
 521            }
 0522        }
 523
 524        /// <summary> Gets a deployment. </summary>
 525        /// <param name="deploymentName"> The name of the deployment. </param>
 526        /// <param name="cancellationToken"> The cancellation token to use. </param>
 527        public virtual async Task<Response<DeploymentExtended>> GetAtSubscriptionScopeAsync(string deploymentName, Cance
 528        {
 2529            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.GetAtSubscriptionScope");
 2530            scope0.Start();
 531            try
 532            {
 2533                return await RestClient.GetAtSubscriptionScopeAsync(deploymentName, cancellationToken).ConfigureAwait(fa
 534            }
 0535            catch (Exception e)
 536            {
 0537                scope0.Failed(e);
 0538                throw;
 539            }
 2540        }
 541
 542        /// <summary> Gets a deployment. </summary>
 543        /// <param name="deploymentName"> The name of the deployment. </param>
 544        /// <param name="cancellationToken"> The cancellation token to use. </param>
 545        public virtual Response<DeploymentExtended> GetAtSubscriptionScope(string deploymentName, CancellationToken canc
 546        {
 2547            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.GetAtSubscriptionScope");
 2548            scope0.Start();
 549            try
 550            {
 2551                return RestClient.GetAtSubscriptionScope(deploymentName, cancellationToken);
 552            }
 0553            catch (Exception e)
 554            {
 0555                scope0.Failed(e);
 0556                throw;
 557            }
 2558        }
 559
 560        /// <summary> You can cancel a deployment only if the provisioningState is Accepted or Running. After the deploy
 561        /// <param name="deploymentName"> The name of the deployment. </param>
 562        /// <param name="cancellationToken"> The cancellation token to use. </param>
 563        public virtual async Task<Response> CancelAtSubscriptionScopeAsync(string deploymentName, CancellationToken canc
 564        {
 0565            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.CancelAtSubscriptionScope");
 0566            scope0.Start();
 567            try
 568            {
 0569                return await RestClient.CancelAtSubscriptionScopeAsync(deploymentName, cancellationToken).ConfigureAwait
 570            }
 0571            catch (Exception e)
 572            {
 0573                scope0.Failed(e);
 0574                throw;
 575            }
 0576        }
 577
 578        /// <summary> You can cancel a deployment only if the provisioningState is Accepted or Running. After the deploy
 579        /// <param name="deploymentName"> The name of the deployment. </param>
 580        /// <param name="cancellationToken"> The cancellation token to use. </param>
 581        public virtual Response CancelAtSubscriptionScope(string deploymentName, CancellationToken cancellationToken = d
 582        {
 0583            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.CancelAtSubscriptionScope");
 0584            scope0.Start();
 585            try
 586            {
 0587                return RestClient.CancelAtSubscriptionScope(deploymentName, cancellationToken);
 588            }
 0589            catch (Exception e)
 590            {
 0591                scope0.Failed(e);
 0592                throw;
 593            }
 0594        }
 595
 596        /// <summary> Exports the template used for specified deployment. </summary>
 597        /// <param name="deploymentName"> The name of the deployment. </param>
 598        /// <param name="cancellationToken"> The cancellation token to use. </param>
 599        public virtual async Task<Response<DeploymentExportResult>> ExportTemplateAtSubscriptionScopeAsync(string deploy
 600        {
 0601            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ExportTemplateAtSubscriptionScope")
 0602            scope0.Start();
 603            try
 604            {
 0605                return await RestClient.ExportTemplateAtSubscriptionScopeAsync(deploymentName, cancellationToken).Config
 606            }
 0607            catch (Exception e)
 608            {
 0609                scope0.Failed(e);
 0610                throw;
 611            }
 0612        }
 613
 614        /// <summary> Exports the template used for specified deployment. </summary>
 615        /// <param name="deploymentName"> The name of the deployment. </param>
 616        /// <param name="cancellationToken"> The cancellation token to use. </param>
 617        public virtual Response<DeploymentExportResult> ExportTemplateAtSubscriptionScope(string deploymentName, Cancell
 618        {
 0619            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ExportTemplateAtSubscriptionScope")
 0620            scope0.Start();
 621            try
 622            {
 0623                return RestClient.ExportTemplateAtSubscriptionScope(deploymentName, cancellationToken);
 624            }
 0625            catch (Exception e)
 626            {
 0627                scope0.Failed(e);
 0628                throw;
 629            }
 0630        }
 631
 632        /// <summary> Checks whether the deployment exists. </summary>
 633        /// <param name="resourceGroupName"> The name of the resource group with the deployment to check. The name is ca
 634        /// <param name="deploymentName"> The name of the deployment. </param>
 635        /// <param name="cancellationToken"> The cancellation token to use. </param>
 636        public virtual async Task<Response> CheckExistenceAsync(string resourceGroupName, string deploymentName, Cancell
 637        {
 0638            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.CheckExistence");
 0639            scope0.Start();
 640            try
 641            {
 0642                return await RestClient.CheckExistenceAsync(resourceGroupName, deploymentName, cancellationToken).Config
 643            }
 0644            catch (Exception e)
 645            {
 0646                scope0.Failed(e);
 0647                throw;
 648            }
 0649        }
 650
 651        /// <summary> Checks whether the deployment exists. </summary>
 652        /// <param name="resourceGroupName"> The name of the resource group with the deployment to check. The name is ca
 653        /// <param name="deploymentName"> The name of the deployment. </param>
 654        /// <param name="cancellationToken"> The cancellation token to use. </param>
 655        public virtual Response CheckExistence(string resourceGroupName, string deploymentName, CancellationToken cancel
 656        {
 0657            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.CheckExistence");
 0658            scope0.Start();
 659            try
 660            {
 0661                return RestClient.CheckExistence(resourceGroupName, deploymentName, cancellationToken);
 662            }
 0663            catch (Exception e)
 664            {
 0665                scope0.Failed(e);
 0666                throw;
 667            }
 0668        }
 669
 670        /// <summary> Gets a deployment. </summary>
 671        /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param>
 672        /// <param name="deploymentName"> The name of the deployment. </param>
 673        /// <param name="cancellationToken"> The cancellation token to use. </param>
 674        public virtual async Task<Response<DeploymentExtended>> GetAsync(string resourceGroupName, string deploymentName
 675        {
 6676            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.Get");
 6677            scope0.Start();
 678            try
 679            {
 6680                return await RestClient.GetAsync(resourceGroupName, deploymentName, cancellationToken).ConfigureAwait(fa
 681            }
 0682            catch (Exception e)
 683            {
 0684                scope0.Failed(e);
 0685                throw;
 686            }
 6687        }
 688
 689        /// <summary> Gets a deployment. </summary>
 690        /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param>
 691        /// <param name="deploymentName"> The name of the deployment. </param>
 692        /// <param name="cancellationToken"> The cancellation token to use. </param>
 693        public virtual Response<DeploymentExtended> Get(string resourceGroupName, string deploymentName, CancellationTok
 694        {
 6695            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.Get");
 6696            scope0.Start();
 697            try
 698            {
 6699                return RestClient.Get(resourceGroupName, deploymentName, cancellationToken);
 700            }
 0701            catch (Exception e)
 702            {
 0703                scope0.Failed(e);
 0704                throw;
 705            }
 6706        }
 707
 708        /// <summary> You can cancel a deployment only if the provisioningState is Accepted or Running. After the deploy
 709        /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param>
 710        /// <param name="deploymentName"> The name of the deployment. </param>
 711        /// <param name="cancellationToken"> The cancellation token to use. </param>
 712        public virtual async Task<Response> CancelAsync(string resourceGroupName, string deploymentName, CancellationTok
 713        {
 6714            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.Cancel");
 6715            scope0.Start();
 716            try
 717            {
 6718                return await RestClient.CancelAsync(resourceGroupName, deploymentName, cancellationToken).ConfigureAwait
 719            }
 4720            catch (Exception e)
 721            {
 4722                scope0.Failed(e);
 4723                throw;
 724            }
 2725        }
 726
 727        /// <summary> You can cancel a deployment only if the provisioningState is Accepted or Running. After the deploy
 728        /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param>
 729        /// <param name="deploymentName"> The name of the deployment. </param>
 730        /// <param name="cancellationToken"> The cancellation token to use. </param>
 731        public virtual Response Cancel(string resourceGroupName, string deploymentName, CancellationToken cancellationTo
 732        {
 6733            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.Cancel");
 6734            scope0.Start();
 735            try
 736            {
 6737                return RestClient.Cancel(resourceGroupName, deploymentName, cancellationToken);
 738            }
 4739            catch (Exception e)
 740            {
 4741                scope0.Failed(e);
 4742                throw;
 743            }
 2744        }
 745
 746        /// <summary> Exports the template used for specified deployment. </summary>
 747        /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param>
 748        /// <param name="deploymentName"> The name of the deployment. </param>
 749        /// <param name="cancellationToken"> The cancellation token to use. </param>
 750        public virtual async Task<Response<DeploymentExportResult>> ExportTemplateAsync(string resourceGroupName, string
 751        {
 0752            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ExportTemplate");
 0753            scope0.Start();
 754            try
 755            {
 0756                return await RestClient.ExportTemplateAsync(resourceGroupName, deploymentName, cancellationToken).Config
 757            }
 0758            catch (Exception e)
 759            {
 0760                scope0.Failed(e);
 0761                throw;
 762            }
 0763        }
 764
 765        /// <summary> Exports the template used for specified deployment. </summary>
 766        /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param>
 767        /// <param name="deploymentName"> The name of the deployment. </param>
 768        /// <param name="cancellationToken"> The cancellation token to use. </param>
 769        public virtual Response<DeploymentExportResult> ExportTemplate(string resourceGroupName, string deploymentName, 
 770        {
 0771            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ExportTemplate");
 0772            scope0.Start();
 773            try
 774            {
 0775                return RestClient.ExportTemplate(resourceGroupName, deploymentName, cancellationToken);
 776            }
 0777            catch (Exception e)
 778            {
 0779                scope0.Failed(e);
 0780                throw;
 781            }
 0782        }
 783
 784        /// <summary> Calculate the hash of the given template. </summary>
 785        /// <param name="template"> The template provided to calculate hash. </param>
 786        /// <param name="cancellationToken"> The cancellation token to use. </param>
 787        public virtual async Task<Response<TemplateHashResult>> CalculateTemplateHashAsync(object template, Cancellation
 788        {
 0789            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.CalculateTemplateHash");
 0790            scope0.Start();
 791            try
 792            {
 0793                return await RestClient.CalculateTemplateHashAsync(template, cancellationToken).ConfigureAwait(false);
 794            }
 0795            catch (Exception e)
 796            {
 0797                scope0.Failed(e);
 0798                throw;
 799            }
 0800        }
 801
 802        /// <summary> Calculate the hash of the given template. </summary>
 803        /// <param name="template"> The template provided to calculate hash. </param>
 804        /// <param name="cancellationToken"> The cancellation token to use. </param>
 805        public virtual Response<TemplateHashResult> CalculateTemplateHash(object template, CancellationToken cancellatio
 806        {
 0807            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.CalculateTemplateHash");
 0808            scope0.Start();
 809            try
 810            {
 0811                return RestClient.CalculateTemplateHash(template, cancellationToken);
 812            }
 0813            catch (Exception e)
 814            {
 0815                scope0.Failed(e);
 0816                throw;
 817            }
 0818        }
 819
 820        /// <summary> Get all the deployments at the given scope. </summary>
 821        /// <param name="scope"> The resource scope. </param>
 822        /// <param name="filter"> The filter to apply on the operation. For example, you can use $filter=provisioningSta
 823        /// <param name="top"> The number of results to get. If null is passed, returns all deployments. </param>
 824        /// <param name="cancellationToken"> The cancellation token to use. </param>
 825        public virtual AsyncPageable<DeploymentExtended> ListAtScopeAsync(string scope, string filter = null, int? top =
 826        {
 0827            if (scope == null)
 828            {
 0829                throw new ArgumentNullException(nameof(scope));
 830            }
 831
 832            async Task<Page<DeploymentExtended>> FirstPageFunc(int? pageSizeHint)
 833            {
 0834                using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ListAtScope");
 0835                scope0.Start();
 836                try
 837                {
 0838                    var response = await RestClient.ListAtScopeAsync(scope, filter, top, cancellationToken).ConfigureAwa
 0839                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 840                }
 0841                catch (Exception e)
 842                {
 0843                    scope0.Failed(e);
 0844                    throw;
 845                }
 0846            }
 847            async Task<Page<DeploymentExtended>> NextPageFunc(string nextLink, int? pageSizeHint)
 848            {
 0849                using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ListAtScope");
 0850                scope0.Start();
 851                try
 852                {
 0853                    var response = await RestClient.ListAtScopeNextPageAsync(nextLink, scope, filter, top, cancellationT
 0854                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 855                }
 0856                catch (Exception e)
 857                {
 0858                    scope0.Failed(e);
 0859                    throw;
 860                }
 0861            }
 0862            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 863        }
 864
 865        /// <summary> Get all the deployments at the given scope. </summary>
 866        /// <param name="scope"> The resource scope. </param>
 867        /// <param name="filter"> The filter to apply on the operation. For example, you can use $filter=provisioningSta
 868        /// <param name="top"> The number of results to get. If null is passed, returns all deployments. </param>
 869        /// <param name="cancellationToken"> The cancellation token to use. </param>
 870        public virtual Pageable<DeploymentExtended> ListAtScope(string scope, string filter = null, int? top = null, Can
 871        {
 0872            if (scope == null)
 873            {
 0874                throw new ArgumentNullException(nameof(scope));
 875            }
 876
 877            Page<DeploymentExtended> FirstPageFunc(int? pageSizeHint)
 878            {
 0879                using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ListAtScope");
 0880                scope0.Start();
 881                try
 882                {
 0883                    var response = RestClient.ListAtScope(scope, filter, top, cancellationToken);
 0884                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 885                }
 0886                catch (Exception e)
 887                {
 0888                    scope0.Failed(e);
 0889                    throw;
 890                }
 0891            }
 892            Page<DeploymentExtended> NextPageFunc(string nextLink, int? pageSizeHint)
 893            {
 0894                using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ListAtScope");
 0895                scope0.Start();
 896                try
 897                {
 0898                    var response = RestClient.ListAtScopeNextPage(nextLink, scope, filter, top, cancellationToken);
 0899                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 900                }
 0901                catch (Exception e)
 902                {
 0903                    scope0.Failed(e);
 0904                    throw;
 905                }
 0906            }
 0907            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 908        }
 909
 910        /// <summary> Get all the deployments at the tenant scope. </summary>
 911        /// <param name="filter"> The filter to apply on the operation. For example, you can use $filter=provisioningSta
 912        /// <param name="top"> The number of results to get. If null is passed, returns all deployments. </param>
 913        /// <param name="cancellationToken"> The cancellation token to use. </param>
 914        public virtual AsyncPageable<DeploymentExtended> ListAtTenantScopeAsync(string filter = null, int? top = null, C
 915        {
 916            async Task<Page<DeploymentExtended>> FirstPageFunc(int? pageSizeHint)
 917            {
 0918                using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ListAtTenantScope");
 0919                scope0.Start();
 920                try
 921                {
 0922                    var response = await RestClient.ListAtTenantScopeAsync(filter, top, cancellationToken).ConfigureAwai
 0923                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 924                }
 0925                catch (Exception e)
 926                {
 0927                    scope0.Failed(e);
 0928                    throw;
 929                }
 0930            }
 931            async Task<Page<DeploymentExtended>> NextPageFunc(string nextLink, int? pageSizeHint)
 932            {
 0933                using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ListAtTenantScope");
 0934                scope0.Start();
 935                try
 936                {
 0937                    var response = await RestClient.ListAtTenantScopeNextPageAsync(nextLink, filter, top, cancellationTo
 0938                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 939                }
 0940                catch (Exception e)
 941                {
 0942                    scope0.Failed(e);
 0943                    throw;
 944                }
 0945            }
 0946            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 947        }
 948
 949        /// <summary> Get all the deployments at the tenant scope. </summary>
 950        /// <param name="filter"> The filter to apply on the operation. For example, you can use $filter=provisioningSta
 951        /// <param name="top"> The number of results to get. If null is passed, returns all deployments. </param>
 952        /// <param name="cancellationToken"> The cancellation token to use. </param>
 953        public virtual Pageable<DeploymentExtended> ListAtTenantScope(string filter = null, int? top = null, Cancellatio
 954        {
 955            Page<DeploymentExtended> FirstPageFunc(int? pageSizeHint)
 956            {
 0957                using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ListAtTenantScope");
 0958                scope0.Start();
 959                try
 960                {
 0961                    var response = RestClient.ListAtTenantScope(filter, top, cancellationToken);
 0962                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 963                }
 0964                catch (Exception e)
 965                {
 0966                    scope0.Failed(e);
 0967                    throw;
 968                }
 0969            }
 970            Page<DeploymentExtended> NextPageFunc(string nextLink, int? pageSizeHint)
 971            {
 0972                using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ListAtTenantScope");
 0973                scope0.Start();
 974                try
 975                {
 0976                    var response = RestClient.ListAtTenantScopeNextPage(nextLink, filter, top, cancellationToken);
 0977                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 978                }
 0979                catch (Exception e)
 980                {
 0981                    scope0.Failed(e);
 0982                    throw;
 983                }
 0984            }
 0985            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 986        }
 987
 988        /// <summary> Get all the deployments for a management group. </summary>
 989        /// <param name="groupId"> The management group ID. </param>
 990        /// <param name="filter"> The filter to apply on the operation. For example, you can use $filter=provisioningSta
 991        /// <param name="top"> The number of results to get. If null is passed, returns all deployments. </param>
 992        /// <param name="cancellationToken"> The cancellation token to use. </param>
 993        public virtual AsyncPageable<DeploymentExtended> ListAtManagementGroupScopeAsync(string groupId, string filter =
 994        {
 0995            if (groupId == null)
 996            {
 0997                throw new ArgumentNullException(nameof(groupId));
 998            }
 999
 1000            async Task<Page<DeploymentExtended>> FirstPageFunc(int? pageSizeHint)
 1001            {
 01002                using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ListAtManagementGroupScope");
 01003                scope0.Start();
 1004                try
 1005                {
 01006                    var response = await RestClient.ListAtManagementGroupScopeAsync(groupId, filter, top, cancellationTo
 01007                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 1008                }
 01009                catch (Exception e)
 1010                {
 01011                    scope0.Failed(e);
 01012                    throw;
 1013                }
 01014            }
 1015            async Task<Page<DeploymentExtended>> NextPageFunc(string nextLink, int? pageSizeHint)
 1016            {
 01017                using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ListAtManagementGroupScope");
 01018                scope0.Start();
 1019                try
 1020                {
 01021                    var response = await RestClient.ListAtManagementGroupScopeNextPageAsync(nextLink, groupId, filter, t
 01022                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 1023                }
 01024                catch (Exception e)
 1025                {
 01026                    scope0.Failed(e);
 01027                    throw;
 1028                }
 01029            }
 01030            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 1031        }
 1032
 1033        /// <summary> Get all the deployments for a management group. </summary>
 1034        /// <param name="groupId"> The management group ID. </param>
 1035        /// <param name="filter"> The filter to apply on the operation. For example, you can use $filter=provisioningSta
 1036        /// <param name="top"> The number of results to get. If null is passed, returns all deployments. </param>
 1037        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1038        public virtual Pageable<DeploymentExtended> ListAtManagementGroupScope(string groupId, string filter = null, int
 1039        {
 01040            if (groupId == null)
 1041            {
 01042                throw new ArgumentNullException(nameof(groupId));
 1043            }
 1044
 1045            Page<DeploymentExtended> FirstPageFunc(int? pageSizeHint)
 1046            {
 01047                using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ListAtManagementGroupScope");
 01048                scope0.Start();
 1049                try
 1050                {
 01051                    var response = RestClient.ListAtManagementGroupScope(groupId, filter, top, cancellationToken);
 01052                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 1053                }
 01054                catch (Exception e)
 1055                {
 01056                    scope0.Failed(e);
 01057                    throw;
 1058                }
 01059            }
 1060            Page<DeploymentExtended> NextPageFunc(string nextLink, int? pageSizeHint)
 1061            {
 01062                using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ListAtManagementGroupScope");
 01063                scope0.Start();
 1064                try
 1065                {
 01066                    var response = RestClient.ListAtManagementGroupScopeNextPage(nextLink, groupId, filter, top, cancell
 01067                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 1068                }
 01069                catch (Exception e)
 1070                {
 01071                    scope0.Failed(e);
 01072                    throw;
 1073                }
 01074            }
 01075            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 1076        }
 1077
 1078        /// <summary> Get all the deployments for a subscription. </summary>
 1079        /// <param name="filter"> The filter to apply on the operation. For example, you can use $filter=provisioningSta
 1080        /// <param name="top"> The number of results to get. If null is passed, returns all deployments. </param>
 1081        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1082        public virtual AsyncPageable<DeploymentExtended> ListAtSubscriptionScopeAsync(string filter = null, int? top = n
 1083        {
 1084            async Task<Page<DeploymentExtended>> FirstPageFunc(int? pageSizeHint)
 1085            {
 01086                using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ListAtSubscriptionScope");
 01087                scope0.Start();
 1088                try
 1089                {
 01090                    var response = await RestClient.ListAtSubscriptionScopeAsync(filter, top, cancellationToken).Configu
 01091                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 1092                }
 01093                catch (Exception e)
 1094                {
 01095                    scope0.Failed(e);
 01096                    throw;
 1097                }
 01098            }
 1099            async Task<Page<DeploymentExtended>> NextPageFunc(string nextLink, int? pageSizeHint)
 1100            {
 01101                using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ListAtSubscriptionScope");
 01102                scope0.Start();
 1103                try
 1104                {
 01105                    var response = await RestClient.ListAtSubscriptionScopeNextPageAsync(nextLink, filter, top, cancella
 01106                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 1107                }
 01108                catch (Exception e)
 1109                {
 01110                    scope0.Failed(e);
 01111                    throw;
 1112                }
 01113            }
 01114            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 1115        }
 1116
 1117        /// <summary> Get all the deployments for a subscription. </summary>
 1118        /// <param name="filter"> The filter to apply on the operation. For example, you can use $filter=provisioningSta
 1119        /// <param name="top"> The number of results to get. If null is passed, returns all deployments. </param>
 1120        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1121        public virtual Pageable<DeploymentExtended> ListAtSubscriptionScope(string filter = null, int? top = null, Cance
 1122        {
 1123            Page<DeploymentExtended> FirstPageFunc(int? pageSizeHint)
 1124            {
 01125                using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ListAtSubscriptionScope");
 01126                scope0.Start();
 1127                try
 1128                {
 01129                    var response = RestClient.ListAtSubscriptionScope(filter, top, cancellationToken);
 01130                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 1131                }
 01132                catch (Exception e)
 1133                {
 01134                    scope0.Failed(e);
 01135                    throw;
 1136                }
 01137            }
 1138            Page<DeploymentExtended> NextPageFunc(string nextLink, int? pageSizeHint)
 1139            {
 01140                using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ListAtSubscriptionScope");
 01141                scope0.Start();
 1142                try
 1143                {
 01144                    var response = RestClient.ListAtSubscriptionScopeNextPage(nextLink, filter, top, cancellationToken);
 01145                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 1146                }
 01147                catch (Exception e)
 1148                {
 01149                    scope0.Failed(e);
 01150                    throw;
 1151                }
 01152            }
 01153            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 1154        }
 1155
 1156        /// <summary> Get all the deployments for a resource group. </summary>
 1157        /// <param name="resourceGroupName"> The name of the resource group with the deployments to get. The name is cas
 1158        /// <param name="filter"> The filter to apply on the operation. For example, you can use $filter=provisioningSta
 1159        /// <param name="top"> The number of results to get. If null is passed, returns all deployments. </param>
 1160        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1161        public virtual AsyncPageable<DeploymentExtended> ListByResourceGroupAsync(string resourceGroupName, string filte
 1162        {
 81163            if (resourceGroupName == null)
 1164            {
 01165                throw new ArgumentNullException(nameof(resourceGroupName));
 1166            }
 1167
 1168            async Task<Page<DeploymentExtended>> FirstPageFunc(int? pageSizeHint)
 1169            {
 81170                using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ListByResourceGroup");
 81171                scope0.Start();
 1172                try
 1173                {
 81174                    var response = await RestClient.ListByResourceGroupAsync(resourceGroupName, filter, top, cancellatio
 81175                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 1176                }
 01177                catch (Exception e)
 1178                {
 01179                    scope0.Failed(e);
 01180                    throw;
 1181                }
 81182            }
 1183            async Task<Page<DeploymentExtended>> NextPageFunc(string nextLink, int? pageSizeHint)
 1184            {
 01185                using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ListByResourceGroup");
 01186                scope0.Start();
 1187                try
 1188                {
 01189                    var response = await RestClient.ListByResourceGroupNextPageAsync(nextLink, resourceGroupName, filter
 01190                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 1191                }
 01192                catch (Exception e)
 1193                {
 01194                    scope0.Failed(e);
 01195                    throw;
 1196                }
 01197            }
 81198            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 1199        }
 1200
 1201        /// <summary> Get all the deployments for a resource group. </summary>
 1202        /// <param name="resourceGroupName"> The name of the resource group with the deployments to get. The name is cas
 1203        /// <param name="filter"> The filter to apply on the operation. For example, you can use $filter=provisioningSta
 1204        /// <param name="top"> The number of results to get. If null is passed, returns all deployments. </param>
 1205        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1206        public virtual Pageable<DeploymentExtended> ListByResourceGroup(string resourceGroupName, string filter = null, 
 1207        {
 81208            if (resourceGroupName == null)
 1209            {
 01210                throw new ArgumentNullException(nameof(resourceGroupName));
 1211            }
 1212
 1213            Page<DeploymentExtended> FirstPageFunc(int? pageSizeHint)
 1214            {
 81215                using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ListByResourceGroup");
 81216                scope0.Start();
 1217                try
 1218                {
 81219                    var response = RestClient.ListByResourceGroup(resourceGroupName, filter, top, cancellationToken);
 81220                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 1221                }
 01222                catch (Exception e)
 1223                {
 01224                    scope0.Failed(e);
 01225                    throw;
 1226                }
 81227            }
 1228            Page<DeploymentExtended> NextPageFunc(string nextLink, int? pageSizeHint)
 1229            {
 01230                using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.ListByResourceGroup");
 01231                scope0.Start();
 1232                try
 1233                {
 01234                    var response = RestClient.ListByResourceGroupNextPage(nextLink, resourceGroupName, filter, top, canc
 01235                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 1236                }
 01237                catch (Exception e)
 1238                {
 01239                    scope0.Failed(e);
 01240                    throw;
 1241                }
 01242            }
 81243            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 1244        }
 1245
 1246        /// <summary> A template deployment that is currently running cannot be deleted. Deleting a template deployment 
 1247        /// <param name="scope"> The resource scope. </param>
 1248        /// <param name="deploymentName"> The name of the deployment. </param>
 1249        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1250        public virtual async Task<DeploymentsDeleteAtScopeOperation> StartDeleteAtScopeAsync(string scope, string deploy
 1251        {
 01252            if (scope == null)
 1253            {
 01254                throw new ArgumentNullException(nameof(scope));
 1255            }
 01256            if (deploymentName == null)
 1257            {
 01258                throw new ArgumentNullException(nameof(deploymentName));
 1259            }
 1260
 01261            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartDeleteAtScope");
 01262            scope0.Start();
 1263            try
 1264            {
 01265                var originalResponse = await RestClient.DeleteAtScopeAsync(scope, deploymentName, cancellationToken).Con
 01266                return new DeploymentsDeleteAtScopeOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteAtSco
 1267            }
 01268            catch (Exception e)
 1269            {
 01270                scope0.Failed(e);
 01271                throw;
 1272            }
 01273        }
 1274
 1275        /// <summary> A template deployment that is currently running cannot be deleted. Deleting a template deployment 
 1276        /// <param name="scope"> The resource scope. </param>
 1277        /// <param name="deploymentName"> The name of the deployment. </param>
 1278        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1279        public virtual DeploymentsDeleteAtScopeOperation StartDeleteAtScope(string scope, string deploymentName, Cancell
 1280        {
 01281            if (scope == null)
 1282            {
 01283                throw new ArgumentNullException(nameof(scope));
 1284            }
 01285            if (deploymentName == null)
 1286            {
 01287                throw new ArgumentNullException(nameof(deploymentName));
 1288            }
 1289
 01290            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartDeleteAtScope");
 01291            scope0.Start();
 1292            try
 1293            {
 01294                var originalResponse = RestClient.DeleteAtScope(scope, deploymentName, cancellationToken);
 01295                return new DeploymentsDeleteAtScopeOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteAtSco
 1296            }
 01297            catch (Exception e)
 1298            {
 01299                scope0.Failed(e);
 01300                throw;
 1301            }
 01302        }
 1303
 1304        /// <summary> You can provide the template and parameters directly in the request or link to JSON files. </summa
 1305        /// <param name="scope"> The resource scope. </param>
 1306        /// <param name="deploymentName"> The name of the deployment. </param>
 1307        /// <param name="parameters"> Additional parameters supplied to the operation. </param>
 1308        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1309        public virtual async Task<DeploymentsCreateOrUpdateAtScopeOperation> StartCreateOrUpdateAtScopeAsync(string scop
 1310        {
 61311            if (scope == null)
 1312            {
 01313                throw new ArgumentNullException(nameof(scope));
 1314            }
 61315            if (deploymentName == null)
 1316            {
 01317                throw new ArgumentNullException(nameof(deploymentName));
 1318            }
 61319            if (parameters == null)
 1320            {
 01321                throw new ArgumentNullException(nameof(parameters));
 1322            }
 1323
 61324            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartCreateOrUpdateAtScope");
 61325            scope0.Start();
 1326            try
 1327            {
 61328                var originalResponse = await RestClient.CreateOrUpdateAtScopeAsync(scope, deploymentName, parameters, ca
 61329                return new DeploymentsCreateOrUpdateAtScopeOperation(_clientDiagnostics, _pipeline, RestClient.CreateCre
 1330            }
 01331            catch (Exception e)
 1332            {
 01333                scope0.Failed(e);
 01334                throw;
 1335            }
 61336        }
 1337
 1338        /// <summary> You can provide the template and parameters directly in the request or link to JSON files. </summa
 1339        /// <param name="scope"> The resource scope. </param>
 1340        /// <param name="deploymentName"> The name of the deployment. </param>
 1341        /// <param name="parameters"> Additional parameters supplied to the operation. </param>
 1342        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1343        public virtual DeploymentsCreateOrUpdateAtScopeOperation StartCreateOrUpdateAtScope(string scope, string deploym
 1344        {
 61345            if (scope == null)
 1346            {
 01347                throw new ArgumentNullException(nameof(scope));
 1348            }
 61349            if (deploymentName == null)
 1350            {
 01351                throw new ArgumentNullException(nameof(deploymentName));
 1352            }
 61353            if (parameters == null)
 1354            {
 01355                throw new ArgumentNullException(nameof(parameters));
 1356            }
 1357
 61358            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartCreateOrUpdateAtScope");
 61359            scope0.Start();
 1360            try
 1361            {
 61362                var originalResponse = RestClient.CreateOrUpdateAtScope(scope, deploymentName, parameters, cancellationT
 61363                return new DeploymentsCreateOrUpdateAtScopeOperation(_clientDiagnostics, _pipeline, RestClient.CreateCre
 1364            }
 01365            catch (Exception e)
 1366            {
 01367                scope0.Failed(e);
 01368                throw;
 1369            }
 61370        }
 1371
 1372        /// <summary> Validates whether the specified template is syntactically correct and will be accepted by Azure Re
 1373        /// <param name="scope"> The resource scope. </param>
 1374        /// <param name="deploymentName"> The name of the deployment. </param>
 1375        /// <param name="parameters"> Parameters to validate. </param>
 1376        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1377        public virtual async Task<DeploymentsValidateAtScopeOperation> StartValidateAtScopeAsync(string scope, string de
 1378        {
 61379            if (scope == null)
 1380            {
 01381                throw new ArgumentNullException(nameof(scope));
 1382            }
 61383            if (deploymentName == null)
 1384            {
 01385                throw new ArgumentNullException(nameof(deploymentName));
 1386            }
 61387            if (parameters == null)
 1388            {
 01389                throw new ArgumentNullException(nameof(parameters));
 1390            }
 1391
 61392            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartValidateAtScope");
 61393            scope0.Start();
 1394            try
 1395            {
 61396                var originalResponse = await RestClient.ValidateAtScopeAsync(scope, deploymentName, parameters, cancella
 61397                return new DeploymentsValidateAtScopeOperation(_clientDiagnostics, _pipeline, RestClient.CreateValidateA
 1398            }
 01399            catch (Exception e)
 1400            {
 01401                scope0.Failed(e);
 01402                throw;
 1403            }
 61404        }
 1405
 1406        /// <summary> Validates whether the specified template is syntactically correct and will be accepted by Azure Re
 1407        /// <param name="scope"> The resource scope. </param>
 1408        /// <param name="deploymentName"> The name of the deployment. </param>
 1409        /// <param name="parameters"> Parameters to validate. </param>
 1410        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1411        public virtual DeploymentsValidateAtScopeOperation StartValidateAtScope(string scope, string deploymentName, Dep
 1412        {
 61413            if (scope == null)
 1414            {
 01415                throw new ArgumentNullException(nameof(scope));
 1416            }
 61417            if (deploymentName == null)
 1418            {
 01419                throw new ArgumentNullException(nameof(deploymentName));
 1420            }
 61421            if (parameters == null)
 1422            {
 01423                throw new ArgumentNullException(nameof(parameters));
 1424            }
 1425
 61426            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartValidateAtScope");
 61427            scope0.Start();
 1428            try
 1429            {
 61430                var originalResponse = RestClient.ValidateAtScope(scope, deploymentName, parameters, cancellationToken);
 61431                return new DeploymentsValidateAtScopeOperation(_clientDiagnostics, _pipeline, RestClient.CreateValidateA
 1432            }
 01433            catch (Exception e)
 1434            {
 01435                scope0.Failed(e);
 01436                throw;
 1437            }
 61438        }
 1439
 1440        /// <summary> A template deployment that is currently running cannot be deleted. Deleting a template deployment 
 1441        /// <param name="deploymentName"> The name of the deployment. </param>
 1442        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1443        public virtual async Task<DeploymentsDeleteAtTenantScopeOperation> StartDeleteAtTenantScopeAsync(string deployme
 1444        {
 01445            if (deploymentName == null)
 1446            {
 01447                throw new ArgumentNullException(nameof(deploymentName));
 1448            }
 1449
 01450            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartDeleteAtTenantScope");
 01451            scope0.Start();
 1452            try
 1453            {
 01454                var originalResponse = await RestClient.DeleteAtTenantScopeAsync(deploymentName, cancellationToken).Conf
 01455                return new DeploymentsDeleteAtTenantScopeOperation(_clientDiagnostics, _pipeline, RestClient.CreateDelet
 1456            }
 01457            catch (Exception e)
 1458            {
 01459                scope0.Failed(e);
 01460                throw;
 1461            }
 01462        }
 1463
 1464        /// <summary> A template deployment that is currently running cannot be deleted. Deleting a template deployment 
 1465        /// <param name="deploymentName"> The name of the deployment. </param>
 1466        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1467        public virtual DeploymentsDeleteAtTenantScopeOperation StartDeleteAtTenantScope(string deploymentName, Cancellat
 1468        {
 01469            if (deploymentName == null)
 1470            {
 01471                throw new ArgumentNullException(nameof(deploymentName));
 1472            }
 1473
 01474            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartDeleteAtTenantScope");
 01475            scope0.Start();
 1476            try
 1477            {
 01478                var originalResponse = RestClient.DeleteAtTenantScope(deploymentName, cancellationToken);
 01479                return new DeploymentsDeleteAtTenantScopeOperation(_clientDiagnostics, _pipeline, RestClient.CreateDelet
 1480            }
 01481            catch (Exception e)
 1482            {
 01483                scope0.Failed(e);
 01484                throw;
 1485            }
 01486        }
 1487
 1488        /// <summary> You can provide the template and parameters directly in the request or link to JSON files. </summa
 1489        /// <param name="deploymentName"> The name of the deployment. </param>
 1490        /// <param name="parameters"> Additional parameters supplied to the operation. </param>
 1491        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1492        public virtual async Task<DeploymentsCreateOrUpdateAtTenantScopeOperation> StartCreateOrUpdateAtTenantScopeAsync
 1493        {
 01494            if (deploymentName == null)
 1495            {
 01496                throw new ArgumentNullException(nameof(deploymentName));
 1497            }
 01498            if (parameters == null)
 1499            {
 01500                throw new ArgumentNullException(nameof(parameters));
 1501            }
 1502
 01503            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartCreateOrUpdateAtTenantScope");
 01504            scope0.Start();
 1505            try
 1506            {
 01507                var originalResponse = await RestClient.CreateOrUpdateAtTenantScopeAsync(deploymentName, parameters, can
 01508                return new DeploymentsCreateOrUpdateAtTenantScopeOperation(_clientDiagnostics, _pipeline, RestClient.Cre
 1509            }
 01510            catch (Exception e)
 1511            {
 01512                scope0.Failed(e);
 01513                throw;
 1514            }
 01515        }
 1516
 1517        /// <summary> You can provide the template and parameters directly in the request or link to JSON files. </summa
 1518        /// <param name="deploymentName"> The name of the deployment. </param>
 1519        /// <param name="parameters"> Additional parameters supplied to the operation. </param>
 1520        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1521        public virtual DeploymentsCreateOrUpdateAtTenantScopeOperation StartCreateOrUpdateAtTenantScope(string deploymen
 1522        {
 01523            if (deploymentName == null)
 1524            {
 01525                throw new ArgumentNullException(nameof(deploymentName));
 1526            }
 01527            if (parameters == null)
 1528            {
 01529                throw new ArgumentNullException(nameof(parameters));
 1530            }
 1531
 01532            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartCreateOrUpdateAtTenantScope");
 01533            scope0.Start();
 1534            try
 1535            {
 01536                var originalResponse = RestClient.CreateOrUpdateAtTenantScope(deploymentName, parameters, cancellationTo
 01537                return new DeploymentsCreateOrUpdateAtTenantScopeOperation(_clientDiagnostics, _pipeline, RestClient.Cre
 1538            }
 01539            catch (Exception e)
 1540            {
 01541                scope0.Failed(e);
 01542                throw;
 1543            }
 01544        }
 1545
 1546        /// <summary> Validates whether the specified template is syntactically correct and will be accepted by Azure Re
 1547        /// <param name="deploymentName"> The name of the deployment. </param>
 1548        /// <param name="parameters"> Parameters to validate. </param>
 1549        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1550        public virtual async Task<DeploymentsValidateAtTenantScopeOperation> StartValidateAtTenantScopeAsync(string depl
 1551        {
 01552            if (deploymentName == null)
 1553            {
 01554                throw new ArgumentNullException(nameof(deploymentName));
 1555            }
 01556            if (parameters == null)
 1557            {
 01558                throw new ArgumentNullException(nameof(parameters));
 1559            }
 1560
 01561            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartValidateAtTenantScope");
 01562            scope0.Start();
 1563            try
 1564            {
 01565                var originalResponse = await RestClient.ValidateAtTenantScopeAsync(deploymentName, parameters, cancellat
 01566                return new DeploymentsValidateAtTenantScopeOperation(_clientDiagnostics, _pipeline, RestClient.CreateVal
 1567            }
 01568            catch (Exception e)
 1569            {
 01570                scope0.Failed(e);
 01571                throw;
 1572            }
 01573        }
 1574
 1575        /// <summary> Validates whether the specified template is syntactically correct and will be accepted by Azure Re
 1576        /// <param name="deploymentName"> The name of the deployment. </param>
 1577        /// <param name="parameters"> Parameters to validate. </param>
 1578        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1579        public virtual DeploymentsValidateAtTenantScopeOperation StartValidateAtTenantScope(string deploymentName, Scope
 1580        {
 01581            if (deploymentName == null)
 1582            {
 01583                throw new ArgumentNullException(nameof(deploymentName));
 1584            }
 01585            if (parameters == null)
 1586            {
 01587                throw new ArgumentNullException(nameof(parameters));
 1588            }
 1589
 01590            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartValidateAtTenantScope");
 01591            scope0.Start();
 1592            try
 1593            {
 01594                var originalResponse = RestClient.ValidateAtTenantScope(deploymentName, parameters, cancellationToken);
 01595                return new DeploymentsValidateAtTenantScopeOperation(_clientDiagnostics, _pipeline, RestClient.CreateVal
 1596            }
 01597            catch (Exception e)
 1598            {
 01599                scope0.Failed(e);
 01600                throw;
 1601            }
 01602        }
 1603
 1604        /// <summary> A template deployment that is currently running cannot be deleted. Deleting a template deployment 
 1605        /// <param name="groupId"> The management group ID. </param>
 1606        /// <param name="deploymentName"> The name of the deployment. </param>
 1607        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1608        public virtual async Task<DeploymentsDeleteAtManagementGroupScopeOperation> StartDeleteAtManagementGroupScopeAsy
 1609        {
 01610            if (groupId == null)
 1611            {
 01612                throw new ArgumentNullException(nameof(groupId));
 1613            }
 01614            if (deploymentName == null)
 1615            {
 01616                throw new ArgumentNullException(nameof(deploymentName));
 1617            }
 1618
 01619            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartDeleteAtManagementGroupScope")
 01620            scope0.Start();
 1621            try
 1622            {
 01623                var originalResponse = await RestClient.DeleteAtManagementGroupScopeAsync(groupId, deploymentName, cance
 01624                return new DeploymentsDeleteAtManagementGroupScopeOperation(_clientDiagnostics, _pipeline, RestClient.Cr
 1625            }
 01626            catch (Exception e)
 1627            {
 01628                scope0.Failed(e);
 01629                throw;
 1630            }
 01631        }
 1632
 1633        /// <summary> A template deployment that is currently running cannot be deleted. Deleting a template deployment 
 1634        /// <param name="groupId"> The management group ID. </param>
 1635        /// <param name="deploymentName"> The name of the deployment. </param>
 1636        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1637        public virtual DeploymentsDeleteAtManagementGroupScopeOperation StartDeleteAtManagementGroupScope(string groupId
 1638        {
 01639            if (groupId == null)
 1640            {
 01641                throw new ArgumentNullException(nameof(groupId));
 1642            }
 01643            if (deploymentName == null)
 1644            {
 01645                throw new ArgumentNullException(nameof(deploymentName));
 1646            }
 1647
 01648            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartDeleteAtManagementGroupScope")
 01649            scope0.Start();
 1650            try
 1651            {
 01652                var originalResponse = RestClient.DeleteAtManagementGroupScope(groupId, deploymentName, cancellationToke
 01653                return new DeploymentsDeleteAtManagementGroupScopeOperation(_clientDiagnostics, _pipeline, RestClient.Cr
 1654            }
 01655            catch (Exception e)
 1656            {
 01657                scope0.Failed(e);
 01658                throw;
 1659            }
 01660        }
 1661
 1662        /// <summary> You can provide the template and parameters directly in the request or link to JSON files. </summa
 1663        /// <param name="groupId"> The management group ID. </param>
 1664        /// <param name="deploymentName"> The name of the deployment. </param>
 1665        /// <param name="parameters"> Additional parameters supplied to the operation. </param>
 1666        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1667        public virtual async Task<DeploymentsCreateOrUpdateAtManagementGroupScopeOperation> StartCreateOrUpdateAtManagem
 1668        {
 21669            if (groupId == null)
 1670            {
 01671                throw new ArgumentNullException(nameof(groupId));
 1672            }
 21673            if (deploymentName == null)
 1674            {
 01675                throw new ArgumentNullException(nameof(deploymentName));
 1676            }
 21677            if (parameters == null)
 1678            {
 01679                throw new ArgumentNullException(nameof(parameters));
 1680            }
 1681
 21682            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartCreateOrUpdateAtManagementGrou
 21683            scope0.Start();
 1684            try
 1685            {
 21686                var originalResponse = await RestClient.CreateOrUpdateAtManagementGroupScopeAsync(groupId, deploymentNam
 21687                return new DeploymentsCreateOrUpdateAtManagementGroupScopeOperation(_clientDiagnostics, _pipeline, RestC
 1688            }
 01689            catch (Exception e)
 1690            {
 01691                scope0.Failed(e);
 01692                throw;
 1693            }
 21694        }
 1695
 1696        /// <summary> You can provide the template and parameters directly in the request or link to JSON files. </summa
 1697        /// <param name="groupId"> The management group ID. </param>
 1698        /// <param name="deploymentName"> The name of the deployment. </param>
 1699        /// <param name="parameters"> Additional parameters supplied to the operation. </param>
 1700        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1701        public virtual DeploymentsCreateOrUpdateAtManagementGroupScopeOperation StartCreateOrUpdateAtManagementGroupScop
 1702        {
 21703            if (groupId == null)
 1704            {
 01705                throw new ArgumentNullException(nameof(groupId));
 1706            }
 21707            if (deploymentName == null)
 1708            {
 01709                throw new ArgumentNullException(nameof(deploymentName));
 1710            }
 21711            if (parameters == null)
 1712            {
 01713                throw new ArgumentNullException(nameof(parameters));
 1714            }
 1715
 21716            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartCreateOrUpdateAtManagementGrou
 21717            scope0.Start();
 1718            try
 1719            {
 21720                var originalResponse = RestClient.CreateOrUpdateAtManagementGroupScope(groupId, deploymentName, paramete
 21721                return new DeploymentsCreateOrUpdateAtManagementGroupScopeOperation(_clientDiagnostics, _pipeline, RestC
 1722            }
 01723            catch (Exception e)
 1724            {
 01725                scope0.Failed(e);
 01726                throw;
 1727            }
 21728        }
 1729
 1730        /// <summary> Validates whether the specified template is syntactically correct and will be accepted by Azure Re
 1731        /// <param name="groupId"> The management group ID. </param>
 1732        /// <param name="deploymentName"> The name of the deployment. </param>
 1733        /// <param name="parameters"> Parameters to validate. </param>
 1734        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1735        public virtual async Task<DeploymentsValidateAtManagementGroupScopeOperation> StartValidateAtManagementGroupScop
 1736        {
 21737            if (groupId == null)
 1738            {
 01739                throw new ArgumentNullException(nameof(groupId));
 1740            }
 21741            if (deploymentName == null)
 1742            {
 01743                throw new ArgumentNullException(nameof(deploymentName));
 1744            }
 21745            if (parameters == null)
 1746            {
 01747                throw new ArgumentNullException(nameof(parameters));
 1748            }
 1749
 21750            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartValidateAtManagementGroupScope
 21751            scope0.Start();
 1752            try
 1753            {
 21754                var originalResponse = await RestClient.ValidateAtManagementGroupScopeAsync(groupId, deploymentName, par
 21755                return new DeploymentsValidateAtManagementGroupScopeOperation(_clientDiagnostics, _pipeline, RestClient.
 1756            }
 01757            catch (Exception e)
 1758            {
 01759                scope0.Failed(e);
 01760                throw;
 1761            }
 21762        }
 1763
 1764        /// <summary> Validates whether the specified template is syntactically correct and will be accepted by Azure Re
 1765        /// <param name="groupId"> The management group ID. </param>
 1766        /// <param name="deploymentName"> The name of the deployment. </param>
 1767        /// <param name="parameters"> Parameters to validate. </param>
 1768        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1769        public virtual DeploymentsValidateAtManagementGroupScopeOperation StartValidateAtManagementGroupScope(string gro
 1770        {
 21771            if (groupId == null)
 1772            {
 01773                throw new ArgumentNullException(nameof(groupId));
 1774            }
 21775            if (deploymentName == null)
 1776            {
 01777                throw new ArgumentNullException(nameof(deploymentName));
 1778            }
 21779            if (parameters == null)
 1780            {
 01781                throw new ArgumentNullException(nameof(parameters));
 1782            }
 1783
 21784            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartValidateAtManagementGroupScope
 21785            scope0.Start();
 1786            try
 1787            {
 21788                var originalResponse = RestClient.ValidateAtManagementGroupScope(groupId, deploymentName, parameters, ca
 21789                return new DeploymentsValidateAtManagementGroupScopeOperation(_clientDiagnostics, _pipeline, RestClient.
 1790            }
 01791            catch (Exception e)
 1792            {
 01793                scope0.Failed(e);
 01794                throw;
 1795            }
 21796        }
 1797
 1798        /// <summary> A template deployment that is currently running cannot be deleted. Deleting a template deployment 
 1799        /// <param name="deploymentName"> The name of the deployment. </param>
 1800        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1801        public virtual async Task<DeploymentsDeleteAtSubscriptionScopeOperation> StartDeleteAtSubscriptionScopeAsync(str
 1802        {
 01803            if (deploymentName == null)
 1804            {
 01805                throw new ArgumentNullException(nameof(deploymentName));
 1806            }
 1807
 01808            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartDeleteAtSubscriptionScope");
 01809            scope0.Start();
 1810            try
 1811            {
 01812                var originalResponse = await RestClient.DeleteAtSubscriptionScopeAsync(deploymentName, cancellationToken
 01813                return new DeploymentsDeleteAtSubscriptionScopeOperation(_clientDiagnostics, _pipeline, RestClient.Creat
 1814            }
 01815            catch (Exception e)
 1816            {
 01817                scope0.Failed(e);
 01818                throw;
 1819            }
 01820        }
 1821
 1822        /// <summary> A template deployment that is currently running cannot be deleted. Deleting a template deployment 
 1823        /// <param name="deploymentName"> The name of the deployment. </param>
 1824        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1825        public virtual DeploymentsDeleteAtSubscriptionScopeOperation StartDeleteAtSubscriptionScope(string deploymentNam
 1826        {
 01827            if (deploymentName == null)
 1828            {
 01829                throw new ArgumentNullException(nameof(deploymentName));
 1830            }
 1831
 01832            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartDeleteAtSubscriptionScope");
 01833            scope0.Start();
 1834            try
 1835            {
 01836                var originalResponse = RestClient.DeleteAtSubscriptionScope(deploymentName, cancellationToken);
 01837                return new DeploymentsDeleteAtSubscriptionScopeOperation(_clientDiagnostics, _pipeline, RestClient.Creat
 1838            }
 01839            catch (Exception e)
 1840            {
 01841                scope0.Failed(e);
 01842                throw;
 1843            }
 01844        }
 1845
 1846        /// <summary> You can provide the template and parameters directly in the request or link to JSON files. </summa
 1847        /// <param name="deploymentName"> The name of the deployment. </param>
 1848        /// <param name="parameters"> Additional parameters supplied to the operation. </param>
 1849        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1850        public virtual async Task<DeploymentsCreateOrUpdateAtSubscriptionScopeOperation> StartCreateOrUpdateAtSubscripti
 1851        {
 41852            if (deploymentName == null)
 1853            {
 01854                throw new ArgumentNullException(nameof(deploymentName));
 1855            }
 41856            if (parameters == null)
 1857            {
 01858                throw new ArgumentNullException(nameof(parameters));
 1859            }
 1860
 41861            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartCreateOrUpdateAtSubscriptionSc
 41862            scope0.Start();
 1863            try
 1864            {
 41865                var originalResponse = await RestClient.CreateOrUpdateAtSubscriptionScopeAsync(deploymentName, parameter
 41866                return new DeploymentsCreateOrUpdateAtSubscriptionScopeOperation(_clientDiagnostics, _pipeline, RestClie
 1867            }
 01868            catch (Exception e)
 1869            {
 01870                scope0.Failed(e);
 01871                throw;
 1872            }
 41873        }
 1874
 1875        /// <summary> You can provide the template and parameters directly in the request or link to JSON files. </summa
 1876        /// <param name="deploymentName"> The name of the deployment. </param>
 1877        /// <param name="parameters"> Additional parameters supplied to the operation. </param>
 1878        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1879        public virtual DeploymentsCreateOrUpdateAtSubscriptionScopeOperation StartCreateOrUpdateAtSubscriptionScope(stri
 1880        {
 41881            if (deploymentName == null)
 1882            {
 01883                throw new ArgumentNullException(nameof(deploymentName));
 1884            }
 41885            if (parameters == null)
 1886            {
 01887                throw new ArgumentNullException(nameof(parameters));
 1888            }
 1889
 41890            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartCreateOrUpdateAtSubscriptionSc
 41891            scope0.Start();
 1892            try
 1893            {
 41894                var originalResponse = RestClient.CreateOrUpdateAtSubscriptionScope(deploymentName, parameters, cancella
 41895                return new DeploymentsCreateOrUpdateAtSubscriptionScopeOperation(_clientDiagnostics, _pipeline, RestClie
 1896            }
 01897            catch (Exception e)
 1898            {
 01899                scope0.Failed(e);
 01900                throw;
 1901            }
 41902        }
 1903
 1904        /// <summary> Validates whether the specified template is syntactically correct and will be accepted by Azure Re
 1905        /// <param name="deploymentName"> The name of the deployment. </param>
 1906        /// <param name="parameters"> Parameters to validate. </param>
 1907        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1908        public virtual async Task<DeploymentsValidateAtSubscriptionScopeOperation> StartValidateAtSubscriptionScopeAsync
 1909        {
 21910            if (deploymentName == null)
 1911            {
 01912                throw new ArgumentNullException(nameof(deploymentName));
 1913            }
 21914            if (parameters == null)
 1915            {
 01916                throw new ArgumentNullException(nameof(parameters));
 1917            }
 1918
 21919            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartValidateAtSubscriptionScope");
 21920            scope0.Start();
 1921            try
 1922            {
 21923                var originalResponse = await RestClient.ValidateAtSubscriptionScopeAsync(deploymentName, parameters, can
 21924                return new DeploymentsValidateAtSubscriptionScopeOperation(_clientDiagnostics, _pipeline, RestClient.Cre
 1925            }
 01926            catch (Exception e)
 1927            {
 01928                scope0.Failed(e);
 01929                throw;
 1930            }
 21931        }
 1932
 1933        /// <summary> Validates whether the specified template is syntactically correct and will be accepted by Azure Re
 1934        /// <param name="deploymentName"> The name of the deployment. </param>
 1935        /// <param name="parameters"> Parameters to validate. </param>
 1936        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1937        public virtual DeploymentsValidateAtSubscriptionScopeOperation StartValidateAtSubscriptionScope(string deploymen
 1938        {
 21939            if (deploymentName == null)
 1940            {
 01941                throw new ArgumentNullException(nameof(deploymentName));
 1942            }
 21943            if (parameters == null)
 1944            {
 01945                throw new ArgumentNullException(nameof(parameters));
 1946            }
 1947
 21948            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartValidateAtSubscriptionScope");
 21949            scope0.Start();
 1950            try
 1951            {
 21952                var originalResponse = RestClient.ValidateAtSubscriptionScope(deploymentName, parameters, cancellationTo
 21953                return new DeploymentsValidateAtSubscriptionScopeOperation(_clientDiagnostics, _pipeline, RestClient.Cre
 1954            }
 01955            catch (Exception e)
 1956            {
 01957                scope0.Failed(e);
 01958                throw;
 1959            }
 21960        }
 1961
 1962        /// <summary> Returns changes that will be made by the deployment if executed at the scope of the subscription. 
 1963        /// <param name="deploymentName"> The name of the deployment. </param>
 1964        /// <param name="parameters"> Parameters to What If. </param>
 1965        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1966        public virtual async Task<DeploymentsWhatIfAtSubscriptionScopeOperation> StartWhatIfAtSubscriptionScopeAsync(str
 1967        {
 181968            if (deploymentName == null)
 1969            {
 01970                throw new ArgumentNullException(nameof(deploymentName));
 1971            }
 181972            if (parameters == null)
 1973            {
 01974                throw new ArgumentNullException(nameof(parameters));
 1975            }
 1976
 181977            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartWhatIfAtSubscriptionScope");
 181978            scope0.Start();
 1979            try
 1980            {
 181981                var originalResponse = await RestClient.WhatIfAtSubscriptionScopeAsync(deploymentName, parameters, cance
 181982                return new DeploymentsWhatIfAtSubscriptionScopeOperation(_clientDiagnostics, _pipeline, RestClient.Creat
 1983            }
 01984            catch (Exception e)
 1985            {
 01986                scope0.Failed(e);
 01987                throw;
 1988            }
 181989        }
 1990
 1991        /// <summary> Returns changes that will be made by the deployment if executed at the scope of the subscription. 
 1992        /// <param name="deploymentName"> The name of the deployment. </param>
 1993        /// <param name="parameters"> Parameters to What If. </param>
 1994        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1995        public virtual DeploymentsWhatIfAtSubscriptionScopeOperation StartWhatIfAtSubscriptionScope(string deploymentNam
 1996        {
 181997            if (deploymentName == null)
 1998            {
 01999                throw new ArgumentNullException(nameof(deploymentName));
 2000            }
 182001            if (parameters == null)
 2002            {
 02003                throw new ArgumentNullException(nameof(parameters));
 2004            }
 2005
 182006            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartWhatIfAtSubscriptionScope");
 182007            scope0.Start();
 2008            try
 2009            {
 182010                var originalResponse = RestClient.WhatIfAtSubscriptionScope(deploymentName, parameters, cancellationToke
 182011                return new DeploymentsWhatIfAtSubscriptionScopeOperation(_clientDiagnostics, _pipeline, RestClient.Creat
 2012            }
 02013            catch (Exception e)
 2014            {
 02015                scope0.Failed(e);
 02016                throw;
 2017            }
 182018        }
 2019
 2020        /// <summary> A template deployment that is currently running cannot be deleted. Deleting a template deployment 
 2021        /// <param name="resourceGroupName"> The name of the resource group with the deployment to delete. The name is c
 2022        /// <param name="deploymentName"> The name of the deployment. </param>
 2023        /// <param name="cancellationToken"> The cancellation token to use. </param>
 2024        public virtual async Task<DeploymentsDeleteOperation> StartDeleteAsync(string resourceGroupName, string deployme
 2025        {
 02026            if (resourceGroupName == null)
 2027            {
 02028                throw new ArgumentNullException(nameof(resourceGroupName));
 2029            }
 02030            if (deploymentName == null)
 2031            {
 02032                throw new ArgumentNullException(nameof(deploymentName));
 2033            }
 2034
 02035            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartDelete");
 02036            scope0.Start();
 2037            try
 2038            {
 02039                var originalResponse = await RestClient.DeleteAsync(resourceGroupName, deploymentName, cancellationToken
 02040                return new DeploymentsDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(reso
 2041            }
 02042            catch (Exception e)
 2043            {
 02044                scope0.Failed(e);
 02045                throw;
 2046            }
 02047        }
 2048
 2049        /// <summary> A template deployment that is currently running cannot be deleted. Deleting a template deployment 
 2050        /// <param name="resourceGroupName"> The name of the resource group with the deployment to delete. The name is c
 2051        /// <param name="deploymentName"> The name of the deployment. </param>
 2052        /// <param name="cancellationToken"> The cancellation token to use. </param>
 2053        public virtual DeploymentsDeleteOperation StartDelete(string resourceGroupName, string deploymentName, Cancellat
 2054        {
 02055            if (resourceGroupName == null)
 2056            {
 02057                throw new ArgumentNullException(nameof(resourceGroupName));
 2058            }
 02059            if (deploymentName == null)
 2060            {
 02061                throw new ArgumentNullException(nameof(deploymentName));
 2062            }
 2063
 02064            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartDelete");
 02065            scope0.Start();
 2066            try
 2067            {
 02068                var originalResponse = RestClient.Delete(resourceGroupName, deploymentName, cancellationToken);
 02069                return new DeploymentsDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(reso
 2070            }
 02071            catch (Exception e)
 2072            {
 02073                scope0.Failed(e);
 02074                throw;
 2075            }
 02076        }
 2077
 2078        /// <summary> You can provide the template and parameters directly in the request or link to JSON files. </summa
 2079        /// <param name="resourceGroupName"> The name of the resource group to deploy the resources to. The name is case
 2080        /// <param name="deploymentName"> The name of the deployment. </param>
 2081        /// <param name="parameters"> Additional parameters supplied to the operation. </param>
 2082        /// <param name="cancellationToken"> The cancellation token to use. </param>
 2083        public virtual async Task<DeploymentsCreateOrUpdateOperation> StartCreateOrUpdateAsync(string resourceGroupName,
 2084        {
 162085            if (resourceGroupName == null)
 2086            {
 02087                throw new ArgumentNullException(nameof(resourceGroupName));
 2088            }
 162089            if (deploymentName == null)
 2090            {
 02091                throw new ArgumentNullException(nameof(deploymentName));
 2092            }
 162093            if (parameters == null)
 2094            {
 02095                throw new ArgumentNullException(nameof(parameters));
 2096            }
 2097
 162098            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartCreateOrUpdate");
 162099            scope0.Start();
 2100            try
 2101            {
 162102                var originalResponse = await RestClient.CreateOrUpdateAsync(resourceGroupName, deploymentName, parameter
 162103                return new DeploymentsCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrUp
 2104            }
 02105            catch (Exception e)
 2106            {
 02107                scope0.Failed(e);
 02108                throw;
 2109            }
 162110        }
 2111
 2112        /// <summary> You can provide the template and parameters directly in the request or link to JSON files. </summa
 2113        /// <param name="resourceGroupName"> The name of the resource group to deploy the resources to. The name is case
 2114        /// <param name="deploymentName"> The name of the deployment. </param>
 2115        /// <param name="parameters"> Additional parameters supplied to the operation. </param>
 2116        /// <param name="cancellationToken"> The cancellation token to use. </param>
 2117        public virtual DeploymentsCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string deploymen
 2118        {
 162119            if (resourceGroupName == null)
 2120            {
 02121                throw new ArgumentNullException(nameof(resourceGroupName));
 2122            }
 162123            if (deploymentName == null)
 2124            {
 02125                throw new ArgumentNullException(nameof(deploymentName));
 2126            }
 162127            if (parameters == null)
 2128            {
 02129                throw new ArgumentNullException(nameof(parameters));
 2130            }
 2131
 162132            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartCreateOrUpdate");
 162133            scope0.Start();
 2134            try
 2135            {
 162136                var originalResponse = RestClient.CreateOrUpdate(resourceGroupName, deploymentName, parameters, cancella
 162137                return new DeploymentsCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrUp
 2138            }
 02139            catch (Exception e)
 2140            {
 02141                scope0.Failed(e);
 02142                throw;
 2143            }
 162144        }
 2145
 2146        /// <summary> Validates whether the specified template is syntactically correct and will be accepted by Azure Re
 2147        /// <param name="resourceGroupName"> The name of the resource group the template will be deployed to. The name i
 2148        /// <param name="deploymentName"> The name of the deployment. </param>
 2149        /// <param name="parameters"> Parameters to validate. </param>
 2150        /// <param name="cancellationToken"> The cancellation token to use. </param>
 2151        public virtual async Task<DeploymentsValidateOperation> StartValidateAsync(string resourceGroupName, string depl
 2152        {
 122153            if (resourceGroupName == null)
 2154            {
 02155                throw new ArgumentNullException(nameof(resourceGroupName));
 2156            }
 122157            if (deploymentName == null)
 2158            {
 02159                throw new ArgumentNullException(nameof(deploymentName));
 2160            }
 122161            if (parameters == null)
 2162            {
 02163                throw new ArgumentNullException(nameof(parameters));
 2164            }
 2165
 122166            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartValidate");
 122167            scope0.Start();
 2168            try
 2169            {
 122170                var originalResponse = await RestClient.ValidateAsync(resourceGroupName, deploymentName, parameters, can
 122171                return new DeploymentsValidateOperation(_clientDiagnostics, _pipeline, RestClient.CreateValidateRequest(
 2172            }
 02173            catch (Exception e)
 2174            {
 02175                scope0.Failed(e);
 02176                throw;
 2177            }
 122178        }
 2179
 2180        /// <summary> Validates whether the specified template is syntactically correct and will be accepted by Azure Re
 2181        /// <param name="resourceGroupName"> The name of the resource group the template will be deployed to. The name i
 2182        /// <param name="deploymentName"> The name of the deployment. </param>
 2183        /// <param name="parameters"> Parameters to validate. </param>
 2184        /// <param name="cancellationToken"> The cancellation token to use. </param>
 2185        public virtual DeploymentsValidateOperation StartValidate(string resourceGroupName, string deploymentName, Deplo
 2186        {
 122187            if (resourceGroupName == null)
 2188            {
 02189                throw new ArgumentNullException(nameof(resourceGroupName));
 2190            }
 122191            if (deploymentName == null)
 2192            {
 02193                throw new ArgumentNullException(nameof(deploymentName));
 2194            }
 122195            if (parameters == null)
 2196            {
 02197                throw new ArgumentNullException(nameof(parameters));
 2198            }
 2199
 122200            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartValidate");
 122201            scope0.Start();
 2202            try
 2203            {
 122204                var originalResponse = RestClient.Validate(resourceGroupName, deploymentName, parameters, cancellationTo
 122205                return new DeploymentsValidateOperation(_clientDiagnostics, _pipeline, RestClient.CreateValidateRequest(
 2206            }
 02207            catch (Exception e)
 2208            {
 02209                scope0.Failed(e);
 02210                throw;
 2211            }
 122212        }
 2213
 2214        /// <summary> Returns changes that will be made by the deployment if executed at the scope of the resource group
 2215        /// <param name="resourceGroupName"> The name of the resource group the template will be deployed to. The name i
 2216        /// <param name="deploymentName"> The name of the deployment. </param>
 2217        /// <param name="parameters"> Parameters to validate. </param>
 2218        /// <param name="cancellationToken"> The cancellation token to use. </param>
 2219        public virtual async Task<DeploymentsWhatIfOperation> StartWhatIfAsync(string resourceGroupName, string deployme
 2220        {
 202221            if (resourceGroupName == null)
 2222            {
 02223                throw new ArgumentNullException(nameof(resourceGroupName));
 2224            }
 202225            if (deploymentName == null)
 2226            {
 02227                throw new ArgumentNullException(nameof(deploymentName));
 2228            }
 202229            if (parameters == null)
 2230            {
 02231                throw new ArgumentNullException(nameof(parameters));
 2232            }
 2233
 202234            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartWhatIf");
 202235            scope0.Start();
 2236            try
 2237            {
 202238                var originalResponse = await RestClient.WhatIfAsync(resourceGroupName, deploymentName, parameters, cance
 202239                return new DeploymentsWhatIfOperation(_clientDiagnostics, _pipeline, RestClient.CreateWhatIfRequest(reso
 2240            }
 02241            catch (Exception e)
 2242            {
 02243                scope0.Failed(e);
 02244                throw;
 2245            }
 202246        }
 2247
 2248        /// <summary> Returns changes that will be made by the deployment if executed at the scope of the resource group
 2249        /// <param name="resourceGroupName"> The name of the resource group the template will be deployed to. The name i
 2250        /// <param name="deploymentName"> The name of the deployment. </param>
 2251        /// <param name="parameters"> Parameters to validate. </param>
 2252        /// <param name="cancellationToken"> The cancellation token to use. </param>
 2253        public virtual DeploymentsWhatIfOperation StartWhatIf(string resourceGroupName, string deploymentName, Deploymen
 2254        {
 202255            if (resourceGroupName == null)
 2256            {
 02257                throw new ArgumentNullException(nameof(resourceGroupName));
 2258            }
 202259            if (deploymentName == null)
 2260            {
 02261                throw new ArgumentNullException(nameof(deploymentName));
 2262            }
 202263            if (parameters == null)
 2264            {
 02265                throw new ArgumentNullException(nameof(parameters));
 2266            }
 2267
 202268            using var scope0 = _clientDiagnostics.CreateScope("DeploymentsOperations.StartWhatIf");
 202269            scope0.Start();
 2270            try
 2271            {
 202272                var originalResponse = RestClient.WhatIf(resourceGroupName, deploymentName, parameters, cancellationToke
 202273                return new DeploymentsWhatIfOperation(_clientDiagnostics, _pipeline, RestClient.CreateWhatIfRequest(reso
 2274            }
 02275            catch (Exception e)
 2276            {
 02277                scope0.Failed(e);
 02278                throw;
 2279            }
 202280        }
 2281    }
 2282}

Methods/Properties

get_RestClient()
.ctor()
.ctor(...)
CheckExistenceAtScopeAsync()
CheckExistenceAtScope(...)
GetAtScopeAsync()
GetAtScope(...)
CancelAtScopeAsync()
CancelAtScope(...)
ExportTemplateAtScopeAsync()
ExportTemplateAtScope(...)
CheckExistenceAtTenantScopeAsync()
CheckExistenceAtTenantScope(...)
GetAtTenantScopeAsync()
GetAtTenantScope(...)
CancelAtTenantScopeAsync()
CancelAtTenantScope(...)
ExportTemplateAtTenantScopeAsync()
ExportTemplateAtTenantScope(...)
CheckExistenceAtManagementGroupScopeAsync()
CheckExistenceAtManagementGroupScope(...)
GetAtManagementGroupScopeAsync()
GetAtManagementGroupScope(...)
CancelAtManagementGroupScopeAsync()
CancelAtManagementGroupScope(...)
ExportTemplateAtManagementGroupScopeAsync()
ExportTemplateAtManagementGroupScope(...)
CheckExistenceAtSubscriptionScopeAsync()
CheckExistenceAtSubscriptionScope(...)
GetAtSubscriptionScopeAsync()
GetAtSubscriptionScope(...)
CancelAtSubscriptionScopeAsync()
CancelAtSubscriptionScope(...)
ExportTemplateAtSubscriptionScopeAsync()
ExportTemplateAtSubscriptionScope(...)
CheckExistenceAsync()
CheckExistence(...)
GetAsync()
Get(...)
CancelAsync()
Cancel(...)
ExportTemplateAsync()
ExportTemplate(...)
CalculateTemplateHashAsync()
CalculateTemplateHash(...)
ListAtScopeAsync(...)
<ListAtScopeAsync()
<ListAtScopeAsync()
ListAtScope(...)
<ListAtTenantScopeAsync()
<ListAtTenantScopeAsync()
ListAtTenantScopeAsync(...)
ListAtTenantScope(...)
ListAtManagementGroupScopeAsync(...)
<ListAtManagementGroupScopeAsync()
<ListAtManagementGroupScopeAsync()
ListAtManagementGroupScope(...)
<ListAtSubscriptionScopeAsync()
<ListAtSubscriptionScopeAsync()
ListAtSubscriptionScopeAsync(...)
ListAtSubscriptionScope(...)
ListByResourceGroupAsync(...)
<ListByResourceGroupAsync()
<ListByResourceGroupAsync()
ListByResourceGroup(...)
StartDeleteAtScopeAsync()
StartDeleteAtScope(...)
StartCreateOrUpdateAtScopeAsync()
StartCreateOrUpdateAtScope(...)
StartValidateAtScopeAsync()
StartValidateAtScope(...)
StartDeleteAtTenantScopeAsync()
StartDeleteAtTenantScope(...)
StartCreateOrUpdateAtTenantScopeAsync()
StartCreateOrUpdateAtTenantScope(...)
StartValidateAtTenantScopeAsync()
StartValidateAtTenantScope(...)
StartDeleteAtManagementGroupScopeAsync()
StartDeleteAtManagementGroupScope(...)
StartCreateOrUpdateAtManagementGroupScopeAsync()
StartCreateOrUpdateAtManagementGroupScope(...)
StartValidateAtManagementGroupScopeAsync()
StartValidateAtManagementGroupScope(...)
StartDeleteAtSubscriptionScopeAsync()
StartDeleteAtSubscriptionScope(...)
StartCreateOrUpdateAtSubscriptionScopeAsync()
StartCreateOrUpdateAtSubscriptionScope(...)
StartValidateAtSubscriptionScopeAsync()
StartValidateAtSubscriptionScope(...)
StartWhatIfAtSubscriptionScopeAsync()
StartWhatIfAtSubscriptionScope(...)
StartDeleteAsync()
StartDelete(...)
StartCreateOrUpdateAsync()
StartCreateOrUpdate(...)
StartValidateAsync()
StartValidate(...)
StartWhatIfAsync()
StartWhatIf(...)