创建订阅 | 大装置帮助中心
跳到主要内容

创建订阅

接口描述

POST /v1/managementGroups/{management_group_name}/subscriptions 创建订阅

请求头(Request Header)

参考认证(authentication)

请求参数(Request Parameters)

名称位置类型必须描述
management_group_namepathstringtrue管理组名称

请求体(Request Body)

名称位置类型必须描述
bodybodySubscriptiontruenone

请求示例(Request Example)

curl --request POST \
--url https://management.sensecoreapi.dev/rmh/v1/managementGroups/string/subscriptions \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--data '{"name":"string","display_name":"string","management_group_name":"string","billing_account":"string","billing_accounts":[{"billing_account_id":"string","apply_ratio":0}]}'

响应参数(Response Parameters)

StatusMeaningDescriptionSchema
200OKOKSubscription

响应示例(Response Example)

200 Response

{
"id": "string",
"rid": "string",
"name": "string",
"display_name": "string",
"tenant_id": "string",
"management_group_name": "string",
"billing_account": "string",
"create_time": "2019-08-24T14:15:22Z",
"update_time": "2019-08-24T14:15:22Z",
"management_group_display_name": "string",
"state": "UNAVAILABLE",
"billing_accounts": [
{
"id": "string",
"billing_account_id": "string",
"distribution_ratio": 0,
"apply_ratio": 0,
"state": "BINDING"
}
]
}

数据结构(Schemas)

Subscription

名称类型必须限制描述
idstringfalseread-only订阅ID
ridstringfalseread-only订阅RID
namestringtruenone订阅标识
display_namestringfalsenone订阅名称
tenant_idstringfalseread-only租户ID
management_group_namestringtruenone管理组标识
billing_accountstringfalsenone计费帐号ID(930弃用)
create_timestring(date-time)falseread-only创建订阅的时间
update_timestring(date-time)falseread-only更新订阅的时间
management_group_display_namestringfalseread-only管理组名称
statestring(enum)falseread-only订阅状态
billing_accounts[SubscriptionBillingAccount]truenone计费帐号列表

state Enumerated Values

枚举值
UNAVAILABLE
AVAILABLE
CHANGING

SubscriptionBillingAccount

名称类型必须限制描述
idstringfalseread-only订阅关联计费账户ID
billing_account_idstringtruenone计费帐号ID
distribution_ratiointeger(int32)falseread-only当前计费账户分配比例
apply_ratiointeger(int32)truenone计费账户申请分配比例
statestring(enum)falseread-only订阅绑定计费账户的状态定义

state Enumerated Values

枚举值
BINDING
CONFIRMING
UNBOUND
BOUND
ADJUSTING