All Products
Search
Document Center

ApsaraDB RDS:DescribeDBProxyEndpoint

Last Updated:Jun 06, 2023

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.
OperationAccess levelResource typeCondition keyAssociated operation
rds:DescribeDBProxyEndpointREAD
  • RDS
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
  • rds:ResourceTag
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The ID of the instance. You can call the DescribeDBInstances operation to query the ID of the instance.

rm-bp1ja4f56s7us****
DBProxyEndpointIdstringNo

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****
DBProxyConnectStringstringNo

The proxy endpoint that you want to query. You can call the DescribeDBProxy operation to query the proxy endpoint.

testproxy****.rwlb.rds.aliyuncs.com
RegionIdstringYes

The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
DBProxyEngineTypestringNo

An internal parameter. You do not need to specify this parameter.

normal

Response parameters

ParameterTypeDescriptionExample
object
DBProxyConnectStringNetTypestring

The network type of the proxy endpoint. Valid values:

  • InnerString: internal network
  • OuterString: Internet
InnerString
DBProxyFeaturesstring

The configuration of the proxy terminal. The value of this parameter is a JSON string that consists of the following fields:

  • TransactionReadSqlRouteOptimizeStatus: the status of the transaction splitting feature. Valid values: 0 and 1. The value 0 indicates that the feature is disabled. The value 1 indicates that the feature is enabled.

  • ConnectionPersist: the status of the connection pool feature. Valid values: 0, 1, and 2. The value 0 indicates that the connection pool feature is disabled. The value 1 indicates that the session connection pool feature is enabled. The value 2 indicates that the transaction connection pool feature is enabled.

  • ReadWriteSpliting: the status of the read/write splitting feature. Valid values: 0 and 1. The value 0 indicates that the feature is disabled. The value 1 indicates that the feature is enabled.

  • PinPreparedStmt: an internal field that is available only for ApsaraDB RDS for PostgrSQL instances.

    NoteIf the instance runs PostgreSQL, you can change only the value of the ReadWriteSpliting field. The TransactionReadSqlRouteOptimizeStatus and PinPreparedStmt fields are set to their default values 1.
TransactionReadSqlRouteOptimizeStatus:1;ConnectionPersist:0;ReadWriteSpliting:1
RequestIdstring

The ID of the request.

847BA085-B377-4BFA-8267-F82345ECE1D2
ReadOnlyInstanceWeightstring

The read weights of the instance and its read-only instances. The value of this parameter is a JSON string that consists of the following fields:

  • DBInstanceId: the ID of the instance.
  • DBInstanceType: the role of the instance. Valid values: Master and ReadOnly.
  • Weight: the read weight of the instance. The read weight increases in increments of 100 and cannot exceed 10000.
NoteIf no read-only instances are attached to the instance, this operation returns null for this parameter.
[{\"Availability\":\"Available\",\"DBInstanceId\":\"rr-bp176984qewd8****\",\"DBInstanceType\":\"ReadOnly\",\"Weight\":400},{\"Availability\":\"Available\",\"DBInstanceId\":\"rm-bp1ja4f56s7us****\",\"DBInstanceType\":\"Master\",\"Weight\":0}]
ReadOnlyInstanceDistributionTypestring

The method that is used to assign read weights. For more information, see Modify the latency threshold and read weights of ApsaraDB RDS for MySQL instances. Valid values:

  • Standard: ApsaraDB RDS automatically allocates read weights to the instance and its read-only instances based on the specifications of the instances.
  • Custom: You must manually assign read weights to the instance and its read-only instances.
Standard
ReadOnlyInstanceMaxDelayTimestring

The latency threshold that is allowed for read/write splitting. If the latency on a read-only instance exceeds the specified threshold, ApsaraDB RDS no longer forwards read requests to the read-only instance.

30
DbProxyEndpointReadWriteModestring

The read and write attributes of the proxy terminal. Valid values:

  • ReadWrite: The proxy terminal supports read and write requests.
  • ReadOnly: The proxy terminal supports only read requests.
ReadWrite
DbProxyEndpointAliasesstring

The description of the proxy terminal.

proxyterminal-test
DBProxyEndpointIdstring

The ID of the proxy endpoint.

keaxncrjluwu0gue****
DBProxyConnectStringPortstring

The port number that is bound to the proxy endpoint.

3306
DBProxyConnectStringstring

The proxy endpoint queried.

testproxy****.rwlb.rds.aliyuncs.com
DBProxyEngineTypestring

An internal parameter. This operation does not return a value for this parameter.

normal
EndpointConnectItemsobject []

An array that consists of the information about the proxy endpoint.

DbProxyEndpointPortstring

The port number that is associated with the proxy endpoint. Default value: 3306.

3306
DbProxyEndpointConnectStringstring

The proxy endpoint queried.

testproxy****.rwlb.rds.aliyuncs.com
DbProxyEndpointNetTypestring

The network type of the proxy endpoint. Valid values:

  • 0: Internet
  • 1: classic network
  • 2: virtual private cloud (VPC)
2

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400MaxscaleNotSupportCurrent custins can not support Maxscale.-
400InvalidEndPoint.FormatThe specified EndPoint is not valid.-
400InvalidDBInstanceNameSpecified 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.
400Endpoint.NotFoundThe specified EndPoint is not valid.The specified proxy terminal does not exist.
400InvalidParameterSpecified parameter is invalid.-
403IncorrectKindCodeThe current KindCode of the custins does not support the operation.-
403IncorrectDBInstanceTypeThe current database instance type does not support the operation.-
404Endpoint.NotFoundSpecified 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 timeSummary of changesOperation
2022-09-01The error codes of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
2022-06-08The error codes of the API operation change.,The input parameters of the API operation change.,The response structure of the API operation changes.
Change itemChange content
Error CodesThe error codes of the API operation change.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
Input ParametersThe input parameters of the API operation change.
    Added Input Parameters: DBProxyEngineType
Output ParametersThe response structure of the API operation changes.