/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Operations = new Operations(this); Deployments = new DeploymentsOperations(this); Providers = new ProvidersOperations(this); Resources = new ResourcesOperations(this); ResourceGroups = new ResourceGroupsOperations(this); Tags = new TagsOperations(this); DeploymentOperations = new DeploymentOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2019-07-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; SerializationSettings = new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; CustomInitialize(); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }
/// <summary> /// Initializes a new instance of the ComputeManagementClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public ComputeManagementClient(HttpClient httpClient) : base(httpClient) { this._deployments = new DeploymentOperations(this); this._dnsServer = new DNSServerOperations(this); this._extensionImages = new ExtensionImageOperations(this); this._hostedServices = new HostedServiceOperations(this); this._loadBalancers = new LoadBalancerOperations(this); this._operatingSystems = new OperatingSystemOperations(this); this._serviceCertificates = new ServiceCertificateOperations(this); this._virtualMachineDisks = new VirtualMachineDiskOperations(this); this._virtualMachineExtensions = new VirtualMachineExtensionOperations(this); this._virtualMachines = new VirtualMachineOperations(this); this._virtualMachineOSImages = new VirtualMachineOSImageOperations(this); this._virtualMachineVMImages = new VirtualMachineVMImageOperations(this); this._apiVersion = "2014-10-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Get a deployment. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Resources.IDeploymentOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group to get. The name is case /// insensitive. /// </param> /// <param name='deploymentName'> /// Required. The name of the deployment. /// </param> /// <returns> /// Template deployment information. /// </returns> public static Task <DeploymentGetResult> GetAsync(this IDeploymentOperations operations, string resourceGroupName, string deploymentName) { return(operations.GetAsync(resourceGroupName, deploymentName, CancellationToken.None)); }
/// <summary> /// Get a list of deployments. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Resources.IDeploymentOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group to filter by. The name is /// case insensitive. /// </param> /// <param name='parameters'> /// Optional. Query parameters. If null is passed returns all /// deployments. /// </param> /// <returns> /// List of deployments. /// </returns> public static Task <DeploymentListResult> ListAsync(this IDeploymentOperations operations, string resourceGroupName, DeploymentListParameters parameters) { return(operations.ListAsync(resourceGroupName, parameters, CancellationToken.None)); }
/// <summary> /// Gets all deployments operations for a deployment. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deploymentName'> /// The name of the deployment with the operation to get. /// </param> /// <param name='top'> /// The number of results to return. /// </param> public static IPage <DeploymentOperation> ListAtSubscriptionScope(this IDeploymentOperations operations, string deploymentName, int?top = default(int?)) { return(operations.ListAtSubscriptionScopeAsync(deploymentName, top).GetAwaiter().GetResult()); }
/// <summary> /// Gets all deployments operations for a deployment. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deploymentName'> /// The name of the deployment with the operation to get. /// </param> /// <param name='top'> /// The number of results to return. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <DeploymentOperation> > ListAtSubscriptionScopeAsync(this IDeploymentOperations operations, string deploymentName, int?top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, top, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all deployments operations for a deployment. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The management group ID. /// </param> /// <param name='deploymentName'> /// The name of the deployment. /// </param> /// <param name='top'> /// The number of results to return. /// </param> public static IPage <DeploymentOperation> ListAtManagementGroupScope(this IDeploymentOperations operations, string groupId, string deploymentName, int?top = default(int?)) { return(operations.ListAtManagementGroupScopeAsync(groupId, deploymentName, top).GetAwaiter().GetResult()); }
/// <summary> /// Redeploys a specific website deployment. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.WebSitesExtensions.IDeploymentOperations. /// </param> /// <param name='deploymentId'> /// The deployment identifier. /// </param> /// <returns> /// The deployment information operation response. /// </returns> public static Task <DeploymentUpdateResponse> RedeployAsync(this IDeploymentOperations operations, string deploymentId) { return(operations.RedeployAsync(deploymentId, CancellationToken.None)); }
/// <summary> /// Gets all deployments operations for a deployment. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='deploymentName'> /// The name of the deployment with the operation to get. /// </param> /// <param name='top'> /// The number of results to return. /// </param> public static IPage <DeploymentOperation> List(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, int?top = default(int?)) { return(operations.ListAsync(resourceGroupName, deploymentName, top).GetAwaiter().GetResult()); }
/// <summary> /// Cancel a currently running template deployment. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Resources.IDeploymentOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. The name is case /// insensitive. /// </param> /// <param name='deploymentName'> /// Required. The name of the deployment. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <OperationResponse> CancelAsync(this IDeploymentOperations operations, string resourceGroupName, string deploymentName) { return(operations.CancelAsync(resourceGroupName, deploymentName, CancellationToken.None)); }
/// <summary> /// Gets a deployments operation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deploymentName'> /// The name of the deployment. /// </param> /// <param name='operationId'> /// The ID of the operation to get. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <DeploymentOperationInner> GetAtSubscriptionScopeAsync(this IDeploymentOperations operations, string deploymentName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, operationId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a deployments operation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='deploymentName'> /// The name of the deployment. /// </param> /// <param name='operationId'> /// The ID of the operation to get. /// </param> public static DeploymentOperation Get(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, string operationId) { return(operations.GetAsync(resourceGroupName, deploymentName, operationId).GetAwaiter().GetResult()); }
/// <summary> /// Begin deleting deployment.To determine whether the operation has /// finished processing the request, call /// GetLongRunningOperationStatus. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Internal.Resources.IDeploymentOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. The name is case /// insensitive. /// </param> /// <param name='deploymentName'> /// Required. The name of the deployment to be deleted. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static Task <LongRunningOperationResponse> BeginDeletingAsync(this IDeploymentOperations operations, string resourceGroupName, string deploymentName) { return(operations.BeginDeletingAsync(resourceGroupName, deploymentName, CancellationToken.None)); }
/// <summary> /// Create a named template deployment using a template. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Internal.Resources.IDeploymentOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. The name is case /// insensitive. /// </param> /// <param name='deploymentName'> /// Required. The name of the deployment. /// </param> /// <param name='parameters'> /// Required. Additional parameters supplied to the operation. /// </param> /// <returns> /// Template deployment operation create result. /// </returns> public static Task <DeploymentOperationsCreateResult> CreateOrUpdateAsync(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, Deployment parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, deploymentName, parameters, CancellationToken.None)); }
/// <summary> /// Checks whether deployment exists. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Internal.Resources.IDeploymentOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group to check. The name is case /// insensitive. /// </param> /// <param name='deploymentName'> /// Required. The name of the deployment. /// </param> /// <returns> /// Deployment information. /// </returns> public static Task <DeploymentExistsResult> CheckExistenceAsync(this IDeploymentOperations operations, string resourceGroupName, string deploymentName) { return(operations.CheckExistenceAsync(resourceGroupName, deploymentName, CancellationToken.None)); }
/// <summary> /// Get a list of deployments. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Resources.IDeploymentOperations. /// </param> /// <param name='nextLink'> /// Required. NextLink from the previous successful call to List /// operation. /// </param> /// <returns> /// List of deployments. /// </returns> public static Task <DeploymentListResult> ListNextAsync(this IDeploymentOperations operations, string nextLink) { return(operations.ListNextAsync(nextLink, CancellationToken.None)); }
/// <summary> /// List the deployments for a website. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.WebSitesExtensions.IDeploymentOperations. /// </param> /// <param name='parameters'> /// Additional parameters. /// </param> /// <returns> /// The list of deployments operation response. /// </returns> public static Task <DeploymentListResponse> ListAsync(this IDeploymentOperations operations, DeploymentListParameters parameters) { return(operations.ListAsync(parameters, CancellationToken.None)); }
/// <summary> /// Validate a deployment template. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Resources.IDeploymentOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. The name is case /// insensitive. /// </param> /// <param name='deploymentName'> /// Required. The name of the deployment. /// </param> /// <param name='parameters'> /// Required. Deployment to validate. /// </param> /// <returns> /// Information from validate template deployment response. /// </returns> public static Task <DeploymentValidateResponse> ValidateAsync(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, BasicDeployment parameters) { return(operations.ValidateAsync(resourceGroupName, deploymentName, parameters, CancellationToken.None)); }
/// <summary> /// Gets a deployment for a website. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.WebSitesExtensions.IDeploymentOperations. /// </param> /// <param name='deploymentId'> /// The deployment identifier. /// </param> /// <returns> /// The deployment information operation response. /// </returns> public static Task <DeploymentGetResponse> GetAsync(this IDeploymentOperations operations, string deploymentId) { return(operations.GetAsync(deploymentId, CancellationToken.None)); }
/// <summary> /// Gets all deployments operations for a deployment. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <DeploymentOperation> > ListAtSubscriptionScopeNextAsync(this IDeploymentOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListAtSubscriptionScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a deployments operation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The management group ID. /// </param> /// <param name='deploymentName'> /// The name of the deployment. /// </param> /// <param name='operationId'> /// The ID of the operation to get. /// </param> public static DeploymentOperation GetAtManagementGroupScope(this IDeploymentOperations operations, string groupId, string deploymentName, string operationId) { return(operations.GetAtManagementGroupScopeAsync(groupId, deploymentName, operationId).GetAwaiter().GetResult()); }
/// <summary> /// List the logs for a deployment for a website. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.WebSitesExtensions.IDeploymentOperations. /// </param> /// <param name='deploymentId'> /// The deployment identifier. /// </param> /// <param name='parameters'> /// Additional parameters. /// </param> /// <returns> /// The list of deployments operation response. /// </returns> public static Task <DeploymentListLogsResponse> ListLogsAsync(this IDeploymentOperations operations, string deploymentId, DeploymentListParameters parameters) { return(operations.ListLogsAsync(deploymentId, parameters, CancellationToken.None)); }
/// <summary> /// Gets all deployments operations for a deployment. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <DeploymentOperation> ListNext(this IDeploymentOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Gets a deployments operation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deploymentName'> /// The name of the deployment. /// </param> /// <param name='operationId'> /// The ID of the operation to get. /// </param> public static DeploymentOperation GetAtSubscriptionScope(this IDeploymentOperations operations, string deploymentName, string operationId) { return(operations.GetAtSubscriptionScopeAsync(deploymentName, operationId).GetAwaiter().GetResult()); }
public static Rest.Azure.IPage <DeploymentOperation> List(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, string parameters) { return(operations.List(resourceGroupName, deploymentName)); }