百度智能云

All Product Document

          Virtual Private Cloud

          Create Service Network Interface Card

          Description

          Create a service NIC.

          Request Structure

          POST /v{version}/endpoint?clientToken={clientToken} HTTP/1.1
          Host: bcc.bj.baidubce.com
          Authorization: authorization string
           {
              "vpcId": vpcId,
              "name": name,        
              "subnetId": subnetId,
              "service":service,
              "description": description,
              "ipAddress": ipAddress,
          	"billing": {
                      "paymentTiming": "Postpaid"
                  }
           } 

          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
          clientToken String No Query parameters Idempotent Token, which is an ASCII string with a length of not more than 64 bits. For details, see Idempotency of ClientToken.
          vpcId String Yes RequestBody parameter Vpc Id
          name String Yes RequestBody parameter Service NIC name, which consists of uppercase and lowercase letters, numbers, -, _, /, and other special characters, must start with a letter, and has a length of 1-65 characters.
          subnetId String Yes RequestBody parameter id of the ubnet.
          service String Yes RequestBody parameter Attached domain name
          description String No RequestBody parameter Description of service NIC
          ipAddress String No RequestBody parameter Specify the service NIC ip address, and do not pass in the automatically-assigned ip address.
          billing Billing Yes RequestBody parameter Billing information

          Return Header Field

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

          Return Parameter

          Parameter Name Type Description
          id String Service NIC id
          ipAddress String ip address

          Request Example

          POST /v1/endpoint?clientToken=1849ef6b-f73c-4f5d-b88b-259ca47af849 HTTP/1.1
          Host: bcc.bj.baidubce.com
          Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
          
          {
              "vpcId":"vpc-IyWRtII7"
              "name": "name",
              "subnetId": "sbn-1A09ef6b",
              "service": "www.test.com",
              "description": "",
              "ipAddress": "192.168.0.1",
          	"billing": {
                      "paymentTiming": "Postpaid"
                  }
           }  

          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
          
           {
              "id": "endpoint-11b09ce6",
              "ipAddress": "192.168.0.1"
           }
          Previous
          Security Group Related Interfaces
          Next
          Delete Service Network Interface Card