ModifyNodeSpecBatch

Updated at:

Modifies the configurations of one or more Mongos or shard nodes in 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.

When you perform batch operations to upgrade or decrease the quota for multiple sharded cluster instances, the target specifications are subject to certain constraints. For example, during storage capacity expansion, the target capacity must be greater than or equal to the current capacity. If the specifications of multiple sharded cluster instances are inconsistent, the system randomly selects the specifications of one sharded cluster instance to construct the constraint conditions, which may result in the failure to upgrade or decrease the quota. If the batch upgrade or decrease the quota cannot be performed normally, we recommend that you use the ModifyNodeSpec operation to Upgrade/Downgrade a single sharded cluster instance.

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:ModifyNodeSpecBatch

update

*Instance

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

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID. You can call the DescribeRegions operation to query available regions.

cn-hangzhou

DBInstanceId

string

Yes

The instance ID.

dds-bp1337621e8f****

NodesInfo

string

Yes

The specifications of the Mongos or shard nodes whose configurations you want to modify. For more information, see Instance types.

{"Shards":[{"DBInstanceClass":"dds.shard.mid","DBInstanceName":"d-bp14ae4572fd****","Storage":20},{"DBInstanceClass":"dds.shard.mid","DBInstanceName":"d-bp19f4f92dc5****","Storage":30}]}

ClientToken

string

No

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 the value is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

ETnLKlblzczshOTUbOCz****

AutoPay

boolean

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 the request parameters, request format, service limits, and available resources. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.

  • false: sends the request. If the request passes the check, the operation is performed. Default value: false.

true

EffectiveTime

string

No

Specifies whether to enable automatic payment. Valid values:

  • true: enables automatic payment. Make sure that your account has sufficient balance.

  • false: disables automatic payment. You can log on to the ApsaraDB for MongoDB console, choose Billing > Expenses and Costs in the upper-right corner, and then choose Orders > My Orders in the left-side navigation pane. On the Orders tab, find the target order and complete the payment.

Default value: true.

true

OrderType

string

No

The effective period of the configuration change. Valid values:

  • Immediately: The configuration change takes effect immediately.

  • MaintainTime: The configuration change takes effect within the maintenance window of the instance.

Note

Default value: Immediately.

Valid values:

  • UPGRADE
  • DOWNGRADE

Immediately

CouponNo

string

No

The type of the configuration change. Valid values:

  • UPGRADE: upgrades the configurations.

  • DOWNGRADE: downgrades the configurations.

Note

This parameter is available only when the billing method of the instance is subscription.

UPGRADE

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

TargetVswitchId

string

No

The business information.

{“ActivityId":"000000000"}

TargetHiddenZoneId

string

No

The ID of the destination vSwitch when you cloud disk instance across zones and change its configurations at the same time.

Important This parameter is supported only for instances with cloud disks.

Note
  • This parameter is required only when you cloud disk instance across zones and change its configurations at the same time.

vsw-xxxxxxxx

AlignPrimaryZone

boolean

No

The destination zone of the hidden node when you cloud disk instance across zones and change its configurations at the same time.

Important This parameter is supported only for instances with cloud disks.
Important The value of this parameter cannot be the same as the value of the TargetZoneId or TargetSecondaryZoneId parameter.

Note
  • This parameter is required only when you cloud disk instance across zones and change its configurations at the same time.

cn-hangzhou-e

TargetZoneId

string

No

Specifies whether to automatically align the primary node to the primary zone after operations such as configuration changes for a multi-zone instance. If you choose not to align the primary node, a primary/secondary switchover (transient connection) is avoided. Default value: true.

cn-hangzhou-h

TargetSecondaryZoneId

string

No

The destination zone of the primary node when you cloud disk instance across zones and change its configurations at the same time.

Important This parameter is supported only for instances with cloud disks.
Important The value of this parameter cannot be the same as the value of the TargetSecondaryZoneId or TargetHiddenZoneId parameter.

Note
  • This parameter is required only when you cloud disk instance across zones and change its configurations at the same time.

cn-hangzhou-h

Response elements

Element

Type

Description

Example

object

OrderId

string

The order ID.

21012719476****

RequestId

string

The request ID.

0637BC25-6895-5500-871F-1127CA34****

Examples

Success response

JSON format

{
  "OrderId": "21012719476****",
  "RequestId": "0637BC25-6895-5500-871F-1127CA34****"
}

Error codes

HTTP status code

Error code

Error message

Description

400 GadInstanceNotSupport GAD Instance doesn't support the operation. The operation is not supported by the GAD instance.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.