CreateNodeBatch

Updated at:

Adds multiple Mongos and shard nodes to an ApsaraDB for MongoDB sharded cluster instance.

Operation description

Before calling this operation, make sure that you fully understand the billing methods and pricing of ApsaraDB for MongoDB.

This operation is applicable only to ApsaraDB for MongoDB sharded cluster instances.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dds:CreateNodeBatch

create

*Instance

acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbInstanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

ClientToken

string

No

The client token that is used to ensure the idempotence of the request and prevent duplicate submissions. You can generate the value on the client side. The value must be unique across different requests and can be up to 64 ASCII characters in length. It cannot contain non-ASCII characters.

ETnLKlblzczshOTUbOCz****

FromApp

string

No

Specifies whether to perform a dry run on the request. Valid values:

  • true: Performs a dry run without calling the operation. The system checks items such as request parameters, request format, service limits, and inventory. If the check fails, the corresponding error is returned. If the check succeeds, the DryRunOperation error code is returned.

  • false: Sends the request. If the check succeeds, the operation is performed. This is the default value.

OpenApi

AutoPay

boolean

No

The source of the request. Valid values:

  • OpenApi: The request is sent from OpenAPI Explorer.

  • mongo_buy: The request is sent from the console.

OpenApi

DBInstanceId

string

Yes

Specifies whether to enable automatic payment. Valid values:

  • true: Enables automatic payment. Make sure that your account has sufficient balance. This is the default value.

  • false: Disables automatic payment. You must manually pay the order. For more information, see Manually renew a subscription instance.

true

NodesInfo

string

Yes

The instance ID.

dds-bp18b0934e70****

CouponNo

string

No

The specifications of the Mongos or shard nodes to be added. For more information about the specifications, see Instance specifications.

Note

By default, a sharded cluster instance supports up to 32 Mongos nodes and 32 shard nodes.

{"Shards":[{"DBInstanceClass":"mdb.shard.4x.large.d","Storage":20}]}

BusinessInfo

string

No

Specifies whether to use a coupon. Valid values:

  • default or null: Uses a coupon. This is the default value.

  • youhuiquan_promotion_option_id_for_blank: Does not use a coupon.

default

ShardDirect

boolean

No

The business information.

{“ActivityId":"000000000"}

AccountName

string

No

Specifies whether to apply for a direct connection endpoint for the shard node. Valid values:

  • true: Applies for a direct connection endpoint for the shard node.

  • false: Does not apply for a direct connection endpoint for the shard node. This is the default value.

false

AccountPassword

string

No

The username of the account. The name must meet the following requirements:

  • The name must start with a lowercase letter.

  • The name can contain lowercase letters, digits, and underscores (_).

  • The name must be 4 to 16 characters in length.

Note
  • ApsaraDB for MongoDB does not support using keywords as account names.

  • The permissions of the account are fixed to read-only.

  • When you apply for a direct connection endpoint for a shard node for the first time, you must set the account name and password. You do not need to set them again for subsequent applications.

ceshi

Response elements

Element

Type

Description

Example

object

NodeId

string

The ID of the newly added Mongos or shard node.

d-bp18f7d6b6a7****

OrderId

string

The order ID.

50179021707****

RequestId

string

The request ID.

55D41A94-1ACE-55E8-8BC7-67D622E7****

Examples

Success response

JSON format

{
  "NodeId": "d-bp18f7d6b6a7****",
  "OrderId": "50179021707****",
  "RequestId": "55D41A94-1ACE-55E8-8BC7-67D622E7****"
}

Error codes

HTTP status code

Error code

Error message

Description

400 SSLNotSupportAddNode Instance with SSL certificate can't add node, please contact us to solve this problem. SSL encryption instances do not allow nodes to be added. If you need to, contact us to solve the problem.
400 ErrorInsufficientResource There is not enough resource for your operation, requestId: %s. There is not enough resource for your operation, requestId: %s.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.