Changes the network type of an ApsaraDB RDS instance from classic network to VPC
Operation description
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBInstanceId | string | Yes | The instance ID. You can call the DescribeDBInstances operation to query the instance ID. | rm-uf6wjk5xxxxxxx |
RetainClassic | string | No | Specifies whether to retain the classic network endpoint. Valid values:
| True |
ClassicExpiredDays | string | No | The number of days for which you want to retain the classic network endpoint. Valid values: 1 to 120. Default value: 7. Note
If you set the RetainClassic parameter to True, you must also specify this parameter.
| 7 |
InstanceNetworkType | string | Yes | The network type after the modification. Set the value to VPC. | VPC |
ReadWriteSplittingClassicExpiredDays | integer | No | The number of days for which you want to retain the read/write splitting endpoint of the classic network type. Valid values: 1 to 120. Default value: 7. Note
This parameter takes effect only when a read/write splitting endpoint of the classic network type exists and the RetainClassic parameter is set to True.
| 7 |
VPCId | string | No | The VPC ID. | vpc-uf6f7l4fg90xxxxxx |
VSwitchId | string | No | The ID of the vSwitch. This parameter is required if the VPCId parameter is specified. | vsw-uf6adz52c2pxxxxx |
PrivateIpAddress | string | No | The internal IP address of the instance. The internal IP address must be within the CIDR block supported by the specified vSwitch. The system automatically assigns a private IP address to an instance based on the values of VPCId and VSwitchId. | 172.10.40.25 |
ReadWriteSplittingPrivateIpAddress | string | No | The internal IP address that corresponds to the read/write splitting endpoint of the instance. The internal IP address must be within the CIDR block supported by the specified vSwitch. The system automatically assigns a private IP address to an instance based on the values of VPCId and VSwitchId. Note
This parameter is valid when a read/write splitting endpoint of the classic network type exists.
| 192.168.0.22 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "1AD222E9-E606-4A42-BF6D-8A4442913CEF",
"TaskId": "1025486523574",
"ConnectionString": "rm-bp1*****************.mysql.rds.aliyuncs.com"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | NetTypeExists | Specified network type already exists. | Failed to change the network type. The new network type is the type of network in which the RDS instance resides. |
400 | VswitchIpExhausted | Vswitch IP exhausted. | The operation failed. No vSwitch IP addresses are available. |
400 | OperationDenied.Switch | The specified instance must not be switched to VPC. | The operation failed. The RDS instance cannot be switched to a VPC. |
400 | OperationDenied.DBInstanceNetType | Operation is denied by the network type of current database instance. | The operation failed. The operation is not supported for the network type of the RDS instance. |
400 | OperationDenied.DBInstanceStatus | Operation is denied by the current database instance status. | The operation failed. The RDS instance is not in a ready state. |
400 | OperationNotSupported | This operation is not currently supported. | This operation is not supported. |
403 | OperationDenied.DBInstanceConnType | The current DB instance connection type does not support this operation. | The operation failed. The operation is not supported for the network connection type of the RDS instance. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2022-06-23 | API Description Update. The Error code has changed | View Change Details |