Creates an endpoint that is used to connect to the dedicated proxies of an instance.
Operation Description
After you enable the dedicated proxy feature for an ApsaraDB RDS for MySQL instance or enable the database proxy feature for an ApsaraDB RDS for PostgreSQL instance, a default proxy endpoint is created. You can call this operation to create proxy endpoints of different network types. For more information, see Activate and configure the database proxy feature for an ApsaraDB RDS for PostgreSQL instance and What are database proxies?
The following network types are supported for ApsaraDB RDS for MySQL instances that use local disks: virtual private cloud (VPC), Classic, and Public.
The following network types are supported for instances that use cloud disks: VPC and Public. If you want to create a proxy endpoint of the public network type, you must configure IP address whitelists for the instance and its read-only instances to ensure connectivity between the client and the instance. You can call the ModifySecurityIps operation to configure an IP address whitelist for an instance.
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
rds:CreateDBProxyEndpointAddress | WRITE |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the instance. You can call the DescribeRegions operation to query most recent region list. | cn-hangzhou |
DBInstanceId | string | Yes | The ID of the instance. You can call the DescribeDBInstances operation to query the ID of the instance. | rm-t4n3axxxxx |
DBProxyEndpointId | string | Yes | The ID of the proxy endpoint. You can call the DescribeDBProxyEndpoint operation to query the ID of the proxy endpoint. | ta9um4xxxxx |
ConnectionStringPrefix | string | Yes | The prefix of the proxy endpoint. Enter a custom prefix. | test1234 |
DBProxyNewConnectStringPort | string | No | The port number that is associated with the proxy endpoint.
| 3306 |
DBProxyConnectStringNetType | string | Yes | The network type of the proxy endpoint. Valid values:
Default value: Classic | Public |
VPCId | string | No | The ID of the VPC to which the proxy endpoint belongs. You can call the DescribeDBInstanceAttribute operation to query the ID of the VPC. NoteThis parameter must be specified when DBProxyConnectStringNetType is set to VPC. | vpc-bpxxxxxx |
VSwitchId | string | No | The ID of the vSwitch that is associated with the specified VPC. You can call the DescribeDBInstanceAttribute operation to query the ID of the vSwitch. NoteThis parameter must be specified when DBProxyConnectStringNetType is set to VPC. | vsw-bpxxxxxx |
DBProxyEngineType | string | No | An internal parameter. You do not need to specify this parameter. | normal |
ResourceGroupId | string | No | The ID of the resource group. | rg-acfmy***** |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "F2911788-25E8-42E5-A3A3-1B38D263F01E"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidPort.Malformed | Specified port is not valid. | The port number is invalid. |
400 | NetTypeExists | Specified net type already existed. | |
400 | IncorrectDBInstanceNetType | Current DB instance net type does not support this operation. | The operation failed. The operation is not supported for the network type of the RDS instance. |
400 | InvalidConnectionString.Duplicate | Specified connection string already exists in the Aliyun RDS. | The endpoint is duplicate. Specify a different endpoint. |
400 | InvalidConnVPCId | Specified conn vpc id is not valid. | The specified VPC ID is invalid. |
400 | InvalidVpcInstanceId | Specified vpc instance id is not valid. | The specified VPC ID is invalid. |
400 | InvalidDBInstanceName | Specified parameter DBInstanceName is not valid. | The value of the DBInstanceName parameter is invalid. Check that the value of this parameter is not null or an empty string. |
400 | InvalidVpcIdOrVswitchId.NotSupported | The specified vpcId or vSwitchId is not supported. | The VPC that is specified by the vpcId parameter or the vSwitch that is specified by the vSwitchId parameter is not supported. Check the values of these parameters. |
400 | InvalidPrivateIpAddress.Mismatch | Specified private IP address is not in the CIDR block of virtual switch. | The VPC endpoint is invalid. |
400 | InvalidVpcParameter | Specified VPCId VSwitchId or IPAddress or TunnelId is not valid. | The values of the VPCId parameter and the VSwitchId parameter are invalid. Check the values of these parameters. |
403 | IncorrectDBInstanceType | Current DB instance type does not support this operation. | The operation failed. The RDS instance is not in a ready state. |
403 | IncorrectDBInstanceState | Current DB instance state does not support this operation. | - |
404 | Endpoint.NotFound | Specified endpoint is not found. | The port that is associated with the dedicated proxy endpoint cannot be found. |
404 | InvalidVSwitchId.NotFound | The specified VSwitch is invalid. | The operation failed. The vSwitch ID is invalid. Check the vSwitch ID. |
404 | Maxscale.NotFound | The related maxscale instance is not found. | The operation failed. No associated MaxScale instances can be found. |
404 | IncorrectVswitchId | The specified parameter VSwitchId is not valid. | The vSwitch ID is invalid. |
404 | InvalidDBInstanceName.NotFound | Invalid DBInstanceId NotFound. | The instance ID cannot be found. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2022-06-08 | The error codes of the API operation change.,The input parameters of the API operation change. | |||||||||||||
|