You can call the DescribeDBProxyEndpoint operation to query the details about a proxy endpoint that is used to connect to the database proxy of an ApsaraDB RDS instance.
Operation Description
Before you call the DescribeDBProxyEndpoint operation, make sure that the ModifyDBProxy operation is called to enable the database proxy feature for the instance.
- The dedicated proxy feature of ApsaraDB RDS for MySQL provides capabilities such as read/write splitting and short-lived connection optimization. For more information, see What are database proxies?
- The database proxy feature of ApsaraDB RDS for PostgreSQL supports read/write splitting. For more information, see What are database proxies?
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:DescribeDBProxyEndpoint | READ |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBInstanceId | string | Yes | The ID of the instance. You can call the DescribeDBInstances operation to query the ID of the instance. | rm-bp1ja4f56s7us**** |
DBProxyEndpointId | string | No | The name of the proxy terminal to which the proxy endpoint belongs. You can call the DescribeDBProxy operation to query the name of the proxy terminal. | keaxncrjluwu0gue**** |
DBProxyConnectString | string | No | The proxy endpoint that you want to query. You can call the DescribeDBProxy operation to query the proxy endpoint. | testproxy****.rwlb.rds.aliyuncs.com |
RegionId | string | Yes | The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
DBProxyEngineType | string | No | An internal parameter. You do not need to specify this parameter. | normal |
Response parameters
Examples
Sample success responses
JSON
format
{
"DBProxyConnectStringNetType": "InnerString",
"DBProxyFeatures": "TransactionReadSqlRouteOptimizeStatus:1;ConnectionPersist:0;ReadWriteSpliting:1",
"RequestId": "847BA085-B377-4BFA-8267-F82345ECE1D2",
"ReadOnlyInstanceWeight": "[{\\\"Availability\\\":\\\"Available\\\",\\\"DBInstanceId\\\":\\\"rr-bp176984qewd8****\\\",\\\"DBInstanceType\\\":\\\"ReadOnly\\\",\\\"Weight\\\":400},{\\\"Availability\\\":\\\"Available\\\",\\\"DBInstanceId\\\":\\\"rm-bp1ja4f56s7us****\\\",\\\"DBInstanceType\\\":\\\"Master\\\",\\\"Weight\\\":0}]",
"ReadOnlyInstanceDistributionType": "Standard",
"ReadOnlyInstanceMaxDelayTime": "30",
"DbProxyEndpointReadWriteMode": "ReadWrite",
"DbProxyEndpointAliases": "proxyterminal-test",
"DBProxyEndpointId": "keaxncrjluwu0gue****",
"DBProxyConnectStringPort": "3306",
"DBProxyConnectString": "testproxy****.rwlb.rds.aliyuncs.com",
"DBProxyEngineType": "normal",
"EndpointConnectItems": {
"EndpointConnectItems": [
{
"DbProxyEndpointPort": "3306",
"DbProxyEndpointConnectString": "testproxy****.rwlb.rds.aliyuncs.com",
"DbProxyEndpointNetType": "2"
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | MaxscaleNotSupport | Current custins can not support Maxscale. | - |
400 | InvalidEndPoint.Format | The specified EndPoint is not valid. | - |
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 | Endpoint.NotFound | The specified EndPoint is not valid. | The specified proxy terminal does not exist. |
400 | InvalidParameter | Specified parameter is invalid. | - |
403 | IncorrectKindCode | The current KindCode of the custins does not support the operation. | - |
403 | IncorrectDBInstanceType | The current database instance type does not support the operation. | - |
404 | Endpoint.NotFound | Specified endpoint is not found. | The port that is associated with the dedicated proxy endpoint cannot be found. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2022-09-01 | The error codes of the API operation change. | |||||||||||||||
| ||||||||||||||||
2022-06-08 | The error codes of the API operation change.,The input parameters of the API operation change.,The response structure of the API operation changes. | |||||||||||||||
|