tencent cloud

文档反馈

ModifyDBInstanceSpec

最后更新时间:2023-03-20 10:55:13

1. API Description

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

This API is used to adjust the specification configuration of a TencentDB for MongoDB. The purchasable specifications supported by the API can be obtained through the DescribeSpecInfo API.

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: ModifyDBInstanceSpec.
Version Yes String Common Params. The value used for this API: 2019-07-25.
Region No String Common Params. This parameter is not required for this API.
InstanceId Yes String Instance ID in the format of cmgo-p8vnipr5. It is the same as the instance ID displayed on the TencentDB Console page
Memory Yes Integer Memory size after instance configuration change in GB. Memory and disk must be upgraded or degraded simultaneously
Volume Yes Integer Disk size after instance configuration change in GB. Memory and disk must be upgraded or degraded simultaneously. For degradation, the new disk capacity must be greater than 1.2 times the used disk capacity
OplogSize No Integer Oplog size after instance configuration change in GB, which ranges from 10% to 90% of the disk capacity and is 10% of the disk capacity by default
NodeNum No Integer Node quantity after configuration modification. The value range is subject to the response parameter of the DescribeSpecInfo API. If this parameter is left empty, the node quantity remains unchanged.
ReplicateSetNum No Integer Shard quantity after configuration modification, which can only be increased rather than decreased. The value range is subject to the response parameter of the DescribeSpecInfo API. If this parameter is left empty, the shard quantity remains unchanged.
InMaintenance No Integer Switch time. Valid values: 0 (upon modification completion), 1 (during maintenance time). Default value: 0. If the quantity of nodes or shards is modified, the value will be 0.

3. Output Parameters

Parameter Name Type Description
DealId String Order ID
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Adjusting the configurations of a TencentDB instance

Input Example

https://mongodb.tencentcloudapi.com/?Action=ModifyDBInstanceSpec
&InstanceId=cmgo-p8vnipr5
&Memory=4
&Volume=250
&<Common request parameters>

Output Example

{
    "Response": {
        "RequestId": "d88095e5-50e8-4245-a0cf-993a536f9b20",
        "DealId": "7142863"
    }
}

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
InvalidParameter.ZoneClosed Instances are not purchasable in this AZ.
InvalidParameterValue.InvalidTradeOperation Billing error. Corresponding purchase/renewal/configuration change operations are not allowed for the current instance.
InvalidParameterValue.ModifyModeError Memory and disk must be upgraded or degraded simultaneously.
InvalidParameterValue.NotFoundInstance The instance was not found.
InvalidParameterValue.OplogSizeOutOfRange The OplogSize parameter is set incorrectly and should be between 10% and 90% of the disk capacity.
InvalidParameterValue.SetDiskLessThanUsed The disk size to be set cannot be less than 1.2 times the used disk capacity.
InvalidParameterValue.SpecNotOnSale Incorrect purchasable specification.
InvalidParameterValue.StatusAbnormal The instance is in a status where operations are not allowed.
联系我们

联系我们,为您的业务提供专属服务。

技术支持

如果你想寻求进一步的帮助,通过工单与我们进行联络。我们提供7x24的工单服务。

7x24 电话支持