Changes the VPC or vSwitch of a Tair (Redis OSS-compatible) instance. If the instance uses the classic network, the network type is switched to VPC.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
kvstore:SwitchNetwork |
update |
*DBInstance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TargetNetworkType |
string |
No |
The network type to which you want to switch. Set the value to VPC to switch to a VPC network. |
VPC |
| VpcId |
string |
No |
The ID of the VPC to which you want to switch. You can call the DescribeVpcs operation to query the VPC ID. Note
|
vpc-bp1nme44gek34slfc**** |
| VSwitchId |
string |
No |
The ID of the vSwitch that belongs to the VPC to which you want to switch. You can call the DescribeVpcs operation to query the vSwitch ID. Note
The vSwitch and the instance must be deployed in the same zone. |
vsw-bp1e7clcw529l773d**** |
| InstanceId |
string |
Yes |
The ID of the instance. You can call the DescribeInstances operation to query the instance ID. |
r-bp1zxszhcgatnx**** |
| RetainClassic |
string |
No |
Whether to retain the original classic network endpoint after the instance is switched from classic network to VPC. Default value: False. Valid values:
Note
This parameter is available only when the network type of the instance is classic network. |
True |
| ClassicExpiredDays |
string |
No |
The retention period of the classic network endpoint. Valid values: 14, 30, 60, and 120. Unit: days. Note
|
30 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| TaskId |
string |
The ID of the task. |
578678678 |
| RequestId |
string |
The ID of the request. |
F0997EE8-F4C2-4503-9168-85177ED78C70 |
Examples
Success response
JSON format
{
"TaskId": "578678678",
"RequestId": "F0997EE8-F4C2-4503-9168-85177ED78C70"
}
Error response
JSON format
{
"TaskId":"578678678",
"requestId":"F0997EE8-F4C2-4503-9168-85177ED78C70"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidToken.Malformed | The Specified parameter Token is not valid. | |
| 400 | VpcServiceError | Invoke vpc service failed. | |
| 400 | IzNotSupportVpcError | Specify iz not support vpc. | |
| 400 | IzNotSupportSwitchNetworkError | Specify iz not support switch network. | |
| 400 | VpcVerifyError | VpcId is wrong. | |
| 400 | VpcAndVSwitchNotChange | VpcId and vSwitchId not change. | The VpcId and vSwitchId parameter values are not changed. |
| 403 | ResourceAlreadyExists | Resource already exists. | |
| 403 | InsufficientResourceCapacity | ip resource is conflict with other custins. | |
| 403 | VpcFreePasswordNoSupport | The custins opend VPCFreePassword not support this operation. | This operation is not supported for the instance because the VPC secret exemption is enabled or the# no_loose_check-whitelist-always parameter is set to no at the same time. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.