枚举块资源云盘列表
接口描述
GET /storage/abs/v1/subscriptions/{subscription_name}/resourceGroups/{resource_group_name}/zones/{zone}/disks
请求头(Request Header)
请求参数(Request Parameters)
名称 | 类型 | 必须 | 位置 | 默认值 | 取值范围 | 描述 |
---|---|---|---|---|---|---|
subscription_name | string | 是 | path | - | - | 订阅标识 |
resource_group_name | string | 是 | path | - | - | 资源组标识 |
zone | string | 是 | path | - | - | 可用区 |
请求参数(Request Query)
名称 | 类型 | 必须 | 位置 | 默认值 | 取值范围 | 描述 |
---|---|---|---|---|---|---|
filter | string | 否 | query | - | - | 查询内容 |
order_by | string | 否 | query | - | - | 排序 |
page_size | string | 否 | query | - | - | page_size |
page_token | string | 否 | query | - | - | 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)
名称 | 类型 | 描述 |
---|---|---|
disks | object | 云盘列表数据 |
next_page_token | string | next_page_token |
total_size | string | 云盘总数量 |
响应返回内容中disks
的值是list,有以下不同含义值:
名称 | 类型 | 描述 |
---|---|---|
id | string | 资源ID |
name | string | 资源名称 |
display_name | string | 资源别名 |
description | string | 资源描述信息 |
uid | string | 资源实例UUID |
resource_type | string | 资源类型 |
creator_id | string | 创建者标识 |
owner_id | string | 拥有者标识 |
tenant_id | string | 租户标识 |
zone | string | 可用区 |
state | string | 资源状态 |
sku_id | string | 云管sku_id |
tags | map | 资源标签map<string, string> |
properties | object | 资源属性 |
order_info | object | 订单信息 |
deleted | bool | 是否删除资源 |
create_time | string | 资源创建时间 |
update_time | string | 资源最新更新时间 |
请求体中state
的值,自定义 State
类型,是enum类型,有以下不同含义值:
状态值 | 状态 | 含义 |
---|---|---|
0 | CREATING | 创建中(瞬时状态) |
1 | UPDATING | 更新中(瞬时状态) |
2 | ACTIVE | 正常 |
3 | DELETING | 删除中(瞬时状态) |
4 | DELETED | 已删除 |
5 | FAILED | 操作失败(不保存) |
6 | EXPIREDOWNGRADING | 到期降级进入宽限期中(瞬时状态) |
7 | EXPIREDOWNGRADED | 已降级宽限期 |
8 | RENEWUPGRADING | 宽限期续订恢复中(瞬时状态) |
9 | EXPIRESTOPPING | 到期停服进入保留期中(瞬时状态) |
10 | EXPIRESTOPPED | 已停服保留期 |
11 | RENEWSTARTING | 保留期续费恢复中(瞬时状态) |
12 | DOWNGRADING | 服务降级变更中(瞬时状态) |
13 | DOWNGRADE | 服务已经降级 |
14 | RESTORING | 服务降级恢复中(瞬时状态) |
15 | ATTACHING | 挂载中 |
16 | INUSE | 使用中 |
17 | DETACHING | 卸载中 |
18 | DETACHFAILED | 卸载失败 |
19 | ATTACHFAILED | 挂载失败 |
20 | DELETEDFAILED | 删除失败 |
21 | RESIZING | 扩容变更中(瞬时状态) |
22 | RESIZEFAILED | 扩容失败 |
23 | ARREARSTOPPING | 欠费停服变更中(瞬时状态) |
24 | ARREARSTOPPED | 已欠费停服 |
25 | RECHARGESTARTING | 充值恢复中(瞬时状态) |
26 | RESIZECANCELING | 取消扩容变更中(瞬时状态) |
响应参数中,properties
的字段如下:
参数名 | 类型 | 必须 | 默认值 | 取值范围 | 描述 |
---|---|---|---|---|---|
resources | object | 是 | - | - | 资源规格属性 |
请求体中properties
内的resources
的参数如下:
参数名 | 类型 | 必须 | 默认值 | 取值范围 | 描述 |
---|---|---|---|---|---|
billing_items | object | 是 | - | - | 资源计费项 |
disk_type | string | 是 | - | - | 云盘类型 |
system_disk | bool | 是 | - | - | 是否为系统盘(false为数据盘) |
ecs_lifecycle | bool | 是 | - | - | 是否随ecs实例释放 |
snapshot_id | bool | 是 | - | - | 根据指定的快照id进行盘的创建 |
image_id | string | 否 | - | - | 根据指定的镜像id进行盘的创建 |
以上disk_type
的值,自定义 DiskCategoryUnit
类型,是enum类型,有以下不同含义值:
类型值 | 类型 | 含义 |
---|---|---|
0 | CLOUDEFFICIENCY | 高效云盘 |
1 | CLOUDSSD | SSD 云盘 |
以上billing_items
的参数如下:
参数名 | 类型 | 必须 | 默认值 | 取值范围 | 描述 |
---|---|---|---|---|---|
capacity | number | 是 | - | - | 对象存储资源包容量大小 |
capacity_unit | CapacityUnit | 是 | - | - | 资源包容量单位 |
以上capacity
的值,自定义 CapacityUnit
类型,是enum类型,有以下不同含义值:
单位值 | 单位 | 含义 |
---|---|---|
0 | EB | EB |
1 | PB | PB |
2 | TB | TB |
3 | GB | 千兆字节 |
4 | MB | 兆字节 |
请求体中,order_info
的参数如下:
参数名 | 类型 | 必须 | 默认值 | 取值范围 | 描述 |
---|---|---|---|---|---|
billing_cycle_number | number | 是 | - | - | 购买时长 |
auto_renew | bool | 否 | - | - | 自动续费 |
currency_code | string | 是 | - | - | 货币代码 |
payment_channel | PaymentChannel | 是 | - | - | 支付方式 |
note | string | 否 | - | - | 订单备注 |
order_type | OrderType | 是 | - | - | 订单类型 |
order_id | string | 是 | - | - | 订单id |
start_time | string | 是 | - | - | 订单生效日期 |
payment_model | PaymentModel | 是 | - | - | 付费类型 |
billing_model | BillingModel | 是 | - | - | 计费类型 |
original_id | string | 否 | - | - | 合同包ID(专有云订单使用) |
end_time | string | 是 | - | - | 订单结束时间 |
auto_convert_postpaid | bool | 否 | - | - | 预付费自动转后付费 |
以上payment_channel
的值,自定义 PaymentChannel
类型,是enum类型,有以下不同含义值:
单位值 | 单位 | 含义 |
---|---|---|
0 | PC_UNSPECIFIED | 未指定 |
1 | PC_BALANCE | 余额支付 |
2 | PC_CREDIT | 信用支付 |
3 | PC_FROZENACCOUNT | 冻结款支付 |
4 | PC_REMIT_OFFLINE | 线下汇款 |
5 | PC_ALIPAY | 支付宝支付 |
6 | PC_UNIONPAY | 银联支付 |
7 | PC_REMIT_ONLINE | 在线转账 |
8 | PC_CONTRACT | 合同包支付 |
以上order_type
的值,自定义 OrderType
类型,是enum类型,有以下不同含义值:
单位值 | 单位 | 含义 |
---|---|---|
0 | OT_UNSPECIFIED | 未指定 |
1 | OT_ORIGINAL | 原始订单 |
2 | OT_RENEW | 续费订单 |
3 | OT_UPGRADED | 升配订单 |
4 | OT_DOWNGRADED | 降配订单 |
5 | OT_CONTRACT | 合同订单 |
6 | OT_UNSUBSCRIBE | 退订订单 |
7 | OT_RESIZE | 扩缩容订单 |
以上payment_model
的值,自定义 PaymentModel
类型,是enum类型,有以下不同含义值:
单位值 | 单位 | 含义 |
---|---|---|
0 | PM_UNSPECIFIED | 未指定 |
1 | PM_PREPAID | 预付费 |
2 | PM_POSTPAID | 后付费 |
以上billing_model
的值,自定义 BillingModel
类型,是enum类型,有以下不同含义值:
单位值 | 单位 | 含义 |
---|---|---|
0 | BM_UNSPECIFIED | 未指定 |
1 | BM_USAGE | 按量计费 |
2 | BM_MONTHLY | 包月 |
3 | BM_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
}