欢迎登陆真网站,您的到来是我们的荣幸。 登陆 注册 忘记密码? ☆设为首页 △加入收藏
欢迎加入真幸福QQ群
电脑知识: 基础知识 网络技术 操作系统 办公软件 电脑维修 电脑安全 windows7 windows8 windows10 服务器教程 平板电脑 视频播放教程 网络应用 互联网 工具软件 浏览器教程 QQ技巧 输入法教程 影视制作 YY教程 wps教程 word教程 Excel教程 PowerPoint
云南西双版纳特产小花糯玉米真空包装


阿里云如何使用查询磁盘接口
阿里云如何使用创建磁盘接口
如何查看ipad字典支持的语言?
阿里云如何使用修改实例管理终端口令接口
win7系统怎样才能不显示回收站图标
阿里云如何使用查询实例管理终端地址接口
阿里云如何使用将实例移出安全组接口
阿里云如何使用将实例加入安全组接口
阿里云如何使用删除实例接口
阿里云如何使用查询实例列表接口
阿里云如何使用挂载磁盘接口
【 来源:网络 】【 点击:4 】 【 发布时间:2017_03_03 08:59:59 】

  挂载磁盘

  描述

  实例的状态必须为 running 或者 stopped,且实例的 OperationLocks 中没有标记 "LockReason" : "security" 的锁定状态,且不欠费。

  在该接口中设置的 DeleteWithInstance 属性,在实例的 OperationLocks 中标记为"LockReason" : "security" 的锁定状态时,释放实例时会忽略磁盘的 DeleteWithInstance 属性而被同时释放。

  请求参数

名称 类型 是否必须 描述
Action String 操作接口名,系统规定参数,取值:AttachDisk
InstanceId String 目标云服务器 ID
DiskId String 磁盘 ID,磁盘和 Instance 必须在同一个 Zone
Device String 空表示由系统默认分配,/dev/xvdb 开始到 /dev/xvdz
默认值:空
DeleteWithInstance String 磁盘是否随实例释放:
  • true 表示 Instance 释放时,这块磁盘随 Instance 一起释放;
  • false 表示 Instance 释放时,这块磁盘保留不释放。
默认值:无,表示保留当前值不做修改。

  返回参数

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

  错误码

错误代码 描述 Http 状态码 语义
MissingParameter The input parameter "InstanceId" that is mandatory for processing this request is not supplied. 400 InstanceId 未指定
MissingParameter The input parameter "DiskId" that is mandatory for processing this request is not supplied. 400 DiskId 未指定
InvalidInstanceId.NotFound The specified instance does not exist. 404 指定的实例不存在
InvalidDiskId.NotFound The specified disk does not exist. 404 指定的磁盘不存在
InvalidDevice.Malformed The specified device is not valid. 400 指定的磁盘不存在
InvalidParameter The specified parameter "DeleteWithInstance" is not valid. 400 指定的 DeleteWithInstance 参数不合法
InstanceDiskLimitExceeded The amount of the disk on instance in question reach its limits. 403 指定实例已经达到可挂载磁盘的最大值
InvalidDevice.InUse The specified device has been occupied. 403 指定的设备已经挂载了磁盘
IncorrectDiskStatus The operation is not supported in this status. 403 磁盘状态不正确
DiskNotPortable It is not a portable disk. 403 指定磁盘不是可卸载的磁盘
InstanceLockedForSecurity The instance is locked due to security. 403 指定的实例被安全锁定
ResourcesNotInSameZone The specified instance and disk are not in the same zone. 403 指定磁盘和实例不在同一个可用区
InstanceExpiredOrInArrears The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode). 403 指定的实例已欠费
DiskInArrears The specified operation is denied as your disk owing fee. 403 指定的磁盘已欠费
IncorrectInstanceStatus The current status of the resource does not support this operation. 400 指定的实例状态不正确
DiskError IncorrectDiskStatus 403 不正常的磁盘状态

  示例

  请求示例

  https://ecs.aliyuncs.com/?action=AttachDisk

  &InstanceId=i-23jggx34b

  &DiskId=d-23jbf2v5m

  &<公共请求参数>

  返回示例

  XML格式:

  

  473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

  

  JSON格式:

  {

  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"

  }

本网站由川南居提供技术支持,fkzxf版权所有 浙ICP备12031891号
淳安分站 淳安分站