Domain name for API request: redis.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 | No | String | Common Params. This parameter is not required for this API. |
InstanceId | Yes | String | Instance ID |
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 change, which is required if Operation is changeVpc or changeBaseToVpc . |
SubnetId | No | String | Subnet ID after the change, which is required if Operation is changeVpc or changeBaseToVpc . |
Recycle | No | Integer | Retention period of the original private IPv4 address - Unit: Days. - Valid values: 0 , 1 , 2 , 3 , 7 , 15 .Note: You can set the retention period of the original address only in the latest SDK. In earlier SDKs, the original address is released immediately. To view the SDK version, go to SDK Center. |
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, which can be used to query the task execution status through the DescribeTaskInfo API. |
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.
POST / HTTP/1.1
Host: redis.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": 0,
"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?