枚举块资源云盘列表 | 大装置帮助中心
跳到主要内容

枚举块资源云盘列表

接口描述

GET /storage/abs/v1/subscriptions/{subscription_name}/resourceGroups/{resource_group_name}/zones/{zone}/disks

请求头(Request Header)

参考认证(authentication)

请求参数(Request Parameters)

名称类型必须位置默认值取值范围描述
subscription_namestringpath--订阅标识
resource_group_namestringpath--资源组标识
zonestringpath--可用区

请求参数(Request Query)

名称类型必须位置默认值取值范围描述
filterstringquery--查询内容
order_bystringquery--排序
page_sizestringquery--page_size
page_tokenstringquery--page_token

请求体(Request Body)

请求示例-filter筛选(Request Example)

curl --request GET 'https://management.sensecoreapi.dev/storage/abs/v1/subscriptions/e995c396-83f6-4a1b-a055-2acb8bc7cf1f/resourceGroups/default/zones/cn-sh-01e/disks?filter=name="c6d8b27b-55b7-4ca3-992d-7f369e5076cb"&order_by=display_name&page_size=10&page_token'\
-H 'authority: management.sensecoreapi.dev' \
-H 'content-type: application/json' \
-H 'Authorization: xxx'

请求示例-无filter筛选(Request Example)

curl --request GET 'https://management.sensecoreapi.dev/storage/abs/v1/subscriptions/e995c396-83f6-4a1b-a055-2acb8bc7cf1f/resourceGroups/default/zones/cn-sh-01e/disks'\
-H 'authority: management.sensecoreapi.dev' \
-H 'content-type: application/json' \
-H 'Authorization: xxx'

响应参数(Response Parameters)

名称类型描述
disksobject云盘列表数据
next_page_tokenstringnext_page_token
total_sizestring云盘总数量

响应返回内容中disks的值是list,有以下不同含义值:

名称类型描述
idstring资源ID
namestring资源名称
display_namestring资源别名
descriptionstring资源描述信息
uidstring资源实例UUID
resource_typestring资源类型
creator_idstring创建者标识
owner_idstring拥有者标识
tenant_idstring租户标识
zonestring可用区
statestring资源状态
sku_idstring云管sku_id
tagsmap资源标签map<string, string>
propertiesobject资源属性
order_infoobject订单信息
deletedbool是否删除资源
create_timestring资源创建时间
update_timestring资源最新更新时间

请求体中state的值,自定义 State类型,是enum类型,有以下不同含义值:

状态值状态含义
0CREATING创建中(瞬时状态)
1UPDATING更新中(瞬时状态)
2ACTIVE正常
3DELETING删除中(瞬时状态)
4DELETED已删除
5FAILED操作失败(不保存)
6EXPIREDOWNGRADING到期降级进入宽限期中(瞬时状态)
7EXPIREDOWNGRADED已降级宽限期
8RENEWUPGRADING宽限期续订恢复中(瞬时状态)
9EXPIRESTOPPING到期停服进入保留期中(瞬时状态)
10EXPIRESTOPPED已停服保留期
11RENEWSTARTING保留期续费恢复中(瞬时状态)
12DOWNGRADING服务降级变更中(瞬时状态)
13DOWNGRADE服务已经降级
14RESTORING服务降级恢复中(瞬时状态)
15ATTACHING挂载中
16INUSE使用中
17DETACHING卸载中
18DETACHFAILED卸载失败
19ATTACHFAILED挂载失败
20DELETEDFAILED删除失败
21RESIZING扩容变更中(瞬时状态)
22RESIZEFAILED扩容失败
23ARREARSTOPPING欠费停服变更中(瞬时状态)
24ARREARSTOPPED已欠费停服
25RECHARGESTARTING充值恢复中(瞬时状态)
26RESIZECANCELING取消扩容变更中(瞬时状态)

响应参数中,properties的字段如下:

参数名类型必须默认值取值范围描述
resourcesobject--资源规格属性

请求体中properties内的resources 的参数如下:

参数名类型必须默认值取值范围描述
billing_itemsobject--资源计费项
disk_typestring--云盘类型
system_diskbool--是否为系统盘(false为数据盘)
ecs_lifecyclebool--是否随ecs实例释放
snapshot_idbool--根据指定的快照id进行盘的创建
image_idstring--根据指定的镜像id进行盘的创建

