IDeploymentOperations.BeginReimagingRoleInstanceByDeploymentSlotAsync 方法 (String, DeploymentSlot, String, CancellationToken)
以异步方式启动基于部署应用程序指定部署中运行指定的角色实例重置的映像。
命名空间: Microsoft.WindowsAzure.Management.Compute
程序集: Microsoft.WindowsAzure.Management.Compute(Microsoft.WindowsAzure.Management.Compute.dll 中)
语法
Task<AzureOperationResponse> BeginReimagingRoleInstanceByDeploymentSlotAsync(
string serviceName,
DeploymentSlot deploymentSlot,
string roleInstanceName,
CancellationToken cancellationToken
)
Task<AzureOperationResponse^>^ BeginReimagingRoleInstanceByDeploymentSlotAsync(
String^ serviceName,
DeploymentSlot deploymentSlot,
String^ roleInstanceName,
CancellationToken cancellationToken
)
abstract BeginReimagingRoleInstanceByDeploymentSlotAsync :
serviceName:string *
deploymentSlot:DeploymentSlot *
roleInstanceName:string *
cancellationToken:CancellationToken -> Task<AzureOperationResponse>
Function BeginReimagingRoleInstanceByDeploymentSlotAsync (
serviceName As String,
deploymentSlot As DeploymentSlot,
roleInstanceName As String,
cancellationToken As CancellationToken
) As Task(Of AzureOperationResponse)
参数
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<AzureOperationResponse>
OperationResponse 对象,包括 HTTP 状态代码和请求 id。
备注
有关重置角色实例的映像的详细信息,请参阅 Reimage Role Instance。
重新映射角色实例时,将使此实例脱机,并且将应用全新的来宾操作系统映像。 然后再将此角色实例重新联机。 在重置角色映像时 Azure 将尝试在任何本地存储资源中维护数据;但是,如果出现暂时硬件故障,本地存储资源可能会丢失。 如果您的应用程序要求保留此数据,则建议将此数据写入持久数据源,例如 Azure 驱动器。 在重置角色映像时,写入并非本地存储资源定义的本地目录以外的其他目录的所有数据都将丢失。
请参阅
IDeploymentOperations 接口
Microsoft.WindowsAzure.Management.Compute 命名空间
返回页首