获取资源包列表
接口描述
GET /v2/resourcepackages
获取资源包列表
请求头(Request Header)
请求参数(Request Parameters)
名称 | 位置 | 类型 | 必须 | 描述 |
---|---|---|---|---|
sku_id | query | array[string] | false | 规格ID |
order_by | query | string | false | 排序 |
page_size | query | integer(int32) | false | 分页大小 |
page_token | query | string | false | 分页 |
action | query | string | false | none |
version | query | string | false | none |
spu_id | query | string | false | 商品ID |
rid_name | query | string | false | 资源ID/名称 |
billing_model | query | string(enum) | false | 计费模式 |
Enumerated Values
Parameter | Value |
---|---|
billing_model | BM_UNSPECIFIED |
billing_model | BM_USAGE |
billing_model | BM_MONTHLY |
billing_model | BM_YEARLY |
请求体(Request Body)
无
请求示例(Request Example)
curl --request GET \
--url https://finance.sensecoreapi.dev/boss/account/v2/resourcepackages \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
响应参数(Response Parameters)
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ListResourcePackagesResponse |
响应示例(Response Example)
200 Response
{
"resource_packages": [
{
"id": "string",
"contract_detail_id": "string",
"sku_id": "string",
"region": "string",
"zone": "string",
"total_number": 0,
"available_number": 0,
"billing_items": [
{
"contract_detail_id": "string",
"billing_item_id": "string",
"billing_item_key": "string",
"total_value": 0,
"value_unit": "string",
"available_value": 0,
"display_name": "string",
"available_value_pretty": "string",
"total_value_pretty": "string",
"used_value_pretty": "string"
}
],
"contract_id": "string",
"sku_name": "string",
"spu_id": "string",
"spu_name": "string",
"attributes": [
{
"display_name": "string",
"property_name": "string",
"value": "string",
"value_unit": "string"
}
],
"contract_start_time": "2019-08-24T14:15:22Z",
"contract_end_time": "2019-08-24T14:15:22Z",
"backend_catalog_code": "string",
"effective_state": "FUTURE",
"create_time": "2019-08-24T14:15:22Z",
"update_time": "2019-08-24T14:15:22Z",
"creator_name": "string",
"updater_name": "string",
"contract_name": "string"
}
],
"next_page_token": "string",
"total_size": 0,
"page_number": 0,
"page_size": 0
}
数据结构(Schemas)
ListResourcePackagesResponse
名称 | 类型 | 必须 | 限制 | 描述 |
---|---|---|---|---|
resource_packages | [ResourcePackageDetail] | false | none | none |
next_page_token | string | false | none | none |
total_size | integer(int32) | false | none | none |
page_number | integer(int32) | false | none | none |
page_size | integer(int32) | false | none | none |
ResourcePackageDetail
名称 | 类型 | 必须 | 限制 | 描述 |
---|---|---|---|---|
id | string | false | none | ID |
contract_detail_id | string | false | read-only | none |
sku_id | string | true | none | none |
region | string | true | none | none |
zone | string | true | none | none |
total_number | integer(int32) | true | none | none |
available_number | integer(int32) | true | none | none |
billing_items | [ResourcePackageDetailBillingItem] | false | none | none |
contract_id | string | false | read-only | none |
sku_name | string | true | none | none |
spu_id | string | true | none | none |
spu_name | string | true | none | none |
attributes | [ResourcePackageSkuAttribute] | false | none | none |
contract_start_time | string(date-time) | false | read-only | none |
contract_end_time | string(date-time) | false | read-only | none |
backend_catalog_code | string | true | none | none |
effective_state | string(enum) | false | read-only | none |
create_time | string(date-time) | false | read-only | output only |
update_time | string(date-time) | false | read-only | output only |
creator_name | string | false | read-only | none |
updater_name | string | false | read-only | none |
contract_name | string | true | none | none |
effective_state Enumerated Values
枚举值 |
---|
FUTURE |
VALID |
EXPIRED |
ResourcePackageDetailBillingItem
名称 | 类型 | 必须 | 限制 | 描述 |
---|---|---|---|---|
contract_detail_id | string | false | none | 合同包详情ID |
billing_item_id | string | false | none | none |
billing_item_key | string | false | none | none |
total_value | integer(int64) | false | none | none |
value_unit | string | false | none | none |
available_value | integer(int64) | false | none | none |
display_name | string | false | read-only | none |
available_value_pretty | string | false | read-only | none |
total_value_pretty | string | false | read-only | none |
used_value_pretty | string | false | read-only | none |
ResourcePackageSkuAttribute
名称 | 类型 | 必须 | 限制 | 描述 |
---|---|---|---|---|
display_name | string | false | none | none |
property_name | string | false | none | none |
value | string | false | none | none |
value_unit | string | false | none | none |