百度智能云

All Product Document

          Cloud Compute Service

          Add ipv6

          • This interface is used to obtain the BCC instance Add ipv6..

          Request Structure

          POST /v{version}/instance/addIpv6 HTTP/1.1
          Host: bcc.bj.baidubce.com
          Authorization: authorization string
          {
              "instanceId": instanceId,
              "ipv6Address": ipv6Address,
              "reboot": reboot
          }

          Request header field

          No other special header fields are available, except for common header fields.

          Request Parameter

          Parameter name Type Required? Parameter Position Description
          version String Yes URL Parameter API version number
          instanceId String Yes RequestBody parameter Instance ID
          ipv6Address String No RequestBody parameter Ipv6 address is left blank, indicating an automatic assigned ipv6
          reboot boolean No RequestBody parameter Whether or not restart, with True indicating Restart and Null indicating Do Not Restart.

          Return a header field

          There are no other special header fields except the common header field.

          Return Parameter

          Parameter Name Type Description
          ipv6Address String Ipv6 added by an instance

          Error code

          Error Code Error Description HTTP status code Explanation
          BadRequest request is invalid 400 Invalid request parameter
          NoSuchObject The specified object is not found or resources do not exist. 404 Instances are not found or do not exist
          BadRequest instance has ipv6 already, please release ipv6 first 400 Because there is already ipv6, release ipv6 at first.
          BadRequest ipv6Address is invalid 400 Invalid ipv6 addresses
          Instance.GetHostEnableIpv6Exception get host enable ipv6 exception. 400 Obtain a VM core to see if it supports IPV6 exceptions
          Instance.VMKernelVersionTooLowException vm kernel version is too low to support ipv6, please purchase the vm which support ipv6. 400 The VM version is too low, it is recommended that you start to purchase VM supporting IPV6.
          Vpc.AddIpv6Exception Vpc add ipv6 exception. 503 Vpc adds ipv6 exceptions

          Request Example

          POST http://bcc.bj.baidubce.com/v2/instance/addIpv6
          Host: bcc.bj.baidubce.com
          Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
          
          {
            "instanceId": "i-123456",
            "ipv6Address": "2400:da00:e003:2712::285",
            "reboot": true
          }

          Return Example

          HTTP/1.1 200 OK
          Content-Type: application/json;charset=UTF-8
          Date: Wed, 08 Jul 2015 03:28:11 GMT
          x-bce-request-id: d8752367-38e8-45e4-b4c7-e53be3137ce5
          Server: BWS
          
          {
              "ipv6Address": "2400:da00:e003:2712::285"
          }
          Previous
          Billing Change-Switch to Prepayment
          Next
          Create an Instance(By the specified instance package)