/// <summary>
 /// Cancels a currently running template deployment.
 /// </summary>
 /// <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 resource group partially deployed.
 /// </remarks>
 /// <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 to cancel.
 /// </param>
 public static void Cancel(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName)
 {
     operations.CancelAsync(resourceGroupName, deploymentName).GetAwaiter().GetResult();
 }