创建订阅
接口描述
POST /v1/managementGroups/{management_group_name}/subscriptions
创建订阅
请求头(Request Header)
请求参数(Request Parameters)
| 名称 | 位置 | 类型 | 必须 | 描述 |
|---|---|---|---|---|
| management_group_name | path | string | true | 管理组名称 |
请求体(Request Body)
| 名称 | 位置 | 类型 | 必须 | 描述 |
|---|---|---|---|---|
| body | body | Subscription | true | none |
请求示例(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)
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | Subscription |
响应示例(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
| 名称 | 类型 | 必须 | 限制 | 描述 |
|---|---|---|---|---|
| id | string | false | read-only | 订阅ID |
| rid | string | false | read-only | 订阅RID |
| name | string | true | none | 订阅标识 |
| display_name | string | false | none | 订阅名称 |
| tenant_id | string | false | read-only | 租户ID |
| management_group_name | string | true | none | 管理组标识 |
| billing_account | string | false | none | 计费帐号ID(930弃用) |
| create_time | string(date-time) | false | read-only | 创建订阅的时间 |
| update_time | string(date-time) | false | read-only | 更新订阅的时间 |
| management_group_display_name | string | false | read-only | 管理组名称 |
| state | string(enum) | false | read-only | 订阅状态 |
| billing_accounts | [SubscriptionBillingAccount] | true | none | 计费帐号列表 |
state Enumerated Values
| 枚举值 |
|---|
| UNAVAILABLE |
| AVAILABLE |
| CHANGING |
SubscriptionBillingAccount
| 名称 | 类型 | 必须 | 限制 | 描述 |
|---|---|---|---|---|
| id | string | false | read-only | 订阅关联计费账户ID |
| billing_account_id | string | true | none | 计费帐号ID |
| distribution_ratio | integer(int32) | false | read-only | 当前计费账户分配比例 |
| apply_ratio | integer(int32) | true | none | 计费账户申请分配比例 |
| state | string(enum) | false | read-only | 订阅绑定计费账户的状态定义 |
state Enumerated Values
| 枚举值 |
|---|
| BINDING |
| CONFIRMING |
| UNBOUND |
| BOUND |
| ADJUSTING |