Domain name for API request: mongodb.intl.tencentcloudapi.com.
This API is used to modify the network information on a TencentDB for MongoDB instance. It supports switching from a basic network to a VPC network or from one VPC network to another VPC network.
A maximum of 20 requests can be initiated per second for this API.
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 | Specifies the ID of the instance for modifying the network. For example, cmgo-p8vn****. Log in to the TencentDB for MongoDB console and copy the instance ID from the instance list. |
| OldIpExpiredTime | Yes | Integer | Retention period of the original IP address. - Unit: minutes. 0 means that the IP address is immediately repossessed. - The original IP address will be released after a scheduled period. Both the original and new IP addresses are accessible before release. |
| NewUniqVpcId | Yes | String | VPC ID after the switch. If the instance is using a basic network, this field is not required. The DescribeDBInstances API can be called to obtain the VPC ID. |
| NewUniqSubnetId | Yes | String | VPC subnet ID after the switch. If the instance is using a basic network, this field is not required. The DescribeDBInstances API can be called to obtain the subnet ID of the VPC. |
| NetworkAddresses.N | No | Array of ModifyNetworkAddress | IP address information, including the new IP address and the original IP address. |
| Parameter Name | Type | Description |
|---|---|---|
| FlowId | Integer | ID of the asynchronous process task for modifying the network information. |
| 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. |
This example shows you how to modify the VIP information on a TencentDB for MongoDB instance.
POST / HTTP/1.1
Host: mongodb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyDBInstanceNetworkAddress
<Common request parameters>
{
"InstanceId": "cmgo-9d0p****",
"OldIpExpiredTime": 1,
"NetworkAddresses": [
{
"NewIPAddress": "10.0.0.10",
"OldIpAddress": "10.0.0.1"
}
],
"NewUniqVpcId": "vpc-gfb3****",
"NewUniqSubnetId": "subnet-6fe2****"
}{
"Response": {
"FlowId": 1679402995,
"RequestId": "8279f6c2-db93-4b2e-931b-233d780b1a91"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation.NotAllowModifyAddrAfterOpenWanService | Public network access has been enabled for the current instance. |
| 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. |
Feedback