弹性公网IPEIP

    EIP询价

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

    请求结构

        POST /v{version}/eip/price HTTP/1.1
        Host: eip.bj.baidubce.com
        Authorization: authorization string
         {
        	"bandwidthInMbps": 1,
        	"count": 1,
        	"billing":{
            	"paymentTiming": paymentTiming,
            	"billingMethod": billingMethod,
            	"reservation":{
                	"reservationLength": reservationLength,
                	"reservationTimeUnit": reservationTimeUnit
            	}
        	}
    	}

    请求头域

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

    请求参数

    参数名称 类型 是否必需 参数位置 描述
    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(流量价格))

    请求示例(预付费)

        POST /v1/eip/price? HTTP/1.1
        Host: eip.bj.baidubce.com
        Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
        {
        	"bandwidthInMbps": 1,
        	"count": 1,
        	"billing": {
            	"paymentTiming": "Prepaid",
            	"reservation": {
                	"reservationLength": 1,
                	"reservationTimeUnit": "month"
            	}
        	}
    	}

    返回示例

        HTTP/1.1 200 OK
        x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
        Date: Thu, 16 Mar 2017 06:29:48 GMT
        Content-Type: application/json;charset=UTF-8
        Server: BWS
    	{
      		"prices": {
        		"purchasePrice": "23.00000"
      		}
    	}

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

        POST /v1/eip/price? HTTP/1.1
        Host: eip.bj.baidubce.com
        Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
        {
        	"bandwidthInMbps": 1,
        	"count": 1,
        	"billing": {
            	"paymentTiming": "Postpaid",
            	"billingMethod": "ByBandwidth"
        	}
    	}

    返回示例

        HTTP/1.1 200 OK
        x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
        Date: Thu, 16 Mar 2017 06:29:48 GMT
        Content-Type: application/json;charset=UTF-8
        Server: BWS
    	{
      		"prices": {
        		"configPrice": "0.00094/minute"
      		}
    	}

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

        POST /v1/eip/price? HTTP/1.1
        Host: eip.bj.baidubce.com
        Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
        {
        	"bandwidthInMbps": 1,
        	"count": 1,
        	"billing": {
            	"paymentTiming": "Postpaid",
            	"billingMethod": "ByTraffic"
        	}
    	}

    返回示例

        HTTP/1.1 200 OK
        x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
        Date: Thu, 16 Mar 2017 06:29:48 GMT
        Content-Type: application/json;charset=UTF-8
        Server: BWS
    	{
      		"prices": {
        		"netrafficPrice": "0.76/GB",
        		"configPrice": "0.00032/minute"
      		}
    	}
    上一篇
    共享带宽询价
    下一篇
    附录1