百度智能云

All Product Document

          Relational Database Service

          Instructions for Instance Management Interfaces

          Create a master instance

          Prerequisites

          Creating an instance requires identity verification. Otherwise, you can access the identity verification under the security certification on the Baidu Open Cloud official website console for the identity verification.

          Notes

          • This interface is used to create one or multiple cloud database RDS instances with the same configuration.
          • To create a postpaid instance, the account cash balance and the general voucher must be greater than 100 CNY. If you want to create a prepaid instance, the account cash balance must be greater than or equal to the instance cost.
          • Batch creation is supported, and if one instance fails to be created in the creation, all instances are rolled back, and all creations fail.
          • This API is an asynchronous interface. You can query the status of the instance through the Query Instance Details interface.

          Request Structure

          POST /v{version}/instance?clientToken={clientToken} HTTP/1.1
          HOST: rds.bj.baidubce.com
          Authorization authorization string
          
          {
              "billing":{
                  "paymentTiming": paymentTiming,
                  "reservation": {
                      "reservationLength": reservationLength
                  }
              },
              "purchaseCount"                : purchaseCount,
              "instanceName"              : instanceName,
              "engine"                    : engine,
              "engineVersion"             : engineVersion,
              "cpuCount":cpuCount,
              "memoryCapacity"       : memoryCapacity,
              "volumeCapacity"       : volumeCapacity,
              "zoneNames":[zoneName],
              "vpcId": vpcId ,
              "isDirectPay": isDirectPay,
              "subnets":[
              {
                  "zoneName": zoneName,
                  "subnetId": subnetId
              }
              ],
               "tags": [
                  {
                      "tagKey": tagKey,
                      "tagValue": tagValue
                  }
              ]
          }

          Request Header Field

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

          Request Parameters

          Parameter Name Type Required Parameter Position Description
          version string Yes URL parameter API version number
          clientToken string Yes Query parameters Idempotent Token is an ASCII character string with a length not exceeding 64 bits.
          billing billing Yes RequestBody parameter Billing related parameters Structure and Value Reference
          purchaseCount int No RequestBody parameter The number of cloud database RDS instances created by batch: maximum: 10, default, 1.
          instanceName string No RequestBody parameter 1)user-defined instance name;
          2) lowercase letters and numbers are allowed;
          3) length limit is 1~32;
          4)naming rule by default: {engine} + {engineVersion}.
          engine string Yes RequestBody parameter Database engine
          MySQL; SQLServer; PostgreSQL. Detail reference
          engineVersion string Yes RequestBody parameter Database version,
          MySQL:5.5/5.6/5.7;
          SQLServer:2008r2/2012sp3/2016sp1;
          PostgreSQL:9.4
          category string No RequestBody parameter Current series
          Basic: Standalone Basic, Standard: Dual High-Availability
          Only SQLServer 2012sp3 supports Standalone Basic. Standard by default Detail reference
          cpuCount int Yes RequestBody parameter CPU cores Values reference
          memoryCapacity int Yes RequestBody parameter Package memory size, unit: GB Values Reference
          volumeCapacity int Yes RequestBody parameter Package disk size, unit: GB Progressive increase by 5GB Range Reference
          zoneNames List String No RequestBody parameter Specify the zone information, which is empty by default and selected by the system automatically. You can query the list of availability zones through the Query Availability Zone List interface. The ZoneName naming convention is "country-region-AZ sequence” in lowercase letters, for example, Beijing AZ A is "cn-bj-a".
          vpcId string No RequestBody parameter For vpc, if not provided, it is the vpc by default. You can query the available VPC by calling the Query VPC List.
          isDirectPay Boolean No RequestBody parameter Direct payment (Yes/No), which is false by default. If the configuration change order is set as direct payment, fees are directly deducted, without the need of payment logic.
          subnets List SubnetMap No RequestBody parameter SubnetId of each AZ in vpc. If no vpc by default, specify subnetId. You can query the subnet list by calling the Query Subnet List Interface.
          tags List Tag No RequestBody parameter Instance binding tag Information

          SubnetMap

          Parameter Name Type Description
          zoneName String Availability zone
          subnetId String Subnet ID

          Tag

          Parameter Name Type Description
          tagKey String Tag key
          tagValue String Tag value

          Return Header Field

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

          Return Parameter

          Parameter Name Type Description
          instanceIds List InstanceId Arrays composed of instance id

          Request Example

          POST /v1/instance?clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
          HOST: rds.bj.baidubce.com
          ContentType: application/json
          Authorization bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
          
          {
              "billing":{
                 "paymentTiming":"Prepaid",
                 "reservation": {
                     "reservationLength": 1
                 }
              },
              "purchaseCount":1,
              "instanceName":"name-01",
              "engine":"mysql",
              "engineVersion":"5.6",
              "cpuCount":1,
              "memoryCapacity":0.25,
              "volumeCapacity":5,
              "zoneNames":["cn-bj-a"],
              "vpcId": "vpc-IyrqYIQ7",
              "isDirectPay": isDirectPay,
              "subnets":[
              {
                  "zoneName": "cn-bj-a",
                  "subnetId": "sbn-IyWRnII7"
              }
              ],
              "tags": [
                  {
                      "tagKey": "goods_type",
                      "tagValue": "music"
                  }
              ]
          }

          Return Example

          {
              "instanceIds":["rds-sgrw14145"]
          }

          Create a read-only instance

          Prerequisites

          Creation based on cloud database RDS master instance

          Notes

          • Only the master instance (database type: MySQL) supports the creation of a read-only instance
          • Read-only instance's database engine and database version are the same as the master instance's, so there is no need for further setting. Master instance's minimum version is MySQL 5.6
          • Read-only instance's disk capacity shall not be smaller than the master instance's disk capacity.
          • In terms of vpcid, read-only instance shall keep consistent with the master instance.
          • One RDS instance comprises up to five read-only instances, and only one instance is created per time.
          • The read-only instance is purchased only through postpaid mode.

          Request Structure

          POST /v{version}/instance?readReplica&clientToken={clientToken} HTTP/1.1
          HOST: rds.bj.baidubce.com
          Authorization authorization string
          
          {
              "billing":{
                  "paymentTiming": paymentTiming,
                  "reservation": {
                      "reservationLength": reservationLength
                  }
              },
              "sourceInstanceId"          : sourceInstanceId,
              "instanceName"              : instanceName,
              "cpuCount":cpuCount,
              "memoryCapacity"       : memoryCapacity,
              "volumeCapacity"      : volumeCapacity,
              "zoneNames":[zoneName],
              "vpcId": vpcId ,
              "isDirectPay": isDirectPay,
              "subnets":[
              {
                  "zoneName": zoneName,
                  "subnetId": subnetId
              }
              ],
              "tags": [
                  {
                      "tagKey": tagKey,
                      "tagValue": tagValue
                  }
              ]
          }

          Request Header Field

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

          Request Parameters

          Parameter Name Type Required Parameter position Description
          version string Yes URL parameter API Version Number
          clientToken string Yes Query parameters Idempotent Token is an ASCII character string with a length not exceeding 64 bits.
          billing billing No RequestBody parameter Billing related parameters
          Read-only instance is purchased only through postpaid mode. Structure and Value Reference
          purchaseCount int No RequestBody parameter Number of cloud database RDS read-only instances is created in batch, and only one instance may be created per time at present.
          sourceInstanceId string Yes RequestBody parameter Master instance ID
          instanceName string No RequestBody parameter User-defined instance name, Requirements:
          1) lowercase letters and numbers are allowed;
          2) length limit is 1~32;
          default: {engine} + {engineVersion}
          cpuCount int Yes RequestBody parameter CPU cores Values Reference
          memoryCapacity int Yes RequestBody parameter Package memory size, unit: GB Values Reference
          volumeCapacity int Yes RequestBody parameter Package disk size, unit: GB, progressive increase by 5GB. Read-only instance’s disk capacity shall not be smaller than the master instance’s disk capacity. Range Reference
          zoneNames string No RequestBody parameter Specify the zone information, which is empty by default and selected by the system automatically. You can query the list of availability zones through the Query Availability Zone List interface. The ZoneName naming convention is "country-region-AZ sequence” in lowercase letters, for example, Beijing AZ A is "cn-bj-a".
          Read-only instance is only set in single AZ, so only one AZ is filled out here.
          vpcId string No RequestBody parameter Same as master instance vpcId
          isDirectPay Boolean No RequestBody parameter Direct payment (Yes/No), which is false by default. If the distribution order is set as direct payment, fees are directly deducted, without the need of payment logic.
          subnets List
          SubnetMap
          No RequestBody parameter SubnetId of AZ in given vpc. If specified vpcid is custom vpc, subnetId must be specified. You can query the subnet list by calling the [Query Subnet List](RDS/API Reference/Instructions for Other Interfaces.md#Query Subnet List#

          ) interface.
          Read-only instance is only set in single AZ, so only one SubnetMap is filled in here. | tags| List Tag| No| RequestBody parameter| Instance binding tag Information

          SubnetMap

          Parameter Name Type Description
          zoneName String Availability zone
          subnetId String Subnet ID

          Tag

          Parameter Name Type Description
          tagKey String Tag key
          tagValue String Tag value

          Return Header Field

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

          Return Parameter

          Parameter Name Type Description
          instanceIds List InstanceId Arrays composed of instance id

          Request Example

          POST /v1/instance?readReplica&clientToken={be31b98c-5e41-4838-9830-9be700de5a20} HTTP/1.1
          HOST: rds.bj.baidubce.com
          ContentType: application/json
          Authorization bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
          
          {
              "billing":{
                 "paymentTiming":"Postpaid"
              },
              "purchaseCount":1,
              "instanceName":"mysql56",
              "sourceInstanceId": "rds-mudjimy0jbig",
              "cpuCount":1,
              "memoryCapacity":0.25,
              "volumeCapacity":5,
              "zoneNames":["cn-bj-a"],
              "vpcId": "vpc-IyrqYIQ7",
              "subnets":[
              {
                  "zoneName": "cn-bj-a",
                  "subnetId": "sbn-IyWRnII7"
              }
              ],
              "tags": [
                  {
                      "tagKey": "goods_type",
                      "tagValue": "music"
                  }
              ]
          }

          Return Example

          {
              "instanceIds":["rds-cwerfq23f"]
          }

          Create a proxy instance

          Prerequisites

          Creation based on cloud database RDS master instance.

          Notes

          • Only the master instance (database type: MySQL) supports the creation of a read-only instance
          • Proxy instance package is bound to master instance package, of which, master instance's minimum version is MySQL 5.6
          • One proxy instance may be created for each master instance at most.
          • Only the postpaid mode is supported.
          • In the identical vpc, together with the master instance.

          Request Structure

          POST /v{version}/instance?rdsproxy&clientToken={clientToken} HTTP/1.1
          HOST: rds.bj.baidubce.com
          Authorization authorization string
          
          {
              "billing":{
                  "paymentTiming": paymentTiming,
                  "reservation": {
                      "reservationLength": reservationLength
                  }
              },
              "sourceInstanceId"          : sourceInstanceId,
              "instanceName"              : instanceName,
              "nodeAmount":nodeAmount,
              "zoneNames":[zoneName],
              "vpcId": vpcId ,
              "subnets":[
              {
                  "zoneName": zoneName,
                  "subnetId": subnetId
              }
              ],
               "tags": [
                  {
                      "tagKey": tagKey,
                      "tagValue": tagValue
                  }
              ]
          }

          Request Header Field

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

          Request Parameters

          Parameter Name Type Required Parameter position Description
          version string Yes URL parameter API Version Number
          clientToken string Yes Query parameters Idempotent Token is an ASCII character string with a length not exceeding 64 bits.
          billing billing No RequestBody parameter Billing related parameters
          Proxy instance only supports postpaid mode. Structure and Value Reference
          sourceInstanceId string Yes RequestBody parameter Master instance ID
          instanceName string No RequestBody parameter User-defined instance name; requirements:
          1) lowercase letters and numbers are allowed;
          2) length limit is 1~32;
          default: rdsproxy
          nodeAmount int Yes RequestBody parameter Number of proxy instance nodes Value range: 2, 4, 6, 8, 16。
          zoneNames string No RequestBody parameter Specify the zone information, which is empty by default and selected by the system automatically. You can query the list of availability zones through the Query Availability Zone List interface. The ZoneName naming convention is "country-region-AZ sequence” in lowercase letters, for example, Beijing AZ A is "cn-bj-a".
          Keep consistent with the master instance’s AZ.
          vpcId string No RequestBody parameter Same as master instance vpcId
          isDirectPay Boolean No RequestBody parameter Direct payment (Yes/No), which is false by default. If the distribution order is set as direct payment, fees are directly deducted, without the need of payment logic.
          subnets List
          SubnetMap
          No RequestBody parameter SubnetId of AZ in given vpc. If specified vpcid is custom vpc, subnetId must be specified. You can query the subnet list by calling the Query Subnet List interface.
          Keep consistent with the master instance’s subnet.
          tags List Tag No RequestBody parameter Instance binding tag Information

          SubnetMap

          Parameter Name Type Description
          zoneName String Availability zone
          subnetId String Subnet ID

          Tag

          Parameter Name Type Description
          tagKey String Tag key
          tagValue String Tag value

          Return Header Field

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

          Return Parameter

          Parameter Name Type Description
          instanceIds List InstanceId Arrays composed of instance id

          Request Example

          POST /v1/instance?rdsproxy&clientToken={be31b98c-5e41-4838-9830-9be700de5a20} HTTP/1.1
          HOST: rds.bj.baidubce.com
          ContentType: application/json
          Authorization bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
          
          {
              "billing":{
                      "paymentTiming":"Postpaid"
              },
              "instanceName":"mysql56",
              "sourceInstanceId": "rds-mudjimy0jbig",
                  "nodeAmount":2,
              "zoneNames":["cn-bj-a"],
                  "vpcId": "vpc-IyrqYIQ7",
                  "subnets":[
                  {
                      "zoneName": "cn-bj-a",
                      "subnetId": "sbn-IyWRnII7"
                  }
                 ],
              "tags": [
                  {
                      "tagKey": "goods_type",
                      "tagValue": "music"
                  }
              ]
          }

          Return Example

          {
              "instanceIds":["rds-mj7c09d7ck0q"]
          }

          Query an instance list

          Notes

          • You can only view the instance list of your account.
          • The interface classifies each master instance and its read-only and proxy instances as one group, and the parameter maxKeys represents the number of groups, namely, the number of master instances.

          Request Structure

          GET /v{version}/instance HTTP/1.1
          HOST: rds.bj.baidubce.com
          Authorization authorization string

          Request Header Field

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

          Request Parameters

          Parameter Name Type Required Parameter Position Description
          version string Yes URL parameter API Version Number
          marker string No Query parameters The start position of a query to obtain the list by batch, which is a character string generated by the system.
          maxKeys int No Query parameters The maximum number contained in each page (master instance), maximum: 1000, default: 1000.

          Return Header Field

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

          Return Parameter

          Parameter Name Type Description
          marker String The start position of a query to obtain the list by batch, which is a character string generated by the system.
          maxKeys int Maximum number of master instances per page, which usually does not exceed 1,000, and the default value is 1,000.
          isTruncated boolean True means there is still data behind, and false means it is already the last page.
          nextMarker String Get the marker value to be passed on the next page. This field does not appear when isTruncated is false.
          instances List Instance Arrays composed of instance objects

          Request example

          GET /v1/instance?marker=r-IyWRtII7&maxKeys=1 HTTP/1.1
          HOST: rds.bj.baidubce.com
          ContentType: application/json
          Authorization bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de

          Return Example

          {
              "nextMarker": "rds-xktdeMSf",
              "marker": "rds-IyWRtII7",
              "maxKeys": 1,
              "isTruncated": true,
              "instances":[{
                  "instanceId"                : "rds-IyWRtII7",
                  "instanceName"              : "mysql5145",
                  "engine"                    : "mysql",
                  "engineVersion"             : "5.6",
                  "volumeCapacity"      : 5,
                  "memoryCapacity"       : 0.25,
                  "usedStorage"           : 1.24,
                  "instanceStatus"            : "Creating",
                  "instanceCreateTime"        : "2016-06-01T12:00:00Z",
                  "instanceExpireTime"        : "2016-07-01T12:00:00Z",
              "instanceType"              : "Master",
              "zoneNames"                 :["cn-bj-a"],
              "paymentTiming"             : "Prepaid"
              }]
          }

          Query details of the specified instance

          Note

          • Query the specified instance details.

          Request Structure

          GET /v{version}/instance/{instanceId} HTTP/1.1
          HOST: rds.bj.baidubce.com
          Authorization authorization string

          Request Header Field

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

          Request Parameters

          Parameter Name Type Required Parameter Position Description
          version string Yes URL parameter API Version Number
          instanceId string Yes URL parameter Specified instance ID

          Return Header Field

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

          Return Parameter

          Parameter Name Type Description
          instanceId String Instance ID
          instanceName String Instance Name of database
          engine String Database engine, see Engine Type
          engineVersion String Database engine version, see Database Version for value.
          category String Current series Basic: Standalone Basic, Standard: Dual High-Availability
          instanceStatus String Instance status, see [Instance Status List](RDS/API Reference/Appendix.md#Instance Status)
          cpuCount Int CPU cores
          memoryCapacity Int Instance memory (Unit: GB)
          volumeCapacity Int Storage space, Unit: GB
          nodeAmount Int Number of nodes (proxy instance)
          usedStorage Int Used storage space, Unit: GB
          instanceCreateTime Datetime Instance creation time, see Time and Date for regulations
          instanceExpireTime Datetime Instance expiration time, see Time and Date for regulations
          endpoint Endpoint Database connection information
          publicAccessStatus String Extranet access feature status, see Public Network Status List.
          syncMode String Data synchronization mode, see Synchronization Mode.
          backupPolicy BackupPolicy Backups policy
          region String Zone of current instance
          instanceType String Instance type, see Instance Type.
          sourceInstanceId String Master Instance ID, which is null for master instance.
          sourceRegion String The area of the master instance of the instance
          zoneNames List String AZ of the instance
          vpcId String ID for VPC of instances
          subnets List Subnet Subnet of current instance
          topology Topology The Topology information of the database cluster to which the instance belongs
          paymentTiming String Payment mode, see Payment Mode.

          Request example

          GET /v1/instance/rds-nca3jn5j HTTP/1.1
          HOST: rds.bj.baidubce.com
          ContentType: application/json
          Authorization bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de

          Return Example

          HTTP/1.1 200 OK
          x-bce-request-id 7869616F-7A68-6977-656E-406261696475
          Content-Type: application/json
          {
              "instanceId": "rds-mut9rhom8p3m",
              "instanceName": "mysql56",
              "memoryCapacity": 0.25,
              "volumeCapacity": 5,
              "nodeAmount": 2,
              "usedStorage": 0.5672,
              "engine": "mysql",
              "engineVersion": "5.6",
              "instanceStatus": "Available",
              "publicAccessStatus": "Closed",
              "instanceCreateTime": "2016-04-26T06:46:30Z",
              "instanceExpireTime": "2016-05-26T06:46:11Z",
              "endpoint": {
                  "address": "mysql.rdsmut9rhom8p3m.bj.bce.qa.sandbox.baidu.com",
                  "port": 3306,
                  "vnetIp": "192.168.0.1",
                  "inetIp": "180.32.96.1"
              },
              "instanceType": "Master",
              "zoneNames": ["cn-bj-a"],
              "vpcId": "v-kj3nc8fs",
              "backupPolicy": {
                  "backupDays": "0,1,2,3,4,5,6",
                  "backupTime": "17:00:00Z",
                  "persistent": false,
                  "expireInDays": 0,
                  "freeSpace": 5
              },
              "topology": {
                  "rdsproxy": [],
                  "master": [
                      "rds-mut9rhog"
                  ],
                  "readReplica": [
                      "rds-m2s2du6j",
                      "rds-m4bkxb0i"
                  ]
              }
             "syncMode"           : "Async",
             "paymentTiming"             : "Prepaid"
          }

          Delete an instance

          Release a RDS instance. After the release, the physical resources of the instance are taken back, and all relevant data are lost and can not be recovered.

          Notes

          • You can only release the postpaid or prepaid instance expired.
          • The release of a master instance means the concurrent release of read-only instance and proxy instance in relation to the master instance.

          Request Structure

          DELETE /v{version}/instance?instanceIds={instanceId} HTTP/1.1
          HOST: rds.bj.baidubce.com
          Authorization authorization string

          Request Header Field

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

          Request Parameters

          Parameter Name Type Required Parameter Position Description
          version string Yes URL parameter API Version Number
          instanceIds String Yes Query parameters Instance Id, and instances are divided by "," (English comma), and up to 10 instances may be inputted.

          Return Header Field

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

          Return Parameter

          No specific parameters are returned.

          Request example

          DELETE /v1/instance?instanceIds=r-cda3fcc8,r-mje3njde HTTP/1.1
          HOST: rds.bj.baidubce.com
          ContentType: application/json
          Authorization bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de

          Return Example

          HTTP/1.1 200 OK
          x-bce-request-id 7869616F-7A68-6977-656E-406261696475
          Content-Type: application/json
          Content-Length: 0

          Restart an instance

          Request Structure

          PUT /v{version}/instance/{instanceId}?reboot  HTTP/1.1
          HOST: rds.bj.baidubce.com
          Authorization authorization string

          Request Header Field

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

          Request Parameters

          Parameter Name Type Required Parameter Position Description
          versionstring Yes URL 0API Version Number
          instanceIdstring Yes URL Parameters Specify the instance Id

          Return Header Field

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

          Return Parameter

          No specific parameters are returned.

          Request example

          PUT /v1/instance/r-m1x9dhwe?reboot HTTP/1.1
          HOST: rds.bj.baidubce.com
          ContentType: application/json
          Authorization bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de

          Return Example

          HTTP/1.1 200 OK
          x-bce-request-id 7869616F-7A68-6977-656E-406261696475
          Content-Type: application/json
          Content-Length: 0

          Modify an instance name

          Request Structure

          PUT /v{version}/instance/{instanceId}?rename  HTTP/1.1
          HOST: rds.bj.baidubce.com
          Authorization authorization string
          
          {
              "instanceName":"instanceName"
          }

          Request Header Field

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

          Request Parameters

          Parameter Name Type Required Parameter Position Description
          versionstring Yes URL 0API Version Number
          instanceIdstring Yes URL Parameters Specify the instance Id
          instanceNamestring Yes RequestBody Parameter Support uppercase and lowercase letters, numbers, and special characters such as -_ /. The length is 1-64 bits.

          Return Header Field

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

          Return Parameter

          No specific parameters are returned.

          Request example

          PUT /v1/instance/r-mkd4j3ns?rename HTTP/1.1
          HOST: rds.bj.baidubce.com
          ContentType: application/json
          Authorization bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
          
          {
              "instanceName":"mysql55"
          }

          Return Example

          HTTP/1.1 200 OK
          x-bce-request-id 7869616F-7A68-6977-656E-406261696475
          Content-Type: application/json
          Content-Length: 0

          Modify synchronization mode

          Request Structure

          PUT /v{version}/instance/{instanceId}?modifySyncMode  HTTP/1.1
          HOST: rds.bj.baidubce.com
          Authorization authorization string
          
          {
              "syncMode":"syncMode"
          }

          Request Header Field

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

          Request Parameters

          Parameter Name Type Required Parameter Position Description
          versionstring Yes URL 0API Version Number
          instanceIdstring Yes URL Parameters Specify the instance Id
          syncMode string Yes RequestBody Parameters Values Reference Synchronization Mode

          Return Header Field

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

          Return Parameter

          No specific parameters are returned.

          Request example

          PUT /v1/instance/r-midne4nf?syncMode HTTP/1.1
          HOST: rds.bj.baidubce.com
          ContentType: application/json
          Authorization bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
          
          {
              "syncMode":"Async"
          }

          Return Example

          HTTP/1.1 200 OK
          x-bce-request-id 7869616F-7A68-6977-656E-406261696475
          Content-Type: application/json
          Content-Length: 0

          Modify connection information

          Note

          • Only domain name prefix can be modified at present.

          Request Structure

          PUT /v{version}/instance/{instanceId}?modifyEndpoint  HTTP/1.1
          HOST: rds.bj.baidubce.com
          Authorization authorization string
          
          {
              "address" : "address"
          }

          Request Header Field

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

          Request Parameters

          Parameter Name Type Required Parameter Position Description
          version String Yes URL Parameters API Version Number
          instanceId String Yes URL Parameters Specify the instance Id
          addressString Yes RequestBody Parameters Just transfer the domain name prefix. It consists of the lower case letters and numbers, It starts with a lowercase letter, Its length is 3-30 bits.

          Return Header Field

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

          Return Parameter

          No specific parameters are returned.

          Request example

          PUT /v1/instance/r-mmcjd3hf?modifyEndpoint HTTP/1.1
          HOST: rds.bj.baidubce.com
          ContentType: application/json
          Authorization bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
          
          {
              "address" : "mysql55"
          }

          Return Example

          HTTP/1.1 200 OK
          x-bce-request-id 7869616F-7A68-6977-656E-406261696475
          Content-Type: application/json
          Content-Length: 0

          Enable/Disable public network access

          Request Structure

          PUT /v{version}/instance/{instanceId}?modifyPublicAccess HTTP/1.1
          HOST: rds.bj.baidubce.com
          Authorization authorization string
          
          {
              "publicAccess":"publicAccess"
          }

          Request Header Field

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

          Request Parameters

          Parameter Name Type Required Parameter Position Description
          versionstring Yes URL 0API Version Number
          instanceIdstring Yes URL Parameters Specify the instance Id
          publicAccess Boolean Yes RequestBody Parameterstrue: Enable public network access
          false: Disable public network access

          Return Header Field

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

          Return Parameter

          No specific parameters are returned.

          Request example

          PUT /v1/instance/r-mmsde3nh?modifyPublicAccess HTTP/1.1
          HOST: rds.bj.baidubce.com
          ContentType: application/json
          Authorization bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
          
          {
              "publicAccess": true
          }

          Return Example

          HTTP/1.1 200 OK
          x-bce-request-id 7869616F-7A68-6977-656E-406261696475
          Content-Type: application/json
          Content-Length: 0

          Modify a backups policy

          Notes

          • Default: backup begins at 1:00 a.m. each day.
          • Cloud database RDS presents you with backups space (100%*local disk space).
          • Old backups are automatically deleted if the backups go beyond the complimentary space. If you permit "Backups beyond the complimentary space", the excess backups are additionally charged. See Backup Storage Billing for details.

          Request Structure

          PUT /v{version}/instance/{instanceId}?modifyBackupPolicy  HTTP/1.1
          HOST: rds.bj.baidubce.com
          Authorization authorization string
          
          {
              "backupDays": "backupDays",
              "backupTime": "backupTime",
              "persistent": persistent,
              "expireInDays": expireInDays
          }

          Request Header Field

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

          Request Parameters

          Parameter Name Type Required Parameter Position Description
          versionstring Yes URL 0API Version Number
          instanceIdstring Yes URL Parameters Specify the instance Id
          backupDays String Yes RequestBody Parameters Backup time separated by English comma, Sunday is defined as the first day, value 0
          for example: "0,1,2,3,5,6”
          backupTime String Yes RequestBody Parameters The start time of backup adopts UTC time
          For example: "17:00:00Z”
          persistent Boolean Yes RequestBody Parameters Whether or not the backup data persistence is enabled
          expireInDays Int No RequestBody Parameters Persistence days, the range is 7-730 days; if not enabled, the data shows 0 or is not filled

          Return Header Field

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

          Return Parameter

          No specific parameters are returned.

          Request example

          PUT /v1/instance/r-mfj4jsd9?modifyBackupPolicy HTTP/1.1
          HOST: rds.bj.baidubce.com
          ContentType: application/json
          Authorization bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
          
          {
              "backupDays": "0,1,2,3,4,5,6",
              "backupTime": "17:00:00Z",
              "persistent": true,
              "expireInDays": 10
          }

          Return Example

          HTTP/1.1 200 OK
          x-bce-request-id 7869616F-7A68-6977-656E-406261696475
          Content-Type: application/json
          Content-Length: 0

          Scale an instance

          As to capacity expansion/shrinkage for resources used by the designated RDS, the system only supports capacity expansion/shrinkage to memory, disk, and CPU numbers of master instance and read-only instance, in addition to the number of nodes of proxy instance.

          Notes

          • When the instance is postpaid, the auto-scaling can be performed. When the instance is prepaid, the scale-down operation can not be performed.
          • Only when the instance is available can capacity expansion/shrinkage be performed.
          • The instance is restarted once after scaling.
          • In the case of asynchronous interface, view the instance details interface to check if the instanceStatus is recovered.

          Request Structure

          PUT /v{version}/instance/{instanceId}?resize HTTP/1.1
          HOST: rds.bj.baidubce.com
          Authorization authorization string
          
          {
              "cpuCount"               : cpuCount,
              "memoryCapacity"      : memoryCapacity,
              "volumeCapacity"      : volumeCapacity,
              "nodeAmount"          : nodeAmount,
              "isDirectPay"         : isDirectPay
          }

          Request Header Field

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

          Request Parameters

          Parameter Name Type Required Parameter Position Description
          version string Yes URL parameter API Version Number
          instanceId string Yes URL parameter Specified instance ID
          cpuCount Int No RequestBody parameter CPU cores Values Reference.
          In case of configuration change in master instance or read-only instance, one of the cpuCount, memoryCapacity, and volumeCapacity must be filled in.
          memoryCapacity Int No RequestBody parameter Total memory size, unit: GB Values reference In case of configuration change in master instance or read-only instance, one of the cpuCount, memoryCapacity, and volumeCapacity must be filled in.
          volumeCapacity Int No RequestBody parameter Disk size, unit: GB, progressive increase by 5G. Values reference In case of configuration change in master instance or read-only instance, one of the cpuCount, memoryCapacity, and volumeCapacity must be filled in.
          nodeAmount Int No RequestBody parameter Number of proxy instance nodes Values Reference.
          This item must be filled in at the time of configuration change in proxy instance.
          isDirectPay Boolean No RequestBody parameter Direct payment (Yes/No), which is false by default. If the distribution order is set as direct payment, fees are directly deducted, without the need for payment logic.

          Return Header Field

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

          Return Parameter

          No specific parameters are returned.

          Request Example

          PUT /v1/instance/r-mdjei8sh?resize HTTP/1.1
          HOST: rds.bj.baidubce.com
          ContentType: application/json
          Authorization bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
          
          {
              "cpuCount"              : 4,
              "memoryCapacity"      : 8,
              "volumeCapacity"      : 40
          }

          Return Example

          HTTP/1.1 200 OK
          x-bce-request-id 7869616F-7A68-6977-656E-406261696475
          Content-Type: application/json
          Content-Length: 0
          Previous
          Object Instructions
          Next
          Instructions for Whitelist Management Interfaces