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 PolarDB 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 the same as that of the existing 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 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.
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 the same as those 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.
ClientToken String No 6000170000591aed949d0f54a343f1a4233c1e7d1c5ca816be

The client token that is used to ensure the idempotence of the requests. If an API operation is idempotent, the API operation returns the same result for identical requests. The value of this parameter is generated by the client and must be unique among different requests. The value is case-sensitive and can be a maximum of 64 ASCII characters in length.

Response parameters

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

The ID of the cluster.

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

The ID of the node that was 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

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

JSON format

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

Error codes

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