获取任意权限资源列表 | 大装置帮助中心
跳到主要内容

获取任意权限资源列表

接口描述

POST /v1/resources:page 获取任意权限资源列表

请求头(Request Header)

参考认证(authentication)

请求参数(Request Parameters)

名称位置类型必须描述
permissionquerystringfalse指定权限
filterquerystringfalseFilter 过滤支持资源类型,状态,UID,创建时间
order_byquerystringfalse支持更新时间和创建时间排序
page_sizequeryinteger(int32)false每页数目
page_tokenquerystringfalse分页标识

请求体(Request Body)

请求示例(Request Example)

curl --request POST \
--url https://management.sensecoreapi.dev/rmh/v1/resources:page \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'

响应参数(Response Parameters)

StatusMeaningDescriptionSchema
200OKOKObtainResourcesResponse

响应示例(Response Example)

200 Response

{
"resources": [
{
"id": "string",
"rid": "string",
"name": "string",
"display_name": "string",
"type": "string",
"state": "string",
"zone": "string",
"properties": "string",
"sku_id": "string",
"subscription_name": "string",
"resource_group_name": "string",
"resource_group_id": "string",
"resource_group_display_name": "string",
"resource_group_rid": "string",
"creator_id": "string",
"owner_id": "string",
"order_info": {
"billing_cycle_number": 0,
"auto_renew": true,
"currency_code": "string",
"payment_channel": "PC_UNSPECIFIED",
"note": "string",
"order_type": "OT_UNSPECIFIED",
"order_id": "string",
"start_time": "2019-08-24T14:15:22Z",
"payment_model": "PM_UNSPECIFIED",
"billing_model": "BM_UNSPECIFIED",
"original_id": "string",
"end_time": "2019-08-24T14:15:22Z",
"auto_convert_postpaid": true
},
"deleted": true,
"create_time": "2019-08-24T14:15:22Z",
"update_time": "2019-08-24T14:15:22Z"
}
],
"total_size": 0,
"next_page_token": "string"
}

数据结构(Schemas)

ObtainResourcesResponse

名称类型必须限制描述
resources[Resource]falsenone资源列表
total_sizeinteger(int32)falsenone总记录
next_page_tokenstringfalsenone从上一个List请求返回的next_page_token值(如果有的话)

OrderInfo

名称类型必须限制描述
billing_cycle_numberinteger(int32)falsenone购买时长
auto_renewbooleanfalsenone自动续费
currency_codestringfalsenone货币代码
payment_channelstring(enum)falsenone支付方式
notestringfalsenone订单备注
order_typestring(enum)falsenone订单类型
order_idstringfalsenone订单id
start_timestring(date-time)falsenone订单生效日期
payment_modelstring(enum)falsenone付费类型
billing_modelstring(enum)falsenone计费类型
original_idstringfalsenone合同包ID
end_timestring(date-time)falsenone订单结束时间
auto_convert_postpaidbooleanfalsenone预付费自动转后付费

payment_channel Enumerated Values

枚举值
PC_UNSPECIFIED
PC_BALANCE
PC_CREDIT
PC_FROZENACCOUNT
PC_REMIT_OFFLINE
PC_ALIPAY
PC_UNIONPAY
PC_REMIT_ONLINE
PC_CONTRACT
OT_UNSPECIFIED
OT_ORIGINAL
OT_RENEW
OT_UPGRADED
OT_DOWNGRADED
OT_CONTRACT
OT_UNSUBSCRIBE
OT_RESIZE
PM_UNSPECIFIED
PM_PREPAID
PM_POSTPAID
BM_UNSPECIFIED
BM_USAGE
BM_MONTHLY
BM_YEARLY

Resource

名称类型必须限制描述
idstringfalseread-only资源ID
ridstringfalseread-only资源RID, 格式 "subscriptions//resourcegroups//resources/*
namestringtruenone资源标识
display_namestringfalsenone资源名称
typestringfalsenone资源类型
statestringfalsenone资源状态
zonestringfalsenone资源可用区
propertiesstringfalsenone资源特有属性
sku_idstringfalsenone最小库存单元ID
subscription_namestringfalseread-only订阅标识
resource_group_namestringfalseread-only资源组标识
resource_group_idstringfalseread-only资源组ID
resource_group_display_namestringfalseread-only资源组名称
resource_group_ridstringfalseread-only资源组RID
creator_idstringfalseread-only资源创建者ID
owner_idstringfalseread-only资源拥有者ID
order_infoOrderInfofalsenone订单信息
deletedbooleanfalseread-only资源是否已删除,默认为false
create_timestring(date-time)falseread-only资源创建时间
update_timestring(date-time)falseread-only资源更新时间