tencent cloud



Last updated: 2022-06-15 16:12:19

1. API Description

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

This API is used to modify the network settings of a TencentDB instance, such as switching its network type from classic network to VPC or between VPCs.

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: ModifyDBInstanceNetworkAddress.
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
OldIpExpiredTime Yes Integer Old IP retention period in minutes. The old IP will be released after the specified time, and both the old and new IPs can be accessed before the release. The value 0 indicates that the old IP will be reclaimed immediately.
NewUniqVpcId Yes String ID of the VPC to which the new IP belongs after the switch. When it is classic network, this field will be empty.
NewUniqSubnetId Yes String ID of the subnet to which the new IP belongs after the switch. When it is classic network, this field will be empty.
NetworkAddresses.N No Array of ModifyNetworkAddress IP information to be modified

3. Output Parameters

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

4. Example

Example1 Modifying the network information of a TencentDB instance

Input Example

Host: mongodb.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyDBInstanceNetworkAddress
<Common request parameters>

    "InstanceId": "xx",
    "InstanceId": "xx",
            "OldIpAddress": "xx",
            "NewIPAddress": "xx"
    "OldIpExpiredTime": 1,
    "NewUniqVpcId": "xx",
    "NewUniqSubnetId": "xx"

Output Example

  "Response": {
    "RequestId": "xx"

5. Developer Resources


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
InternalError.CheckAppIdFailed appId verification failed.
InvalidParameter Parameter error
InvalidParameter.InvalidVip Invalid Vip information
InvalidParameterValue.StatusAbnormal The instance is in a status where operations are not allowed.
InvalidParameterValue.VpcIdOrSubnetIdNotFound The VPC (subnet) was not found.
Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support