Udostępnij za pośrednictwem


IDeploymentOperations.UpgradeByNameAsync Method

Definition

The Upgrade Deployment By Name 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 System.Threading.Tasks.Task<Microsoft.Azure.OperationStatusResponse> UpgradeByNameAsync (string serviceName, string deploymentName, Microsoft.WindowsAzure.Management.Compute.Models.DeploymentUpgradeParameters parameters, System.Threading.CancellationToken cancellationToken);
abstract member UpgradeByNameAsync : string * string * Microsoft.WindowsAzure.Management.Compute.Models.DeploymentUpgradeParameters * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.OperationStatusResponse>
Public Function UpgradeByNameAsync (serviceName As String, deploymentName As String, parameters As DeploymentUpgradeParameters, cancellationToken As CancellationToken) As Task(Of OperationStatusResponse)

Parameters

serviceName
String

The cloud service to upgrade.

deploymentName
String

The deployment to upgrade.

parameters
DeploymentUpgradeParameters

Parameters supplied to the Upgrade Deployment By Name operation.

cancellationToken
CancellationToken

Cancellation token.

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