百度智能云

All Product Document

          Elastic IP

          Create Bandwidth Package

          Description

          • The bandwidth package only supports binding prepaid resources and supports binding elastic public network Eip and shared bandwidth.
          • Name field is an optional parameter representing the name of the bandwidth package, and it is generated automatically if not filled in. If the parameter is required to start with a letter, only number, letter, and special characters of - _ . and / can be included. It has a length of no more than 65 characters.
          • eip and eipGroup fields respectively represent the IP address of Eip of resource to be bound or id of shared bandwidth, and only one field is effective. If both fields are filled in, only the "eip" field is effective.
          • Eip can only be an IP address of a separate elastic public network instance. It cannot be the IP address of a shared bandwidth resource.
          • bandwidthInMbps field represents the public network bandwidth of bandwidth package, which is required to be an integer greater than 0. The sum of that value and the bandwidth of the bound resource cannot be greater than 200Mbps. If the bandwidth package is a cross-border acceleration package, the sum of the bandwidth value of the package and the default cross-border bandwidth for the bound instance should be less than or equal to the bandwidth value of the bound instance.
          • autoReleaseTime is an optional parameter representing the automatic release time of the bandwidth package. If the setting requires that the time format should conform to UTC format (such as"2019-08-03T20:38:43Z"), the time should be between the current time and expiration time of prepaid instance bound, and if it is not filled, it is released together with the expiration of bound resources.
          • The type is an optional parameter, which indicates the bandwidth package type, including BandwidthPackage (bandwidth package) and AccelerationPackage (cross-border acceleration package). The cross-border acceleration package only supports the China Hongkong region. By default, the bandwidth package type is BandwidthPackage。

          Request Structure

          POST /v{version}/eipbp?clientToken={clientToken} HTTP/1.1  
          Host: eip.bj.baidubce.com      
          Authorization: authorization string
          {
          	"name": name,
          	"eip": eip,
          	"eipGroupId": eipGroupId,
          	"bandwidthInMbps": bandwidthInMbps,
          	"type":type,
             "autoReleaseTime":autoReleaseTime
          }

          Request Header

          There are no other special headers except the public headers.

          Request Parameter

          Parameter Name Type Required? Parameter Position Description
          version String Yes URL parameter API version number (the current value is 1)
          clientToken String No Query parameter Idempotent Token
          name String No RequestBody parameter Bandwidth package name, which is generated automatically if it is not filled in.
          eip String Yes RequestBody parameter Ip address of elastic public network EIP bound to bandwidth package
          eipGroupId String Yes RequestBody parameter Shared bandwidth id bound to bandwidth package
          bandwidthInMbps int Yes RequestBody parameter Public network bandwidth of bandwidth package
          type String No RequestBody parameter Bandwidth type, including BandwidthPackage and AccelerationPackage (cross-boarder acceleration package). The cross-boarder acceleration package supports China Hongkong region only. By default, the bandwidth package type is BandwidthPackage.
          autoReleaseTime String No RequestBody parameter Automatic release time of bandwidth package, with time format required to conform to UTC format (such as"2019-08-03T20:38:43Z")

          Return Status Code

          200 is returned successfully. For the failed return, see Error code.

          Return Header

          There are no other special headers except the public headers.

          Return Parameter

          Type Description
          id String Bandwidth package id

          Request Example

          POST /v1/eipbp?clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
          HOST: eip.bj.baidubce.com
          Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
          {
              "name":"bp-for-test",
              "eip": "10.23.42.12",
              "bandwidthInMbps": 5
          }

          Response Example

          HTTP/1.1 200 OK
          x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
          Date: Wed, 10 Apr 2016 08:26:52 GMT
          Transfer-Encoding: chunked
          Content-Type: application/json;charset=UTF-8
          Server: BWS
          {
              "id":"bw-2ede9df3"
          }
          Previous
          Adjust Bandwidth in a Bandwidth Package
          Next
          Query Details of a Bandwidth Package