Dela via


DeploymentOperationsExtensions.UpgradeBySlotAsync Method

Definition

The Upgrade Deployment By Slot operation initiates an update of role instances in a deployment using the package and configuration that you specify. For more information about updating role instances, see Update an Azure Service at http://msdn.microsoft.com/en-us/library/windowsazure/hh472157.aspx. This operation is an asynchronous operation. To determine whether the request has been processed, 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. To perform an automatic update of a deployment, call Upgrade Deployment or Change Deployment Configuration with the Mode element set to automatic. The update proceeds from that point without a need for further input. You can call Get Operation Status to determine when the update is complete. To perform a manual update, first call Upgrade Deployment with the Mode element set to manual. Next, call Walk Upgrade Domain to update each domain within the deployment. You should make sure that the operation is complete by calling Get Operation Status before updating the next domain. Important: An update that adds or removes role instances will result in a configuration update to all roles that are deployed in the cloud service. Existing role instances need to be notified of new role instances so that all role instances can communicate together in the cloud service. By default, a cloud service is deployed with five update domains, which are updated one at a time during an in-place update. For information on modifying the number of update domains in the service definition file, see the Azure Service Definition Schema (.csdef File). To determine the update domain in which a particular instance is running in Windows Azure, use the UpdateDomain property of the RoleInstance class. See the Azure Managed Library Reference at http://msdn.microsoft.com/en-us/library/windowsazure/dd179380.aspx for more information. (see http://msdn.microsoft.com/en-us/library/windowsazure/ee460793.aspx for more information)

public static System.Threading.Tasks.Task<Microsoft.Azure.OperationStatusResponse> UpgradeBySlotAsync (this Microsoft.WindowsAzure.Management.Compute.IDeploymentOperations operations, string serviceName, Microsoft.WindowsAzure.Management.Compute.Models.DeploymentSlot deploymentSlot, Microsoft.WindowsAzure.Management.Compute.Models.DeploymentUpgradeParameters parameters);
static member UpgradeBySlotAsync : Microsoft.WindowsAzure.Management.Compute.IDeploymentOperations * string * Microsoft.WindowsAzure.Management.Compute.Models.DeploymentSlot * Microsoft.WindowsAzure.Management.Compute.Models.DeploymentUpgradeParameters -> System.Threading.Tasks.Task<Microsoft.Azure.OperationStatusResponse>
<Extension()>
Public Function UpgradeBySlotAsync (operations As IDeploymentOperations, serviceName As String, deploymentSlot As DeploymentSlot, parameters As DeploymentUpgradeParameters) As Task(Of OperationStatusResponse)

Parameters

operations
IDeploymentOperations

Reference to the Microsoft.WindowsAzure.Management.Compute.IDeploymentOperations.

serviceName
String

Required. The cloud service to upgrade.

deploymentSlot
DeploymentSlot

Required. The slot to upgrade.

parameters
DeploymentUpgradeParameters

Required. Parameters supplied to the Upgrade Deployment By Slot operation.

Returns

Task<Microsoft.Azure.OperationStatusResponse>

The response body contains the status of the specified asynchronous operation, indicating whether it has succeeded, is inprogress, or has failed. Note that this status is distinct from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous operation succeeded, the response body includes the HTTP status code for the successful request. If the asynchronous operation failed, the response body includes the HTTP status code for the failed request and error information regarding the failure.

Applies to