以上disk_type的值,自定义 DiskCategoryUnit类型,是enum类型,有以下不同含义值:

类型值类型含义
0CLOUDEFFICIENCY高效云盘
1CLOUDSSDSSD 云盘

以上billing_items 的参数如下:

参数名类型必须默认值取值范围描述
capacitynumber--对象存储资源包容量大小
capacity_unitCapacityUnit--资源包容量单位

以上capacity的值,自定义 CapacityUnit 类型,是enum类型,有以下不同含义值:

单位值单位含义
0EBEB
1PBPB
2TBTB
3GB千兆字节
4MB兆字节

请求体中,order_info的参数如下:

参数名类型必须默认值取值范围描述
billing_cycle_numbernumber--购买时长
auto_renewbool--自动续费
currency_codestring--货币代码
payment_channelPaymentChannel--支付方式
notestring--订单备注
order_typeOrderType--订单类型
order_idstring--订单id
start_timestring--订单生效日期
payment_modelPaymentModel--付费类型
billing_modelBillingModel--计费类型
original_idstring--合同包ID(专有云订单使用)
end_timestring--订单结束时间
auto_convert_postpaidbool--预付费自动转后付费

以上payment_channel的值,自定义 PaymentChannel 类型,是enum类型,有以下不同含义值:

单位值单位含义
0PC_UNSPECIFIED未指定
1PC_BALANCE余额支付
2PC_CREDIT信用支付
3PC_FROZENACCOUNT冻结款支付
4PC_REMIT_OFFLINE线下汇款
5PC_ALIPAY支付宝支付
6PC_UNIONPAY银联支付
7PC_REMIT_ONLINE在线转账
8PC_CONTRACT合同包支付

以上order_type的值,自定义 OrderType 类型,是enum类型,有以下不同含义值:

单位值单位含义
0OT_UNSPECIFIED未指定
1OT_ORIGINAL原始订单
2OT_RENEW续费订单
3OT_UPGRADED升配订单
4OT_DOWNGRADED降配订单
5OT_CONTRACT合同订单
6OT_UNSUBSCRIBE退订订单
7OT_RESIZE扩缩容订单

以上payment_model的值,自定义 PaymentModel 类型,是enum类型,有以下不同含义值:

单位值单位含义
0PM_UNSPECIFIED未指定
1PM_PREPAID预付费
2PM_POSTPAID后付费

以上billing_model的值,自定义 BillingModel 类型,是enum类型,有以下不同含义值:

单位值单位含义
0BM_UNSPECIFIED未指定
1BM_USAGE按量计费
2BM_MONTHLY包月
3BM_YEARLY包年

响应示例-filter筛选(Response Example)

{
"disks": [
{
"id": "/subscriptions/e995c396-83f6-4a1b-a055-2acb8bc7cf1f/resourceGroups/default/zones/cn-sh-01e/disks/c6d8b27b-55b7-4ca3-992d-7f369e5076cb",
"name": "c6d8b27b-55b7-4ca3-992d-7f369e5076cb",
"display_name": "0830自测ABS",
"description": "",
"uid": "2330e95e-6681-11ef-9e0a-523e95af74a9",
"resource_type": "storage.abs.v1.disk",
"creator_id": "57463cd8-3ee9-4bf4-b139-8890fd26c914",
"owner_id": "57463cd8-3ee9-4bf4-b139-8890fd26c914",
"tenant_id": "e995c396-83f6-4a1b-a055-2acb8bc7cf1f",
"zone": "cn-sh-01e",
"state": "INUSE",
"sku_id": "3583abdc-f096-4b82-a0ff-15a13a7b5c1c",
"tags": {},
"properties": {
"resources": {
"billing_items": {
"capacity": 20,
"capacity_unit": "GB"
},
"disk_type": "CLOUDSSD",
"system_disk": false,
"ecs_lifecycle": false,
"snapshot_id": "",
"image_id": ""
}
},
"order_info": {
"billing_cycle_number": 1,
"auto_renew": false,
"currency_code": "CNY",
"payment_channel": "PC_UNSPECIFIED",
"note": "",
"order_type": "OT_ORIGINAL",
"order_id": "141c2091410124043829248",
"start_time": "2024-08-30T03:37:09Z",
"payment_model": "PM_PREPAID",
"billing_model": "BM_MONTHLY",
"original_id": "",
"end_time": "2024-09-30T15:59:59Z",
"auto_convert_postpaid": false
},
"deleted": false,
"create_time": "2024-08-30T03:37:54.844913Z",
"update_time": "2024-08-30T03:37:54.844913Z"
}
],
"next_page_token": "",
"total_size": 1
}

