All Products
Search
Document Center

PolarDB:CreateDBNodes

Last Updated:Oct 10, 2024

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.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
polardb:CreateDBNodescreate
  • dbcluster
    acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ResourceGroupIdstringNo

The ID of the resource group.

rg-************
DBClusterIdstringYes

The ID of the cluster.

pc-*************
ClientTokenstringNo

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.

6000170000591aed949d0f54a343f1a4233c1e7d1c5c******
EndpointBindListstringNo

The ID of the cluster endpoint to which the read-only node is added. If you want to add the read-only node to multiple endpoints at the same time, separate the 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 ID of the default cluster endpoint or a custom cluster endpoint.
  • If you leave this parameter empty, the read-only node is added to all cluster endpoints for which the Automatically Associate New Nodes feature is enabled. If you set AutoAddNewNodes to Enable, the Automatically Associate New Nodes feature is enabled.
  • pe-****************,pe-****************
    PlannedStartTimestringNo

    The earliest start time of the scheduled task for adding the read-only node. The scheduled task specifies 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 scheduled 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 between 2021-01-14T09:00:00Z and 2021-01-15T09:00:00Z.
  • If you leave this parameter empty, the task for adding the read-only node is immediately run by default.
  • 2021-01-14T09:00:00Z
    PlannedEndTimestringNo

    The latest start time for upgrading the specifications within the scheduled time period. 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 PlannedStartTime.
  • If you specify PlannedStartTime but do not specify PlannedEndTime, the latest start time of the task is set to a value that is calculated by using the following formula: PlannedEndTime value + 30 minutes. For example, if you set PlannedStartTime to 2021-01-14T09:00:00Z and you do not specify PlannedEndTime, the latest start time of the task is set to 2021-01-14T09:30:00Z.
  • 2021-01-14T09:30:00Z
    DBNodearray<object>Yes

    The details of the read-only node.

    objectYes
    TargetClassstringNo

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

    Note
  • You need to specify either DBNode.N.ZoneId or DBNode.N.TargetClass. 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 at the same time only to PolarDB for MySQL clusters, which can contain up to of 15 read-only nodes.
  • This parameter is required for PolarDB for PostgreSQL (Compatible with Oracle) clusters or PolarDB for PostgreSQL clusters. This parameter is optional for PolarDB for MySQL clusters.
  • polar.mysql.x4.medium
    ZoneIdstringNo

    The zone ID of the node that you want to add, which must be the same as the zone ID of existing nodes. You can call the DescribeRegions operation to query the IDs of zones.

    Note
  • You need to specify either DBNode.N.ZoneId or DBNode.N.TargetClass. 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 at the same time only to PolarDB for MySQL clusters, which can contain up to of 15 read-only nodes.
  • This parameter is required for PolarDB for PostgreSQL (Compatible with Oracle) clusters or PolarDB for PostgreSQL clusters. This parameter is optional for PolarDB for MySQL clusters.
  • cn-qingdao-c
    DBNodeTypestringNo

    The type of the node. Valid values:

    • RO
    • STANDBY
    • DLNode
    RO
    ImciSwitchstringNo

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

    • ON
    • OFF
    Note This parameter is invalid for a PolarDB for Oracle or PolarDB for PostgreSQL cluster.
    ON

    Response parameters

    ParameterTypeDescriptionExample
    object
    DBNodeIdsarray

    Details about the nodes.

    DBNodeIdstring

    The IDs of the nodes.

    pi-***************
    RequestIdstring

    The ID of the request.

    E053E730-5755-4AA9-AA9D-A47867******
    DBClusterIdstring

    The ID of the cluster.

    pc-***************
    OrderIdstring

    The ID of the order.

    2148126708*****

    Examples

    Sample success responses

    JSONformat

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

    Error codes

    HTTP status codeError codeError messageDescription
    400ORDER.ARREARAGEYou must settle the overdue payments for your account before you can make a purchase.
    400InvalidDBNodeNum.MalformedThe number of parameter DBNode.N is not valid.The specified number of database nodes is invalid.
    400InvalidDBNode.MalformedThe specified parameter DBNode.N is not valid.The specified DBNode.N parameter is invalid.
    400OperationDenied.CreateDBNodesWithStrictConsistencyOn3AZ cluster does not allow create db nodes.Nodes cannot be added for multi-zone clusters.
    400InvalidZoneId.MalformedThe specified parameter ZoneId is not valid.The specified ZoneId parameter is invalid.
    403OperationDenied.ClusterCategoryThe operation is not permitted due to cluster category.This series is not supported by the cluster.
    403OperationDenied.DbVersionThe operation is not permitted due to DbVersion.This operation is not supported by the database version.
    404InvalidDBClusterId.NotFoundThe DBClusterId provided does not exist in our records.The specified DBClusterId parameter does not exist in the current record.
    404InvalidDBClusterId.MalformedThe specified parameter DBClusterId is not valid.The specified DBClusterId parameter is invalid.

    For a list of error codes, visit the Service error codes.

    Change history

    Change timeSummary of changesOperation
    2023-09-12The Error code has changedView Change Details
    2023-06-20The Error code has changed. The request parameters of the API has changedView Change Details
    2022-01-13The request parameters of the API has changedView Change Details