RedeployInstance_云服务器 ECS_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

RedeployInstance 为异步调用接口,会重启并迁移实例。重新部署成功后,实例进入运行中(Running)状态。重新部署失败时,实例返回原有的物理服务器,并恢复到重新部署前的状态。

调用该接口时,您需要注意:

  • 目标实例必须处于运行中或者已停止状态,调用接口后的实例状态变化:
    • 处于运行中(Running)的实例会进入停止中(Stopping)状态。
    • 处于已停止(Stopped)的实例会进入启动中(Starting)状态。
  • 不支持重新部署专有宿主机上的实例。
  • 被安全控制的实例的OperationLocks中标记了"LockReason": "security"时,不支持重新部署。
  • 不支持响应通过 CreateSimulatedSystemEvent 创建的模拟事件。
  • 在隔离本地盘的系统事件流程中,受损本地盘已隔离但尚未发出因系统维护计划重启并重新初始化坏盘事件(SystemMaintenance.RebootAndReInitErrorDisk)时,也可以调用 RedeployInstance。更多信息,请参见本地盘实例系统事件概述

RedeployInstance 能响应系统事件类型及事件状态请参见下表。

事件名称及参数事件状态
因系统维护实例重启(SystemMaintenance.Reboot)Inquiring、Scheduled
因系统维护实例重新部署(SystemMaintenance.Redeploy)Inquiring、Scheduled
因系统维护重启并更换坏盘(SystemMaintenance.RebootAndIsolateErrorDisk)Inquiring
因系统维护重启并重新初始化坏盘(SystemMaintenance.RebootAndReInitErrorDisk)Inquiring
因系统错误实例重新部署(SystemFailure.Redeploy)Inquiring
仅限使用了本地盘的 ECS 实例:因系统错误实例重新启动(SystemFailure.Reboot)Executing
因系统维护隔离坏盘(SystemMaintenance.IsolateErrorDisk)Inquiring
因系统维护重新初始化坏盘(SystemMaintenance.ReInitErrorDisk)Inquiring
说明 重新部署本地盘实例会重新初始化本地盘,存储设备的数据被清空。

流控信息

请求速率为500/60(s)。

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
ecs:RedeployInstance
Update
Instance
acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId}

请求参数

字段名称字段详情
InstanceIdstring

处于运行中或者已停止状态的实例 ID。

示例值:i-bp1azkttqpldxgted****参考取值来源:
    RunInstances
    StopInstances
    StartInstances
    CreateInstance
    RebootInstances
    DescribeInstances
    ModifyManagedInstance
    RenewReservedInstances
    AttachInstanceRamRole
    DetachInstanceRamRole
    DeregisterManagedInstance
    PurchaseReservedInstancesOffering
ForceStopboolean

是否强制停止运行中(Running)的实例。展开详情

示例值:false

返回参数

字段名称字段详情
TaskIdstring

重新部署的任务 ID。展开详情

示例值:t-bp10e8orkp8x****
RequestIdstring

请求 ID。

示例值:473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

返回示例

错误返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
403
IncorrectInstanceStatus
The current status of the resource does not support this operation.诊断
403
InstanceLockedForSecurity
The specified operation is denied as your instance is locked for security reasons.诊断
403
DiskError
IncorrectDiskStatus.诊断
403
InstanceExpiredOrInArrears
The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode).诊断
403
InvalidOperation.RedeployInstance
%s诊断
404
InvalidInstanceId.NotFound
The InstanceId provided does not exist in our records.诊断
500
InternalError
The request processing has failed due to some unknown error.诊断

变更历史

暂无变更历史

相关示例