你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

DeploymentOperationsExtensions.RollbackUpdateOrUpgradeByDeploymentSlot 方法

定义

回滚更新或按部署槽位升级操作将取消正在进行的配置更新,并将部署返回到其启动更新之前的状态。 只有在部署中正在进行更新时,才能调用此操作。 可以通过调用“获取部署”操作或“获取托管服务属性”操作并检查 RollbackAllowed 元素来检测部署状态。 如果返回的值为 true,则可以执行回滚。 (有关详细信息,请参阅 http://msdn.microsoft.com/en-us/library/windowsazure/hh403977.aspx)

public static Microsoft.Azure.AzureOperationResponse RollbackUpdateOrUpgradeByDeploymentSlot (this Microsoft.WindowsAzure.Management.Compute.IDeploymentOperations operations, string serviceName, Microsoft.WindowsAzure.Management.Compute.Models.DeploymentSlot deploymentSlot, Microsoft.WindowsAzure.Management.Compute.Models.DeploymentRollbackUpdateOrUpgradeParameters parameters);
static member RollbackUpdateOrUpgradeByDeploymentSlot : Microsoft.WindowsAzure.Management.Compute.IDeploymentOperations * string * Microsoft.WindowsAzure.Management.Compute.Models.DeploymentSlot * Microsoft.WindowsAzure.Management.Compute.Models.DeploymentRollbackUpdateOrUpgradeParameters -> Microsoft.Azure.AzureOperationResponse
<Extension()>
Public Function RollbackUpdateOrUpgradeByDeploymentSlot (operations As IDeploymentOperations, serviceName As String, deploymentSlot As DeploymentSlot, parameters As DeploymentRollbackUpdateOrUpgradeParameters) As AzureOperationResponse

参数

operations
IDeploymentOperations

对 Microsoft.WindowsAzure.Management.Compute.IDeploymentOperations 的引用。

serviceName
String

必需。 要交换部署的云服务。

deploymentSlot
DeploymentSlot

必需。 部署槽位。

parameters
DeploymentRollbackUpdateOrUpgradeParameters

必需。 提供给“按部署槽位回滚更新或升级”操作的参数。

返回

Microsoft.Azure.AzureOperationResponse

标准服务响应,包括 HTTP 状态代码和请求 ID。

适用于