/// <summary> /// The Begin Updating Deployment Status By Deployment Slot operation /// initiates a change in the running status of a deployment. The /// status of a deployment can be running or suspended. This operation /// is an asynchronous operation. To determine whether the Management /// service has finished processing the request, call Get Operation /// Status. For more information on asynchronous operations, see /// Tracking Asynchronous Service Management Requests at /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460791.aspx. /// (see /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460808.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Compute.IDeploymentOperations. /// </param> /// <param name='serviceName'> /// Required. The cloud service to swap deployments for. /// </param> /// <param name='deploymentSlot'> /// Required. The deployment slot. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the Begin Updating Deployment /// Status By Deployment Slot operation. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task<AzureOperationResponse> BeginUpdatingStatusByDeploymentSlotAsync(this IDeploymentOperations operations, string serviceName, DeploymentSlot deploymentSlot, DeploymentUpdateStatusParameters parameters) { return operations.BeginUpdatingStatusByDeploymentSlotAsync(serviceName, deploymentSlot, parameters, CancellationToken.None); }
/// <summary> /// The Update Deployment Status operation initiates a change in the /// running status of a deployment. The status of a deployment can be /// running or suspended. The Update Deployment Status operation is /// an asynchronous operation. To determine whether the Management /// service has finished processing the request, call Get Operation /// Status. For more information on asynchronous operations, see /// Tracking Asynchronous Service Management Requests. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460808.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Compute.IDeploymentOperations. /// </param> /// <param name='serviceName'> /// The cloud service to swap deployments for. /// </param> /// <param name='deploymentSlot'> /// The deployment slot. /// </param> /// <param name='parameters'> /// Parameters supplied to the Update Deployment Status operation. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static OperationResponse BeginUpdatingStatusByDeploymentSlot(this IDeploymentOperations operations, string serviceName, DeploymentSlot deploymentSlot, DeploymentUpdateStatusParameters parameters) { try { return operations.BeginUpdatingStatusByDeploymentSlotAsync(serviceName, deploymentSlot, parameters).Result; } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }