共享带宽询价
更新时间:2023-08-31
- 针对不同计费类型的共享带宽询价
请求结构
Plain Text
1 POST /v{version}/eipgroup/price HTTP/1.1
2 Host: eip.bj.baidubce.com
3 Authorization: authorization string
4 {
5 "bandwidthInMbps": 10,
6 "count": 1,
7 "ipNum": 2,
8 "billing":{
9 "paymentTiming": paymentTiming,
10 "billingMethod": billingMethod,
11 "reservation":{
12 "reservationLength": reservationLength,
13 "reservationTimeUnit": reservationTimeUnit
14 }
15 },
16 }
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL参数 | API版本号 |
bandwidthInMbps | int | 是 | RequestBody参数 | 公网带宽,单位为Mbps。限制为为1~200之间的整数。 |
count | int | 否 | RequestBody参数 | 共享带宽的数量,默认为1。 |
ipNum | int | 是 | RequestBody参数 | 共享带宽中的IP数量。 |
billing | Billing | 是 | Request Body参数 | 计费信息,支持预付费和后付费(带宽、95)方式。 |
返回头域
除公共头域,无其它特殊头域。
返回参数
参数名称 | 类型 | 描述 |
---|---|---|
prices | Map | 价格明细(包含purchasePrice(预付费价格)、configPrice(配置价格)) |
请求示例(预付费)
Plain Text
1 POST /v1/eipgroup/price HTTP/1.1
2 Host: eip.bj.baidubce.com
3 Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
4 {
5 "bandwidthInMbps": 20,
6 "count": 1,
7 "ipNum":2,
8 "billing": {
9 "paymentTiming": "Prepaid",
10 "billingMethod": "ByBandwidth",
11 "reservation":{
12 "reservationLength":1,
13 "reservationTimeUnit":"Month"
14 }
15 }
16 }
返回示例
Plain Text
1 HTTP/1.1 200 OK
2 x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3 Date: Thu, 16 Mar 2017 06:29:48 GMT
4 Content-Type: application/json;charset=UTF-8
5 Server: BWS
6 {
7 "prices": {
8 "purchasePrice": "1630.00000"
9 }
10 }
请求示例(后付费按照带宽)
Plain Text
1 POST /v1/eipgroup/price HTTP/1.1
2 Host: eip.bj.baidubce.com
3 Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
4 {
5 "bandwidthInMbps": 20,
6 "count": 1,
7 "ipNum":2,
8 "billing": {
9 "paymentTiming": "Postpaid",
10 "billingMethod": "ByBandwidth"
11 }
12 }
返回示例
Plain Text
1 HTTP/1.1 200 OK
2 x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3 Date: Thu, 16 Mar 2017 06:29:48 GMT
4 Content-Type: application/json;charset=UTF-8
5 Server: BWS
6 {
7 "prices": {
8 "configPrice": "0.05704/minute"
9 }
10 }
请求示例(后付费按照月95峰值带宽)
Plain Text
1 POST /v1/eipgroup/price HTTP/1.1
2 Host: eip.bj.baidubce.com
3 Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
4 {
5 "bandwidthInMbps": 20,
6 "count": 1,
7 "ipNum":2,
8 "billing": {
9 "paymentTiming": "Postpaid",
10 "billingMethod": "By95"
11 }
12 }
返回示例
Plain Text
1 HTTP/1.1 200 OK
2 x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3 Date: Thu, 16 Mar 2017 06:29:48 GMT
4 Content-Type: application/json;charset=UTF-8
5 Server: BWS
6 {
7 "prices": {
8 "configPrice": "0.00104/minute"
9 }
10 }