技术员联盟提供win764位系统下载,win10,win7,xp,装机纯净版,64位旗舰版,绿色软件,免费软件下载基地!

当前位置:主页 > 教程 > 服务器类 >

阿里云如何使用删除实例接口

来源:技术员联盟┆发布时间:2017-12-10 06:32┆点击:

  根据传入实例的名称来释放实例资源。释放后实例所使用的物理资源都被回收,包括磁盘及快照,相关数据全部丢失且永久不可恢复。

  实例状态必须为 Stopped,才可以进行删除操作。删除后,实例的状态为 Deleted,表示资源已释放,删除完成。

  实例被删除时,挂载在实例上的 DeleteWithInstance的属性为 True 的磁盘会相应被删除,这些磁盘的快照任旧保留,自动快照根据磁盘的 DeleteAutoSnapshot 属性,如果为 false 的,保留自动快照,如果为 true 的,则删除自动快照。

  实例被删除后,相关数据全部丢失且永久不可恢复。

  如果删除实例时,实例被安全控制在实例的 OperationLocks 中标记了 "LockReason" : "security" 的锁定状态时,即使独立普通云盘的 DeleteWithInstnace 的属性为 False,系统会忽略这个属性而释放挂载在实例上面的普通云盘。

  请求参数

名称 类型 是否必须 描述
Action   String     系统规定参数,取值:DeleteInstance  
InstanceId   String     实例 ID  

  返回参数

  全是公共返回参数,详见公共返回参数

  错误码

错误代码 描述 Http 状态码 语义
MissingParameter   The input parameter "InstanceId" that is mandatory for processing this request is not supplied.   400   缺少 InstanceId 值  
IncorrectInstanceStatus   The current status of the resource does not support this operation.   403   该资源目前的状态不支持此操作  
ChargeTypeViolation   The operation is not permitted due to charge type of the instance.   403   不能删除预付费的实例  
InternalError   The request processing has failed due to some unknown error.   500   内部错误  
DependencyViolation.SLBConfiguring   Specified operation is denied as the instance is being used by another product.   400   实例被 SLB 引用,且 SLB 正在配置  

  示例

  请求示例

  https://ecs.aliyuncs.com/?Action=DeleteInstance

  &InstanceId=i-instance1

  &<公共请求参数>

  返回示例

  XML格式

  

  928E2273-5715-46B9-A730-238DC996A533

  

  JSON格式

  {

  "RequestId": "928E2273-5715-46B9-A730-238DC996A533"