链接复制成功!
创建共享带宽
功能介绍
创建共享带宽。
URI
POST /v2.0/{project_id}/bandwidths
请求参数
| 名称 | 是否必选 | 参数类型 | 说明 |
|---|---|---|---|
| name | 是 | String |
|
| size | 是 | Integer |
|
| enterprise_project_id | 否 | String |
说明: 关于企业项目ID的获取及企业项目特性的详细信息,请参见《企业管理用户指南》。 |
| charge_mode | 否 | String |
|
| public_border_group | 否 | String | 功能说明:表示中心站点资源或者边缘站点资源。 取值范围:
约束限制:只能绑定与该字段相同的publicip资源 |
| bandwidth_type | 否 | String |
|
请求示例
POST https://{Endpoint}/v2.0/{project_id}/bandwidths
{
"bandwidth": {
"name": "bandwidth123",
"size": 10
}
} 响应参数
| 名称 | 参数类型 | 说明 |
|---|---|---|
| name | String |
|
| size | Integer |
|
| id | String | 带宽唯一标识 |
| share_type | String |
|
| publicip_info | Array of publicip_info objects |
|
| tenant_id | String | 项目ID |
| bandwidth_type | String |
|
| charge_mode | String |
|
| billing_info | String | 账单信息。 如果billing_info不为空,说明是包周期的带宽。 |
| enterprise_project_id | String |
说明: 关于企业项目ID的获取及企业项目特性的详细信息,请参见《企业管理用户指南》。 |
| status | String |
|
| created_at | String |
|
| updated_at | String |
|
| enable_bandwidth_rules | boolean |
|
| rule_quota | integer | 功能说明:带宽支持的最大分组规则数 |
| bandwidth_rules | Array of bandwidth_rules objects | 功能说明:带宽规则对象 |
| public_border_group | String | 功能说明:表示中心站点资源或者边缘站点资源。 取值范围:
约束限制:只能绑定与该字段相同的publicip资源 |
| 名称 | 参数类型 | 说明 |
|---|---|---|
| publicip_id | String | 功能说明:带宽对应的弹性公网IP的唯一标识 |
| publicip_address | String | 功能说明:IPv4时是申请到的弹性公网IP地址 |
| publicipv6_address | String | 功能说明:IPv4时无此字段,IPv6时为申请到的弹性公网IP地址 |
| ip_version | Integer |
|
| publicip_type | String |
|
| 字段名称 | 类型 | 描述 |
|---|---|---|
| id | string | 带宽规则ID |
| name | string | 带宽规则名称 |
| admin_state_up | boolean | 配置状态,为False时配置不生效 |
| egress_size | integer |
|
| egress_guarented_size | integer |
|
| publicip_info | Array of publicip_info objects |
|
响应样例
{
"bandwidth": {
"id": "1bffc5f2-ff19-45a6-96d2-dfdca49cc387",
"name": "bandwidth123",
"size": 10,
"share_type": "WHOLE",
"publicip_info": [],
"tenant_id": "26ae5181a416420998eb2093aaed84d9",
"public_border_group": "center",
"bandwidth_type": "share",
"charge_mode": "bandwidth",
"billing_info": "",
"enterprise_project_id": "0",
"status": "NORMAL",
"created_at": "2020-04-21T07:58:02Z",
"updated_at": "2020-04-21T07:58:02Z",
"enable_bandwidth_rules": false,
"rule_quota": 0,
"bandwidth_rules": [],
}
} 状态码
请参见状态码。
错误码
请参考错误码。