全部文档
当前文档

暂无内容

如果没有找到您期望的内容,请尝试其他搜索词

文档中心

查询本地盘信息

请求参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见公共请求参数
参数名称
类型
必填
描述
Action String
公共参数,本接口取值:DescribeLocalVolumes。
Version String
公共参数,本接口取值:2016-03-04。
InstanceName String

实例名字

示例值:abc123
Marker Int

页数

MaxResults Int

每页最大条数

LocalVolumeId String

本地盘id

InstanceState String

主机状态

LocalVolumeCategory String

root/data 磁盘的类型: 系统盘/ 数据盘

LocalVolumeSize Int

查询大于等于多少G的磁盘

BindSnapshotPolicy Boolean

硬盘是否绑定了备份策略

AutoSnapshotPolicyId String

策略ID

InstanceId String

实例id

返回参数

参数名称
类型
描述
RequestId String
示例值:KEC-beb64e22-0867-4528-81cd-c0d00545364271
Marker Int
示例值:0
LocalVolumeCount Int
示例值:464
LocalVolumeSet Object[]
LocalVolumeId String
示例值:5537936a-d7f3-476e-b22f-bf407b1ee2-a
LocalVolumeName String
示例值:4bf407b12-vda
LocalVolumeState String
示例值:attached
InstanceId String
示例值:5537936a-d7f3-476ef-54bf407b1ee2
InstanceName String
示例值:gfdsdf
InstanceState String
示例值:stopped
LocalVolumeType String
示例值:SSD
LocalVolumeCategory String
示例值:system
LocalVolumeSize Int
示例值:100
CreationDate String
示例值:2023-08-15T10:22:40Z
AutoSnapshotPolicyId String
示例值:6789

请求示例

curl -X GET|POST
'http://kec.api.ksyun.com/?Action=DescribeLocalVolumes&Version=2016-03-04'
-H 'authorization: xxx, SignedHeaders=content-type;host;x-amz-date, Signature=xxx'
-H 'cache-control: no-cache'
-H 'content-type: application/x-www-form-urlencoded'
-H 'host: kec.api.ksyun.com'
-H 'x-amz-date: 20170720T022802Z'
-d 'InstanceName=xxx&Marker=xxx&MaxResults=xxx&LocalVolumeId=xxx&InstanceState=xxx&LocalVolumeCategory=xxx&LocalVolumeSize=xxx&BindSnapshotPolicy=xxx&AutoSnapshotPolicyId=xxx&InstanceId=xxx'

返回示例

JSON格式

{
"RequestId":"KEC-beb64e22-0867-4528-81cd-c0d00545364271",
"Marker":0,
"LocalVolumeCount":464,
"LocalVolumeSet":[
{
"LocalVolumeId":"5537936a-d7f3-476e-b22f-bf407b1ee2-a",
"LocalVolumeName":"4bf407b12-vda",
"LocalVolumeState":"attached",
"InstanceId":"5537936a-d7f3-476ef-54bf407b1ee2",
"InstanceName":"gfdsdf",
"InstanceState":"stopped",
"LocalVolumeType":"SSD",
"LocalVolumeCategory":"system",
"LocalVolumeSize":100,
"CreationDate":"2023-08-15T10:22:40Z",
"AutoSnapshotPolicyId":"6789"
}
]
}

错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见公共错误码

错误码
错误信息
Http状态码
描述
LocalVolumeCategoryInvalidParameterValueLocal volume category is must data or system400本地盘分类必须为data或system
InternalError{"RequestId":"ffa596f9-f20c-4b95-8443-45aa6ff24127001","Error":{"Code":"InternalError","Message":"region not config"}}400
InternalError{"RequestId":"ffa596f9-f20c-4b95-8443-45aa6ff24127001","Error":{"Code":"InternalError","Message":"region not config"}}400
ServiceUnavailable{"RequestId":"cf5315d6-af6e-451e-b0da-cff21da54025001","Error":{"Code":"ServiceUnavailable","Message":"I/O error on GET request for \"http://qyone.openstack.sdns.ksyun.com:6004/v2/67e1117af11d433bb446c0494722b43d/ksc-localdisks?limit\u003d50\u0026offset\u003d0\u0026recycled\u003d0\": Failed to connect to qyone.openstack.sdns.ksyun.com/100.88.2.153:6004"}}400
纯净模式常规模式

纯净模式

点击可全屏预览文档内容