tencent cloud

APIs

ModifyInstanceAz

Download
聚焦模式
字号
最后更新时间: 2026-05-18 17:47:45

1. API Description

Domain name for API request: mongodb.intl.tencentcloudapi.com.

This API is used to adjust the availability zone distribution of MongoDB cloud database nodes. You can specify the primary AZ and total availability zone distribution info to complete node distribution adjustment.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: ModifyInstanceAz.
Version Yes String Common Params. The value used for this API: 2019-07-25.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
InstanceId Yes String

Instance ID, such as cmgo-p8vn****. Log in to the MongoDB console and copy the instance ID from the instance list.

PrimaryNodeZone Yes String

Availability zone ID where the primary node is located. For the method for obtaining, please see Regions and Availability Zones.

SecondaryNodeZone.N Yes Array of String

ID list of the availability zone where the secondary node resides.
Note: It cannot contain the availability zones where the primary node and Hidden nodes reside.

HiddenNodeZone No String

If the current instance has no configuration for Hidden nodes, this parameter is not required.

ReadonlyNodeZone.N No Array of String

List of AZ IDs where read-only nodes reside.
Note: If the current instance contains read-only nodes, this parameter is required.

InMaintenance No Integer

Specify the time policy for executing the availability zone switch.

3. Output Parameters

Parameter Name Type Description
DealId String

Order ID for availability zone adjustment.

RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Change a single-AZ instance to multi-availability zone

Input Example

POST / HTTP/1.1
Host: mongodb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyInstanceAz
<Common request parameters>

{
    "InstanceId": "cmgo-p9d****",
    "PrimaryNodeZone": "ap-guangzhou-2",
    "HiddenNodeZone": "ap-guangzhou-3",
    "SecondaryNodeZone": [
        "ap-guangzhou-4"
    ],
    "ReadonlyNodeZone": [
        null
    ],
    "InMaintenance": null
}

Output Example

{
    "Response": {
        "DealId": "2025080702700316299****",
        "RequestId": "87f3a779-9b2e-475f-bcf5-966cffbbbe9f"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InternalError Internal error
InvalidParameter Parameter error
InvalidParameterValue.CheckAppIdFailed appId verification failed.
InvalidParameterValue.IllegalInstanceStatus Invalid instance status
InvalidParameterValue.StatusAbnormal The instance is in a status where operations are not allowed.
ResourceInsufficient Insufficient resources.

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