tencent cloud

Feedback

ModifyDBInstanceNetworkAddress

Last updated: 2023-03-20 10:55:14

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 No String Common Params. This parameter is not required for this API.
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

POST / HTTP/1.1
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

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
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.