Baidu AI Cloud
中国站

百度智能云

Elastic IP

EIP Inquiry

  • EIP is inquired for different charging methods.

Request structure

    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 
        	 } 
    	 } 
	 } 

Request header

There are no other special headers except the public headers.

Request parameter

Parameter name Type Required or not Parameter location Description
version String Yes URL parameter API version number
bandwidthInMbps int Yes RequestBody parameter Public network bandwidth, in Mbps. For EIP billed using bandwidth, the limit is an integer between 1 and 200 (representing the upper limit of bandwidth); for EIP billed by usage, the limit is an integer between 1 and 1000 (representing the peak bandwidth traffic allowed) .
count int No RequestBody parameter Number of EIPs, 1 by default.
purchaseType String No RequestBody parameter EIP purchase line selection, you can choose BGP, Static, ChinaTelcom, ChinaUnicom, ChinaMobile, and the default is BGP
billing Billing Yes Request Body parameters Billing information, support pre-paid and post-paid (bandwidth, traffic) methods

Return header

There are no special headers except the common header.

Return parameter

Parameter name Type Description
prices Map Price details (including purchasePrice (prepaid price), configPrice (configuration price), netrafficPrice (traffic price))

Request example (prepaid)

    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" 
        	 } 
    	 } 
	 } 

Return example

    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" 
  	 	 } 
	 } 

Request example (postpaid according to bandwidth)

    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" 
    	 } 
	 } 

Return example

    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" 
  	 	 } 
	 } 

Request example (postpaid according to traffic)

    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" 
    	 } 
	 } 

Return example

    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" 
  	 	 } 
	 } 
Previous
Bandwidth Packet Related Interface
Next
Shared Bandwidth Inquiry