百度智能云

All Product Document

          Virtual Private Cloud

          Add Private IP Address of ENIC

          Description

          Add a private IP address of the elastic network interface card.

          • If privateIpAddress is “", it indicates that the private IP address is assigned automatically.
          • If privateIpAddress is not empty, the IP address must be the Ip address of the subnet.
          • The new private IP is a secondary IP address.

          Request Structure

          POST /v{version}/eni/{eniId}/privateIp?clientToken={clientToken}   HTTP/1.1   
          Host: bcc.bj.baidubce.com      
          Authorization: authorization string
          {
             "privateIpAddress":""
          }

          Request Header Field

          No other special header fields are available except for public header fields.

          Request Parameters

          Parameter Name Type Required?
          version String Yes
          eniId String Yes
          privateIpAddress String Yes
          clientToken String No

          Return Header Field

          No other special header fields are available except for public header fields.

          Return Parameter

          Parameter Name Type Description
          privateIpAddress String The private Ip address of the ENIC to be added.

          Request Example

          POST /v1/eni/eni-w2d4kgc3x0y1/privateIp?clientToken=ds-hng79d  HTTP/1.1
          Host: bcc.bj.baidubce.com
          authorization: bce-auth-v1/c3119080364d11e8912505e5e0ae9978/2018-04-02T08:14:25Z/3600/host;x-bce-account;x-bce-client-ip;x-bce-date;x-bce-request-id;x-bce-security-token/6b93bfd5ca2328fcb5560fa57f56253d80a629f6aac9c9cb74adf9a055fceb53
          {
              "privateIpAddress":"192.168.0.8"
          }

          Return Example

          HTTP/1.1 200 OK
          x-bce-request-id: 7e789a40-adac-414a-8bd4-916d6be61112
          Date: Mon, 02 Apr 2019 08:14:25 GMT
          Content-Type: application/json;charset=UTF-8
          Server: BWS
          {
              "privateIpAddress":"192.168.0.8"
          }
          Previous
          Appendix
          Next
          Attach ENIC to CVM Server