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 Yes CreateDBNodes

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

ResourceGroupId String No rg-************

The ID of the resource group.

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

The ID of the cluster.

ClientToken String No 6000170000591aed949d0f54a343f1a4233c1e7d1c5c******

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length. The token is case-sensitive.

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 empty, 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 earliest start time of the task can be a point in time within the next 24 hours. For example, if the current time is 2021-01-14T09:00:00Z, you can specify a point in the time range from 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 start time to run the task. Specify the time in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC.

Note
  • The value of this parameter must be at least 30 minutes later than the value of the PlannedStartTime parameter.
  • If you specify the PlannedStartTime parameter but do not specify a value for the PlannedEndTime parameter, the latest start time of the task is set to a value that is calculated by the value of the PlannedEndTime parameter + 30 minutes by default. For example, if you set the PlannedStartTime parameter to 2021-01-14T09:00:00Z and you do not specify the PlannedEndTime parameter, the latest start time of the task is set to 2021-01-14T09:30:00Z.
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 of compute nodes.

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 existing nodes.
  • You can add multiple read-only nodes to only PolarDB for MySQL clusters at a time. A PolarDB for MySQL cluster contains a maximum of 15 read-only nodes.
  • If databases in the cluster run the Oracle or PostgreSQL database engine, you must specify this parameter. If databases in the cluster run the MySQL database engine, you do not need to specify this parameter.
DBNode.N.ZoneId String No cn-qingdao-c

The zone ID of the node to be added, which must be the same as that of existing 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 existing nodes.
  • You can add multiple read-only nodes to only PolarDB for MySQL clusters at a time. A PolarDB for MySQL cluster contains a maximum of 15 read-only nodes.
  • If databases in the cluster run the Oracle or PostgreSQL database engine, you must specify this parameter. If databases in the cluster run the MySQL database engine, you do not need to specify this parameter.
ImciSwitch String No ON

Specifies whether to enable the In-Memory Column Index (IMCI) feature. Default value: OFF. Valid values:

  • ON
  • OFF
Note This parameter is not supported if your cluster is a PolarDB for Oracle cluster or a PolarDB for PostgreSQL cluster.

Response parameters

Parameter Type Example Description
DBNodeIds Array of String pi-***************

The ID list of the database nodes that were created.

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

The ID of the request.

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

The ID of the cluster.

OrderId String 2148126708*****

The ID of the order.

Examples

Sample requests

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

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

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

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

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

Error codes

HTTP status code Error code Error message Description
400 ORDER.ARREARAGE You have an overdue bill. You must pay the bill first. The error message returned because you have an overdue bill. You must pay the bill first.
404 InvalidDBClusterId.NotFound The DBClusterId provided does not exist in our records. The error message returned because the specified DBClusterId does not exist in the current record.

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