IDeploymentOperations.RebootRoleInstanceByDeploymentSlotAsync 方法 (String, DeploymentSlot, String, CancellationToken)
以异步方式将根据部署应用程序的指定部署中运行指定的角色实例重新启动。
命名空间: Microsoft.WindowsAzure.Management.Compute
程序集: Microsoft.WindowsAzure.Management.Compute(Microsoft.WindowsAzure.Management.Compute.dll 中)
语法
Task<OperationStatusResponse> RebootRoleInstanceByDeploymentSlotAsync(
string serviceName,
DeploymentSlot deploymentSlot,
string roleInstanceName,
CancellationToken cancellationToken
)
Task<OperationStatusResponse^>^ RebootRoleInstanceByDeploymentSlotAsync(
String^ serviceName,
DeploymentSlot deploymentSlot,
String^ roleInstanceName,
CancellationToken cancellationToken
)
abstract RebootRoleInstanceByDeploymentSlotAsync :
serviceName:string *
deploymentSlot:DeploymentSlot *
roleInstanceName:string *
cancellationToken:CancellationToken -> Task<OperationStatusResponse>
Function RebootRoleInstanceByDeploymentSlotAsync (
serviceName As String,
deploymentSlot As DeploymentSlot,
roleInstanceName As String,
cancellationToken As CancellationToken
) As Task(Of OperationStatusResponse)
参数
serviceName
Type: System.String包含部署的云服务的名称。
deploymentSlot
Type: Microsoft.WindowsAzure.Management.Compute.Models.DeploymentSlot在其中部署该应用程序的环境的名称。
可能的值有:
roleInstanceName
Type: System.String应重新启动的角色实例的名称。
cancellationToken
Type: System.Threading.CancellationToken取消令牌。
返回值
Type: System.Threading.Tasks.Task<OperationStatusResponse>
T:Microsoft.WindowsAzure.Management.Compute.Models.ComputeOperationStatusResponse 对象,其中包含操作的状态。
备注
如果异步操作成功,响应将包括成功的请求的 HTTP 状态代码。 如果异步操作失败,响应将包含失败的请求的 HTTP 状态代码并且还包括有关失败的错误信息。
有关重新启动角色实例的详细信息,请参阅 Reboot Role Instance。
当你重新启动某一角色实例时,会使该实例处于脱机状态,为该实例重新启动基本操作系统,然后使该实例恢复联机状态。 写入本地磁盘的所有数据在两次重新启动之间被持久保存。 处于内存中的所有数据都将丢失。
请参阅
IDeploymentOperations 接口
Microsoft.WindowsAzure.Management.Compute 命名空间
返回页首