DeploymentOperationsExtensions.ReimageRoleInstanceByDeploymentSlot 方法 (IDeploymentOperations, String, DeploymentSlot, String)
重置映像部署应用程序基于指定的部署中运行指定的角色实例。
命名空间: Microsoft.WindowsAzure.Management.Compute
程序集: Microsoft.WindowsAzure.Management.Compute(Microsoft.WindowsAzure.Management.Compute.dll 中)
语法
public static OperationStatusResponse ReimageRoleInstanceByDeploymentSlot(
this IDeploymentOperations operations,
string serviceName,
DeploymentSlot deploymentSlot,
string roleInstanceName
)
public:
[ExtensionAttribute]
static OperationStatusResponse^ ReimageRoleInstanceByDeploymentSlot(
IDeploymentOperations^ operations,
String^ serviceName,
DeploymentSlot deploymentSlot,
String^ roleInstanceName
)
static member ReimageRoleInstanceByDeploymentSlot :
operations:IDeploymentOperations *
serviceName:string *
deploymentSlot:DeploymentSlot *
roleInstanceName:string -> OperationStatusResponse
<ExtensionAttribute>
Public Shared Function ReimageRoleInstanceByDeploymentSlot (
operations As IDeploymentOperations,
serviceName As String,
deploymentSlot As DeploymentSlot,
roleInstanceName As String
) As OperationStatusResponse
参数
operations
Type: Microsoft.WindowsAzure.Management.Compute.IDeploymentOperationsIDeploymentOperations 指定部署操作的对象。
serviceName
Type: System.String包含部署的云服务的名称。
deploymentSlot
Type: Microsoft.WindowsAzure.Management.Compute.Models.DeploymentSlot在其中部署该应用程序的环境的名称。
可能的值有:
roleInstanceName
Type: System.String应重置映像的角色实例的名称。
返回值
Type: Microsoft.Azure.OperationStatusResponse
T:Microsoft.WindowsAzure.Management.Compute.Models.ComputeOperationStatusResponse 对象,其中包含操作的状态。
备注
如果异步操作成功,响应将包括成功的请求的 HTTP 状态代码。 如果异步操作失败,响应将包含失败的请求的 HTTP 状态代码并且还包括有关失败的错误信息。
有关重置角色实例的映像的详细信息,请参阅 Reimage Role Instance。
重新映射角色实例时,将使此实例脱机,并且将应用全新的来宾操作系统映像。 然后再将此角色实例重新联机。 在重置角色映像时 Azure 将尝试在任何本地存储资源中维护数据;但是,如果出现暂时硬件故障,本地存储资源可能会丢失。 如果您的应用程序要求保留此数据,则建议将此数据写入持久数据源,例如 Azure 驱动器。 在重置角色映像时,写入并非本地存储资源定义的本地目录以外的其他目录的所有数据都将丢失。
请参阅
DeploymentOperationsExtensions 类
Microsoft.WindowsAzure.Management.Compute 命名空间
返回页首