链接复制成功!
更新包周期带宽
功能介绍
更新带宽。
URI
PUT /v2.0/{project_id}/bandwidths/{bandwidth_id}
请求参数
| 名称 | 是否必选 | 参数类型 | 说明 |
|---|---|---|---|
| bandwidth | 是 | bandwidth object | 带宽对象,请参见表3。 |
| extendParam | 否 | extendParam object | 扩展参数,用于包周期资源申请。请参见表4。 |
| 名称 | 是否必选 | 参数类型 | 说明 |
|---|---|---|---|
| name | 否 | String |
|
| size | 否 | Integer |
|
请求样例
PUT https://{Endpoint}/v2.0/{project_id}/bandwidths/{bandwidth_id}
{
"bandwidth": {
"name": "bandwidth123",
"size": 10
},
"extendParam": {
"is_auto_pay": "false"
}
} 响应参数
| 名称 | 参数类型 | 说明 |
|---|---|---|
| bandwidth | bandwidth object | 带宽对象(按需场景和包周期只更新name时,返回该对象)。请参见表6。 |
| order_id | String | 订单号(包周期场景返回该字段) |
| 名称 | 参数类型 | 说明 |
|---|---|---|
| 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的唯一标识或IPv6端口的唯一标识 |
| 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 |
|
响应示例
- 响应样例1(按需带宽或包周期带宽只更新name时)
{ "bandwidth": { "id": "3fa5b383-5a73-4dcb-a314-c6128546d855", "name": "bandwidth123", "size": 10, "share_type": "PER", "publicip_info": [ { "publicip_id": "6285e7be-fd9f-497c-bc2d-dd0bdea6efe0", "publicip_address": "161.xx.xx.9", "publicip_type": "5_bgp", "ip_version": 4 } ], "tenant_id": "8b7e35ad379141fc9df3e178bd64f55c", "created_at": "2020-04-21T08:56:42Z", "updated_at": "2020-04-21T08:56:42Z", "bandwidth_type": "bgp" } } - 响应样例2(包周期带宽)
{ "order_id": "xxxx" }
状态码
请参见状态码。
错误码
请参考错误码。