搜索本产品文档关键词
EIP询价
所有文档
menu

弹性公网IP EIP

EIP询价

  • 针对不同计费方式对EIP进行询价。

请求结构

Plain Text
1    POST /v{version}/eip/price HTTP/1.1
2    Host: eip.bj.baidubce.com
3    Authorization: authorization string
4     {
5    	"bandwidthInMbps": 1,
6    	"count": 1,
7    	"billing":{
8        	"paymentTiming": paymentTiming,
9        	"billingMethod": billingMethod,
10        	"reservation":{
11            	"reservationLength": reservationLength,
12            	"reservationTimeUnit": reservationTimeUnit
13        	}
14    	}
15	}

请求头域

除公共头域外,无其它特殊头域。

请求参数

参数名称
类型
是否必需
参数位置
描述
version String URL参数 API版本号
bandwidthInMbps int RequestBody参数 公网带宽,单位为Mbps。对于使用带宽计费的EIP,限制为为1~200之间的整数(代表带宽上限);对于按使用流量计费的EIP,限制为1~1000之间的整数(代表允许的带宽流量峰值)。
count int RequestBody参数 EIP数量,默认为1.
purchaseType String RequestBody参数 EIP购买线路选择,可选择BGP、Static、ChinaTelcom、ChinaUnicom、ChinaMobile,默认BGP
billing Billing Request Body参数 计费信息,支持预付费和后付费(带宽、流量)方式

返回头域

除公共头域,无其它特殊头域。

返回参数

参数名称
类型
描述
prices Map 价格明细(包含purchasePrice(预付费价格)、configPrice(配置价格)、netrafficPrice(流量价格))

请求示例(预付费)

Plain Text
1    POST /v1/eip/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": 1,
6    	"count": 1,
7    	"billing": {
8        	"paymentTiming": "Prepaid",
9        	"reservation": {
10            	"reservationLength": 1,
11            	"reservationTimeUnit": "month"
12        	}
13    	}
14	}

返回示例

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": "23.00000"
9  		}
10	}

请求示例(后付费按照带宽)

Plain Text
1    POST /v1/eip/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": 1,
6    	"count": 1,
7    	"billing": {
8        	"paymentTiming": "Postpaid",
9        	"billingMethod": "ByBandwidth"
10    	}
11	}

返回示例

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.00094/minute"
9  		}
10	}

请求示例(后付费按照流量)

Plain Text
1    POST /v1/eip/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": 1,
6    	"count": 1,
7    	"billing": {
8        	"paymentTiming": "Postpaid",
9        	"billingMethod": "ByTraffic"
10    	}
11	}

返回示例

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    		"netrafficPrice": "0.76/GB",
9    		"configPrice": "0.00032/minute"
10  		}
11	}
上一篇
共享带宽询价
下一篇
共享流量包询价