获取硬盘信息
基本信息
弹性带宽值不得大于基础带宽。
Action
DescribeVolumes
Path
/iaas
Method
GET
请求参数
此接口除公共参数外,还包含以下参数。关于公共参数的更多信息,请参见前文内容。
| 参数名 | 类型 | 描述 | 是否必须 |
|---|---|---|---|
volumes.n |
String |
硬盘ID |
否 |
volume_type |
Integer |
硬盘类型:
|
否 |
status.n |
String |
硬盘状态: pending, available, in-use, suspended, deleted, ceased |
否 |
search_word |
String |
搜索关键词,支持硬盘ID,硬盘名称 |
否 |
tags.n |
String |
按照标签ID过滤, 只返回已绑定某标签的资源 |
否 |
verbose |
Integer |
是否返回冗长的信息,目前 verbose 只支持为 0 。 |
否 |
返回数据
此接口除了返回公共响应参数外,还返回以下参数。关于公共响应参数的更多信息,请参见前文内容。
| 参数名 | 类型 | 描述 |
|---|---|---|
volume_set |
Array |
JSON 格式的硬盘数据列表,每项参数可见下面 Response Item |
total_count |
Integer |
根据过滤条件得到的硬盘总数 |
volume_set 参数说明如下。
| 参数名 | 类型 | 描述 |
|---|---|---|
volume_id |
String |
硬盘ID |
volume_name |
String |
硬盘名称 |
description |
String |
硬盘描述 |
size |
Integer |
硬盘空间大小,单位为 GB |
status |
String |
硬盘状态,有效值为pending, available, in-use, suspended, deleted, ceased。
|
transition_status |
String |
硬盘过渡状态,有效值为creating, attaching, detaching, suspending,resuming,deleting,recovering。
|
create_time |
TimeStamp |
硬盘创建时间,为 UTC 时间,格式可参见 ISO8601. |
status_time |
TimeStamp |
硬盘最近一次状态变更时间,为 UTC 时间,格式可参见 ISO8601. |
instance |
Dict |
硬盘加载的云服务器信息.
|
owner |
String |
硬盘的所属用户 |
volume_type |
Integer |
硬盘类型:
|
请求示例
https://api.<your_domain>/iaas/?action=DescribeVolumes
&status=in-use
&COMMON_PARAMS
返回示例
{
"action":"DescribeVolumesResponse",
"total_count":1,
"volume_set":[
{
"status":"in-use",
"description":null,
"volume_name":"vol 2",
"sub_code":0,
"transition_status":"",
"instance":{
"instance_id":"i-ogbndull",
"instance_name":"",
"device": "/dev/sdb"
},
"create_time":"2013-08-30T05:13:25Z",
"volume_id":"vol-g7xy7d6g",
"status_time":"2013-08-30T05:13:32Z",
"size":10
}
],
"ret_code":0
}