Adds a read-only node to a PolarDB cluster.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No CreateDBNodes

The operation that you want to perform. Set the value to CreateDBNodes.

DBClusterId String Yes pc-*************

The ID of the cluster.

DBNode.N.TargetClass String No polar.mysql.x4.medium

The specification of the node to be added. The specification of the new node must be consistent with the specifications of the original nodes. For more information about the node specifications, see Specifications and pricing.

Note
  • You must specify at least one of the DBNode.N.ZoneId and DBNode.N.TargetClass parameters. N is an integer that starts from 1. The maximum value of N is equal to 16 minus the number of current nodes.
  • You can add multiple read-only nodes to only ApsaraDB PolarDB MySQL-compatible edition clusters at a time. A ApsaraDB PolarDB MySQL-compatible edition cluster contains a maximum of 15 read-only nodes.
DBNode.N.ZoneId String No cn-qingdao-c

The zone ID of the node to be added. The zone ID of the new node must be consistent with the IDs of original nodes. You can call the DescribeRegions operation to query the IDs of zones.

Note
  • You must specify at least one of the DBNode.N.ZoneId and DBNode.N.TargetClass parameters. N is an integer that starts from 1. The maximum value of N is equal to 16 minus the number of current nodes.
  • You can add multiple read-only nodes to only ApsaraDB PolarDB MySQL-compatible edition clusters at a time. A ApsaraDB PolarDB MySQL-compatible edition cluster contains a maximum of 15 read-only nodes.
ClientToken String No 6000170000591aed949d0f54a343f1a4233c1e7d1c5c******

Ensures the idempotence of requests to prevent duplicate requests from being submitted. You can use the client to generate the value, but you must make sure that the value is unique among different requests. The token is case-sensitive, and can contain a maximum of 64 ASCII characters in length.

EndpointBindList String No pe-****************,pe-****************

The ID of the cluster endpoint to which the new node is added. If you need to add the node to multiple endpoints at a time, separate multiple endpoint IDs with commas (,).

Note
  • you can call DescribeDBClusterEndpoints operation to query the details of cluster endpoints, including endpoint IDs.
  • You can enter the IDs of the default cluster endpoint and a custom cluster endpoint.
  • If this parameter is left blank, the new node is added to all the cluster endpoints for which the Automatically Associate New Nodes feature is enabled by default. When the AutoAddNewNodes parameter is set to Enable, the Automatically Associate New Nodes feature is enabled.
PlannedStartTime String No 2021-01-14T09:00:00Z

The earliest time when the scheduled task for adding the node starts to be run. The scheduled task indicates that the task is run in the required period. Specify the time in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC.

Note
  • The value range of the start time is a time point in the next 24 hours. For example, if the current time is 2021-01-14T09:00:00Z, you can enter a start time point in the range of 2021-01-14T09:00:00Z to 2021-01-15T09:00:00Z.
  • If this parameter is left blank, the task for adding the node is immediately run by default.
PlannedEndTime String No 2021-01-14T09:30:00Z

The latest time when the scheduled task starts to be run. Specify the time in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC.

Note
  • The latest time must be at least 30 minutes later than the start time.
  • If you specify the PlannedStartTime parameter but do not specify the PlannedEndTime parameter, the default latest time when the specified task starts to be run is start time + 30 minutes. For example, when the PlannedStartTime parameter is set to 2021-01-14T09:00:00Z and the PlannedEndTime parameter is left blank, the latest time when the specified task starts to be run is 2021-01-14T09:30:00Z.

Response parameters

Parameter Type Example Description
DBClusterId String pc-***************

The ID of the database cluster.

DBNodeIds List pi-***************

The ID list of the database nodes that were created.

OrderId String 11111111111111

The ID of the order.

RequestId String E053E730-5755-4AA9-AA9D-A47867******

The ID of the request.

Examples

Sample requests

http(s)://polardb.aliyuncs.com/? Action=CreateDBNodes
&DBClusterId=pc-*************
&<Common request parameters>

Sample success responses

XML format

<CreateDBNodesResponse>
  <DBNodeIds>
        <DBNodeId>pi-***************</DBNodeId>
        <DBNodeId>pi-***************</DBNodeId>
  </DBNodeIds>
  <RequestId>E053E730-5755-4AA9-AA9D-A47867******</RequestId>
  <DBClusterId>pc-***************</DBClusterId>
  <OrderId>11111111111111</OrderId>
</CreateDBNodesResponse>

JSON format

{
    "DBNodeIds": {
        "DBNodeId": [
            "pi-***************",
            "pi-***************"
        ]
    },
    "RequestId": "E053E730-5755-4AA9-AA9D-A47867******",
    "DBClusterId": "pc-***************",
    "OrderId": 11111111111111
}

Error codes

For a list of error codes, visit the API Error Center.