Domain name for API request: redis.intl.tencentcloudapi.com.
This API is used to modify the network configuration of an instance.
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: ModifyNetworkConfig. |
Version | Yes | String | Common Params. The value used for this API: 2018-04-12. |
Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
InstanceId | Yes | String | Instance ID. Log in to the Redis console and copy it in the instance list. |
Operation | Yes | String | Network change type. Valid values: - changeVip : VPC change, including the private IPv4 address and port.- changeVpc : Subnet change.- changeBaseToVpc : Change from classic network to VPC.- changeVPort : Port change. |
Vip | No | String | Private IPv4 address of the instance, which is required if Operation is changeVip . |
VpcId | No | String | VPC ID after the modification. - Configure this parameter when Operation is set to changeVpc or changeBaseToVpc. - Log in to the Redis console, switch to the Instance Details page, and click the VPC name next to the associated network in the Network Information area to obtain the VPC ID. |
SubnetId | No | String | ID of the subnet to which the VPC belongs after the modification. - Configure this parameter when Operation is set to changeVpc or changeBaseToVpc. - Log in to the Redis console, switch to the Instance Details page, and click the subnet name next to the associated network in the Network Information area to obtain the subnet ID. |
Recycle | No | Integer | Retention duration of the original private IPv4 address. - Unit: day. - Valid values: 0, 1, 2, 3, 7, and 15. Note: If the retention duration is not set or set to 0, the original network address will be released immediately. |
VPort | No | Integer | Network port after the change, which is required if Operation is changeVPort or changeVip . Value range: [1024,65535]. |
Parameter Name | Type | Description |
---|---|---|
Status | Boolean | Execution status. Ignore this parameter. |
SubnetId | String | New subnet ID of the instance |
VpcId | String | New VPC ID of the instance |
Vip | String | New private IPv4 address of the instance |
TaskId | Integer | Task ID. Obtain taskId and query the task execution status through the API DescribeTaskInfo. |
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 VPC of an instance through this API.
POST / HTTP/1.1
Host: redis.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyNetworkConfig
<Common request parameters>
{
"InstanceId": "crs-5a4p****",
"Operation": "changeVip"
}
{
"Response": {
"Status": true,
"Vip": "192.168.1.1",
"VpcId": "vpc-hu6khgap",
"SubnetId": "subnet-6mt7lir6",
"TaskId": 10086,
"RequestId": "f1b5aabe-806a-4886-b839-9907baa24c85"
}
}
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.SystemError | Internal system error, which is irrelevant to the business. |
FailedOperation.Unknown | Invalid data is entered for weekday. |
InternalError.DbOperationFailed | Internal system error with the database operation, which may be update, insert, select, etc. |
InternalError.InternalError | Internal error. |
InvalidParameter | Incorrect parameter. |
InvalidParameter.NotSupported | The operation is unsupported due to incorrect parameters. |
InvalidParameter.PermissionDenied | The API has no CAM permissions. |
InvalidParameterValue.CheckNotPass | Business verification failed |
ResourceNotFound.InstanceNotExists | No Redis instance is found by the serialId. |
ResourceUnavailable.InstanceLockedError | Redis has been locked by another process. |
ResourceUnavailable.InstanceStatusError | Operation unsupported: the instance is exceptional. |
ResourceUnavailable.InstanceUnLockedError | The instance has been locked by another process. |
UnauthorizedOperation | The operation is unauthorized. |
UnauthorizedOperation.NoCAMAuthed | No CAM permissions. |
UnauthorizedOperation.UserNotInWhiteList | The user is not in the allowlist. |
Was this page helpful?