Share via


IDeploymentsOperations.CancelAtTenantScopeWithHttpMessagesAsync Method

Definition

Cancels a currently running template deployment.

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse> CancelAtTenantScopeWithHttpMessagesAsync (string deploymentName, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CancelAtTenantScopeWithHttpMessagesAsync : string * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse>
Public Function CancelAtTenantScopeWithHttpMessagesAsync (deploymentName As String, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationResponse)

Parameters

deploymentName
String

The name of the deployment.

customHeaders
Dictionary<String,List<String>>

The headers that will be added to request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Exceptions

Thrown when the operation returned an invalid status code

Thrown when a required parameter is null

Remarks

You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.

Applies to