调用CreateDBNodes接口新增集群版实例节点。

背景信息

仅支持RDS MySQL集群版实例。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String CreateDBNodes

系统规定参数。

取值:CreateDBNodes

ClientToken String ETnLKlblzczshOTUbOCz****

该参数用于保证请求的幂等性,防止重复提交请求。参数值由客户端生成,保证在不同请求间唯一。

该参数值由ASCII字符组成,最长不超过64个字符,不能包含非ASCII字符。

DBInstanceId String rm-2ze450g4ctg6t****

实例ID。可调用DescribeDBInstances查询。

DBNode Array

集群节点列表。

classCode String mysql.n2.medium.xc

节点规格信息。

zoneId String cn-zhangjiakou-a

节点所在的可用区ID。

返回数据

名称 类型 示例值 描述
RequestId String 7A41C147-C8D0-4DAE-A1A2-17EBCD60DFA1

请求ID。

DBInstanceId String rm-2ze450g4ctg6t****

实例ID。

OrderId Long 2133400000*****

订单ID。

示例

请求示例

http(s)://rds.aliyuncs.com/?Action=CreateDBNodes
&ClientToken=ETnLKlblzczshOTUbOCz****
&DBInstanceId=rm-2ze450g4ctg6t****
&DBNode=[{"classCode":"mysql.n2.medium.xc","zoneId":"cn-zhangjiakou-a"}]
&公共请求参数

正常返回示例

XML格式

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

<CreateDBNodesResponse>
    <RequestId>7A41C147-C8D0-4DAE-A1A2-17EBCD60DFA1</RequestId>
    <DBInstanceId>rm-2ze450g4ctg6t****</DBInstanceId>
</CreateDBNodesResponse>

JSON格式

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

{
  "RequestId" : "7A41C147-C8D0-4DAE-A1A2-17EBCD60DFA1",
  "DBInstanceId" : "rm-2ze450g4ctg6t****"
}

错误码

HttpCode 错误码 错误信息 描述
400 DBNodeFormatFault The specified parameter DBNode is malformed dbNode格式不正确
400 DBNodeParameterRequired The specified parameter DBNode is required. 缺少dbNode参数
400 DBNodeParameterTooManyItems The specified parameter DBNode has too many items. 新增dbNode节点数过多
400 DBNodeParameter.InvalidClassCode The ClassCode of the item of the specified parameter DBNode is inconsistent. 参数DBNode中的ClassCode配置不一致。
403 GroupReplicationNotSupport.InvalidEngineVersion Group Replication requires the instance engine version to be 8.0. 实例数据库版本不是MySQL 8.0,不支持组复制。
403 GroupReplicationNotSupport.InvalidNodeClassCode Group Replication requires the ClassCode of each node to be consistent. 实例各节点间规格不一致,不支持组复制。
403 GroupReplicationNotSupport.InvalidNodeNum Group Replication is not supported, the number of nodes must be an odd number greater than or equal to 3. 实例节点个数不是大于等于3的单数,不支持组复制。
403 GroupReplicationNotSupport.InvalidXengine Group Replication is not supported because the instance has xengine tables. 实例存在xengine引擎表,不支持组复制。
403 GroupReplicationNotSupport.MemoryTooSmall Group Replication is not supported because the memory is too small. 实例规格内存太小,不支持组复制。

访问错误中心查看更多错误码。