百度智能云

All Product Document

          Dedicated Cloud Compute

          DCC Renewal

          Renew a DCC

          Description

          It refers to an operation to renew the specified DCC, that is to say, to extend the expiration time.

          • Asynchronous interface

          Request structure

          PUT /v{version}/dedicatedHost/{hostId}?{action}&clientToken={clientToken} HTTP/1.1
          Host: dcc.bj.baidubce.com
          Authorization authorization string
          
          {
              "billing":{
                  "reservation":{
                      "reservationLength": reservationLength,
                      "reservationTimeUnit": reservationTimeUnit
                  }
              }
          }

          Request header field

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

          Request parameters

          Parameter Name Type Required Parameter position Description
          version String Yes URI parameter API version number
          hostId String Yes URI parameter DCC ID
          action String Yes Query parameter This parameter in this interface takes purchaseReserved as its value
          clientToken String Yes Query parameter It is an idempotent Token, which is an ASCII character string with the length of no more than 64 bits
          billing Billing Yes RequestBody parameter Order information

          Return header field

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

          Return parameter

          No special return parameters are available.

          Error code

          Error Code Error Description HTTP Status Code Explanation
          BadRequest Bad request parameters or illegal request. 400 The request parameter is invalid
          NoSuchObject The specified object is not found or resource do not exist. 404 The resource is not available
          OperationDenied Operation not available. 409 The operation is not available

          Request example

          PUT /v1/dedicatedHost/d-qw2Pf3wB?purchaseReserved&clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
          Host: dcc.bj.baidubce.com
          Authorization bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
          
          {
              "billing":{
                  "reservation":{
                      "reservationLength":1,
                      "reservationTimeUnit":"Month"
                  }
              }
          }

          Return example

          HTTP/1.1 200 OK
          x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
          Date: Wed, 03 Dec 2014 06:42:19 GMT
          Content-Type: application/json;charset=UTF-8
          Server: BWS
          Previous
          Query Details of the DCC
          Next
          Create a DCC