响应示例-无筛选全部返回(Response Example)

{
"disks": [{
"id": "/subscriptions/e995c396-83f6-4a1b-a055-2acb8bc7cf1f/resourceGroups/default/zones/cn-sh-01e/disks/c6d8b27b-55b7-4ca3-992d-7f369e5076cb",
"name": "c6d8b27b-55b7-4ca3-992d-7f369e5076cb",
"display_name": "0830自测ABS",
"description": "",
"uid": "2330e95e-6681-11ef-9e0a-523e95af74a9",
"resource_type": "storage.abs.v1.disk",
"creator_id": "57463cd8-3ee9-4bf4-b139-8890fd26c914",
"owner_id": "57463cd8-3ee9-4bf4-b139-8890fd26c914",
"tenant_id": "e995c396-83f6-4a1b-a055-2acb8bc7cf1f",
"zone": "cn-sh-01e",
"state": "INUSE",
"sku_id": "3583abdc-f096-4b82-a0ff-15a13a7b5c1c",
"tags": {},
"properties": {
"resources": {
"billing_items": {
"capacity": 20,
"capacity_unit": "GB"
},
"disk_type": "CLOUDSSD",
"system_disk": false,
"ecs_lifecycle": false,
"snapshot_id": "",
"image_id": ""
}
},
"order_info": {
"billing_cycle_number": 1,
"auto_renew": false,
"currency_code": "CNY",
"payment_channel": "PC_UNSPECIFIED",
"note": "",
"order_type": "OT_ORIGINAL",
"order_id": "141c2091410124043829248",
"start_time": "2024-08-30T03:37:09Z",
"payment_model": "PM_PREPAID",
"billing_model": "BM_MONTHLY",
"original_id": "",
"end_time": "2024-09-30T15:59:59Z",
"auto_convert_postpaid": false
},
"deleted": false,
"create_time": "2024-08-30T03:37:54.844913Z",
"update_time": "2024-08-30T03:37:54.844913Z"
},
{
"id": "/subscriptions/e995c396-83f6-4a1b-a055-2acb8bc7cf1f/resourceGroups/default/zones/cn-sh-01e/disks/33b4f0ac-6118-11ef-b02e-4e1335f20ff3",
"name": "33b4f0ac-6118-11ef-b02e-4e1335f20ff3",
"display_name": "33b4f0ac-6118-11ef-b02e-4e1335f20ff3",
"description": "",
"uid": "33b4f114-6118-11ef-b02e-4e1335f20ff3",
"resource_type": "storage.abs.v1.disk",
"creator_id": "57463cd8-3ee9-4bf4-b139-8890fd26c914",
"owner_id": "57463cd8-3ee9-4bf4-b139-8890fd26c914",
"tenant_id": "e995c396-83f6-4a1b-a055-2acb8bc7cf1f",
"zone": "cn-sh-01e",
"state": "DELETED",
"sku_id": "3583abdc-f096-4b82-a0ff-15a13a7b5c1c",
"tags": {},
"properties": {
"resources": {
"billing_items": {
"capacity": 40,
"capacity_unit": "GB"
},
"disk_type": "CLOUDSSD",
"system_disk": true,
"ecs_lifecycle": true,
"snapshot_id": "07db733e-c73f-4ca6-9352-a68c9cb0186e",
"image_id": "2f6dd5a7-f56a-4819-8300-2c819e825c24"
}
},
"order_info": {
"billing_cycle_number": 3,
"auto_renew": false,
"currency_code": "CNY",
"payment_channel": "PC_UNSPECIFIED",
"note": "",
"order_type": "OT_ORIGINAL",
"order_id": "141c2088915261348188160",
"start_time": "2024-08-23T06:23:24Z",
"payment_model": "PM_PREPAID",
"billing_model": "BM_MONTHLY",
"original_id": "",
"end_time": "2024-11-23T15:59:59Z",
"auto_convert_postpaid": false
},
"deleted": true,
"create_time": "2024-08-23T06:23:53.786184Z",
"update_time": "2024-08-23T06:23:53.786184Z"
},
{
"id": "/subscriptions/e995c396-83f6-4a1b-a055-2acb8bc7cf1f/resourceGroups/default/zones/cn-sh-01e/disks/33b65d0f-6118-11ef-b02e-4e1335f20ff3",
"name": "33b65d0f-6118-11ef-b02e-4e1335f20ff3",
"display_name": "33b65d0f-6118-11ef-b02e-4e1335f20ff3",
"description": "",
"uid": "33b65d7c-6118-11ef-b02e-4e1335f20ff3",
"resource_type": "storage.abs.v1.disk",
"creator_id": "57463cd8-3ee9-4bf4-b139-8890fd26c914",
"owner_id": "57463cd8-3ee9-4bf4-b139-8890fd26c914",
"tenant_id": "e995c396-83f6-4a1b-a055-2acb8bc7cf1f",
"zone": "cn-sh-01e",
"state": "DELETED",
"sku_id": "3583abdc-f096-4b82-a0ff-15a13a7b5c1c",
"tags": {},
"properties": {
"resources": {
"billing_items": {
"capacity": 40,
"capacity_unit": "GB"
},
"disk_type": "CLOUDSSD",
"system_disk": true,
"ecs_lifecycle": true,
"snapshot_id": "07db733e-c73f-4ca6-9352-a68c9cb0186e",
"image_id": "2f6dd5a7-f56a-4819-8300-2c819e825c24"
}
},
"order_info": {
"billing_cycle_number": 3,
"auto_renew": false,
"currency_code": "CNY",
"payment_channel": "PC_UNSPECIFIED",
"note": "",
"order_type": "OT_ORIGINAL",
"order_id": "141c2088915261348188160",
"start_time": "2024-08-23T06:23:24Z",
"payment_model": "PM_PREPAID",
"billing_model": "BM_MONTHLY",
"original_id": "",
"end_time": "2024-11-23T15:59:59Z",
"auto_convert_postpaid": false
},
"deleted": true,
"create_time": "2024-08-23T06:23:53.884760Z",
"update_time": "2024-08-23T06:23:53.884760Z"
},
{
"id": "/subscriptions/e995c396-83f6-4a1b-a055-2acb8bc7cf1f/resourceGroups/default/zones/cn-sh-01e/disks/33b7f2d6-6118-11ef-b02e-4e1335f20ff3",
"name": "33b7f2d6-6118-11ef-b02e-4e1335f20ff3",
"display_name": "33b7f2d6-6118-11ef-b02e-4e1335f20ff3",
"description": "",
"uid": "33b7f33b-6118-11ef-b02e-4e1335f20ff3",
"resource_type": "storage.abs.v1.disk",
"creator_id": "57463cd8-3ee9-4bf4-b139-8890fd26c914",
"owner_id": "57463cd8-3ee9-4bf4-b139-8890fd26c914",
"tenant_id": "e995c396-83f6-4a1b-a055-2acb8bc7cf1f",
"zone": "cn-sh-01e",
"state": "DELETED",
"sku_id": "3583abdc-f096-4b82-a0ff-15a13a7b5c1c",
"tags": {},
"properties": {
"resources": {
"billing_items": {
"capacity": 40,
"capacity_unit": "GB"
},
"disk_type": "CLOUDSSD",
"system_disk": true,
"ecs_lifecycle": true,
"snapshot_id": "07db733e-c73f-4ca6-9352-a68c9cb0186e",
"image_id": "2f6dd5a7-f56a-4819-8300-2c819e825c24"
}
},
"order_info": {
"billing_cycle_number": 3,
"auto_renew": false,
"currency_code": "CNY",
"payment_channel": "PC_UNSPECIFIED",
"note": "",
"order_type": "OT_ORIGINAL",
"order_id": "141c2088915261348188160",
"start_time": "2024-08-23T06:23:24Z",
"payment_model": "PM_PREPAID",
"billing_model": "BM_MONTHLY",
"original_id": "",
"end_time": "2024-11-23T15:59:59Z",
"auto_convert_postpaid": false
},
"deleted": true,
"create_time": "2024-08-23T06:23:53.936732Z",
"update_time": "2024-08-23T06:23:53.936732Z"
}
],
"next_page_token": "",
"total_size": 4
}