# 创建共享带宽 (/products/qvm/common-bandwidth/0-create-common-bandwidth)



最近更新时间: 2021-04-22 15:54:08

# 请求路径 [#请求路径]

> `POST` /v1/vpc/common\_bandwidth

# 请求参数 ([查看付费参数](/products/qvm/1-common-params)) [#请求参数-查看付费参数]

| 名称                  | 类型     | 位置    | 是否必须 | 描述                                                                                     |
| ------------------- | ------ | ----- | ---- | -------------------------------------------------------------------------------------- |
| region\_id          | string | body  | 是    | 地域 ID                                                                                  |
| name                | string | body  | 是    | 共享带宽名称                                                                                 |
| bandwidth           | int    | body  | 是    | 带宽大小, 单位Mbps, 按带宽计费最小为2, 按增强型计费最小为200                                                  |
| ratio               | int    | query | 否    | 保底百分比，按增强型计费只能为20, 按带宽计费时只能为100                                                        |
| cost\_charge\_type  | string | body  | 是    | 付费类型                                                                                   |
| cost\_charge\_mode  | string | body  | 是    | 计费方式, 取值: PayByBandwidth, PayBy95; 当 cost\_charge\_type = PrePaid 时，只能选 PayByBandwidth |
| cost\_period\_unit  | string | body  | 是    | 付费周期                                                                                   |
| cost\_period        | int    | body  | 否    | 付费周期长度, 当 cost\_charge\_type = PrePaid 时 必填                                            |
| client\_token       | string | body  | 是    | 保证请求幂等性。从您的客户端生成一个参数值，确保不同请求间该参数值唯一。                                                   |
| enable\_auto\_renew | bool   | body  | 否    | 是否打开自动续费, true表示打开, 默认不打开                                                              |

# 返回值 [#返回值]

\| 名称 | 类型 | 是否必须 | 描述 |
\| ----- | ----- | ----- | ----- | ----- |
\| data | CreateResponse | 是 | 创建返回结果 |
\| request\_id | string | 是 | 请求记录 ID |

### CreateResponse 创建返回结果 [#createresponse-创建返回结果]

| 名称                     | 类型     | 是否必须 | 描述                 |
| ---------------------- | ------ | ---- | ------------------ |
| order                  | string | 否    | 订单号，选择预付费返回该参数     |
| bandwidth\_package\_id | string | 否    | 带宽包 ID, 选择后付费返回该参数 |

# 示例 [#示例]

### 正常返回示例 [#正常返回示例]

```json
预付费:
{
    "data": {
        "order": "1QW2F998-8642-2346-I2K3-0OKMNHY65TG4"
    },
    "request_id": "04F0F334-AC1"
}
后付费:
{
    "data": {
        "bandwidth_package_id": "cbwp-xxx"
    },
    "request_id": "04F0F334-AC1"
}
```
