百度智能云

All Product Document

          Virtual Private Cloud

          Create ENIC

          Description

          Create an ENIC.

          • The specified private IP must be in the subnet where the ENIC resides and cannot be occupied.
          • One primary Ip must exist in the specified Ips, and other Ips must be the secondary Ips.
          • privateIpAddress is “”, indicating that the IP address is assigned automatically.
          • You can bind an existing security group while creating an ENIC. The vpc to which the security group belongs must be the same as the vpc to which the network card belongs.

          Request Structure

          POST /v{versionet/init?clientToken={clientToken} HTTP/1.1   
          Host: bcc.bj.baidubce.com      
          Authorization: authorization string
          {
              "name":"eni_test",
              "subnetId":"sbn-nbxaetqfwc4r",
              "privateIpSet":[
                  {
                      "primary":true,
                      "privateIpAddress":""
                  },
                  {
                      "primary":false,
                      "privateIpAddress":"192.168.0.1"
                  }
              ],
              "securityGroupIds":[
                  "g-SY5smEG9"
              ],
              "description":"desc"
          }

          Request Header Field

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

          Request Parameters

          Parameter Name Type Required? Parameter Position Description
          version String Yes URL parameter API version number
          name String Yes RequestBody parameter ENIC name
          subnetId String Yes RequestBody parameter Subnet Id of the ENIC
          securityGroupIds List Yes RequestBody parameter Specified bound security group set
          privateIpSet List<PrivateIp> Yes RequestBody parameter Specified private IP information
          description String No RequestBody parameter Description of ENIC
          clientToken String No Query parameters Idempotent Token, which is an ASCII string with a length of not more than 64 bits.

          Return Header Field

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

          Return Parameter

          Parameter Name Type Description
          eniId String ENIC Id

          Request Example

          POST /v1/eni?clientToken=clientToken-jdshl15d1s4      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
          {
              "name":"eni_test",
              "subnetId":"sbn-dk8gl9bc",
              "privateIpSet":[
                  {
                      "primary":true,
                      "privateIpAddress":""
                  },
                  {
                      "primary":false,
                      "privateIpAddress":"192.168.0.1"
                  }
              ],
              "securityGroupIds":[
                  "g-SY5smEG9"
              ],
              "description":"desc"
          }

          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
          {
            "eniId":"eni-w2d4kgc3x0y1"
          }
          Previous
          Bind ENIC to EIP
          Next
          Delete ENIC