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

ParameterTypeRequiredExampleDescription
ActionStringYesCreateDBNodes

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

ResourceGroupIdStringNorg-************

The ID of the resource group.

DBClusterIdStringYespc-*************

The ID of the cluster.

ClientTokenStringNo6000170000591aed949d0f54a343f1a4233c1e7d1c5c******

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 make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. The token is case-sensitive.

EndpointBindListStringNope-****************,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 the 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.
  • By default, if this parameter is left empty, the new node is added to all cluster endpoints for which the Automatically Associate New Nodes feature is enabled. If the AutoAddNewNodes parameter is set to Enable, the Automatically Associate New Nodes feature is enabled.
PlannedStartTimeStringNo2021-01-14T09:00:00Z

The earliest time to run the scheduled task for adding the node. 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 time that ranges from 2021-01-14T09:00:00Z to 2021-01-15T09:00:00Z.
  • Be default, if this parameter is left empty, the task for adding the node is immediately run.
PlannedEndTimeStringNo2021-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.
  • By default, if you specify the PlannedStartTime parameter but do not specify the PlannedEndTime parameter, the latest start time of the task is set to a value that is calculated by using the following formula: Value of the PlannedEndTime parameter + 30 minutes. 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.TargetClassStringNopolar.mysql.x4.medium

The specifications of the node that you want to add, which must be the same as that of existing nodes. For more information about node specifications, see the following topics:

  • For information about node specifications supported by the MySQL database engine, see Specifications of compute nodes.
  • For information about node specifications supported by the Oracle database engine, see Specifications of compute nodes.
  • For information about node specifications supported by the PostgreSQL database engine, 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.ZoneIdStringNocn-qingdao-c

The zone ID of the node that you want to add, 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.
ImciSwitchStringNoON

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 PostgreSQL(Compatible with Oracle) cluster or a PolarDB for PostgreSQL cluster.

Response parameters

ParameterTypeExampleDescription
DBNodeIdsArray of Stringpi-***************

The ID list of the database nodes that were created.

RequestIdStringE053E730-5755-4AA9-AA9D-A47867******

The ID of the request.

DBClusterIdStringpc-***************

The ID of the cluster.

OrderIdString2148126708*****

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 codeError codeError messageDescription
400ORDER.ARREARAGEYou 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.
404InvalidDBClusterId.NotFoundThe DBClusterId provided does not exist in our records.The error message returned because the specified cluster ID does not exist in the current record.

For a list of error codes, see Service error codes.