You can call the DescribeDBProxy operation to query details about the dedicated proxy of an ApsaraDB RDS instance.

The dedicated proxy of an ApsaraDB RDS instance provides advanced features, such as read/write splitting and short-lived connection optimization. For more information, see What are dedicated proxies.

Before you call this operation, make sure that the instance runs one of the following database engine versions and RDS editions:

  • MySQL 8.0 on RDS Enterprise Edition (The minor engine version is 20191204 or later.)
  • MySQL 8.0 on RDS High-availability Edition (The minor engine version is 20190915 or later.)
  • MySQL 5.7 on RDS Enterprise Edition (The minor engine version is 20191128 or later.)
  • MySQL 5.7 on RDS High-availability Edition (The minor engine version is 20190925 or later.)
  • MySQL 5.6 on RDS High-availability Edition (The minor engine version is 20200229 or later.)

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeDBProxy

The operation that you want to perform. Set the value to DescribeDBProxy.

DBInstanceId String Yes rm-bp1ja4f56s7us****

The ID of the instance.

RegionId String No cn-hangzhou

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

Response parameters

Parameter Type Example Description
DBProxyConnectStringItems Array of DBProxyConnectStringItems

An array that consists of the information about the configured proxy endpoints.

DBProxyConnectStringItems
DBProxyConnectString String gos787jog2wk0ye1****-rw4rm.rwlb.rds.aliyuncs.com

The proxy endpoint that is used to connect to the dedicated proxy of your RDS instance.

DBProxyConnectStringNetType String InnerString

The network type of the proxy endpoint. Valid values:

  • InnerString: internal network
  • OuterString: Internet
DBProxyConnectStringNetWorkType String 1

The network type of the dedicated proxy. Valid values:

  • 0: Internet
  • 1: classic network
  • 2: VPC
DBProxyConnectStringPort String 3306

The port number that is bound to the proxy endpoint.

DBProxyEndpointId String 20****

The ID of the proxy terminal to which the proxy endpoint belongs.

DBProxyEndpointName String gos787jog2wk0ye1****

The name of the proxy terminal to which the proxy endpoint belongs.

DBProxyVpcInstanceId String rm-bp145737x5****131161274792****

The ID of the proxy instance.

DBProxyInstanceCurrentMinorVersion String 1.13.11

The dedicated proxy version that is run on the instance.

DBProxyInstanceLatestMinorVersion String 1.13.12

The latest dedicated proxy version that is available to the instance.

DBProxyInstanceName String gos787jog2wk0ye1****

The name of the proxy instance.

DBProxyInstanceNum Integer 1

The number of proxy instances that are enabled on the instance.

DBProxyInstanceStatus String Running

The status of the proxy instance. Valid values:

  • CREATING: The proxy instance is being created.
  • ACTIVATION: The proxy instance is running.
  • DELETING: The proxy instance is being deleted.
  • RESTARTING: The proxy instance is restarting.
  • CLASS_CHANGING: The specifications of the proxy instance are being changed.
  • TRANSING: The proxy instance is being migrated.
  • MINOR_VERSION_UPGRADING: The minor version of the proxy instance is being updated.
DBProxyInstanceType String 2

The type of proxy that is enabled on the instance. Valid values:

  • 1: shared proxy
  • 2: dedicated proxy
DBProxyServiceStatus String Startup

The status of the dedicated proxy.

  • Startup: enabled
  • Shutdown: disabled
DbProxyEndpointItems Array of DbProxyEndpointItems

An array that consists of the information about the configured proxy terminals.

DbProxyEndpointItems
DbProxyEndpointAliases String proxy-test

The description of the proxy terminal.

DbProxyEndpointName String gos787jog2wk0ye1****

The ID of the proxy terminal.

DbProxyEndpointType String RWSplit

The type of the proxy terminal. Valid values:

  • RWSplit: default proxy terminal
  • Custom: custom proxy terminal
DbProxyReadWriteMode String ReadWrite

The read and write attributes of the proxy terminal.

  • ReadWrite: The proxy terminal supports read and write requests.
  • ReadOnly: The proxy terminal supports only read requests.
RequestId String 909A69EE-71C8-4417-A0B9-FF085407E1E3

The ID of the request.

Examples

Sample requests

http(s)://rds.aliyuncs.com/?Action=DescribeDBProxy
&DBInstanceId=rm-bp1ja4f56s7us****
&<Common request parameters>

Sample success responses

XML format

<DescribeDBProxyResponse>
      <DBProxyInstanceName>gos787jog2wk0ye1****</DBProxyInstanceName>
      <DBProxyInstanceCurrentMinorVersion>1.13.11</DBProxyInstanceCurrentMinorVersion>
      <DBProxyServiceStatus>Startup</DBProxyServiceStatus>
      <DBProxyInstanceNum>1</DBProxyInstanceNum>
      <DBProxyInstanceLatestMinorVersion>1.13.12</DBProxyInstanceLatestMinorVersion>
      <RequestId>909A69EE-71C8-4417-A0B9-FF085407E1E3</RequestId>
      <DbProxyEndpointItems>
            <DbProxyEndpointItems>
                  <DbProxyEndpointName>gos787jog2wk0ye1****</DbProxyEndpointName>
                  <DbProxyEndpointAliases>proxy-test</DbProxyEndpointAliases>
                  <DbProxyEndpointType>RWSplit</DbProxyEndpointType>
                  <DbProxyReadWriteMode>ReadWrite</DbProxyReadWriteMode>
            </DbProxyEndpointItems>
      </DbProxyEndpointItems>
      <DBProxyConnectStringItems>
            <DBProxyConnectStringItems>
                  <DBProxyConnectString>gos787jog2wk0ye1****-rw4rm.rwlb.rds.aliyuncs.com</DBProxyConnectString>
                  <DBProxyEndpointId>209090</DBProxyEndpointId>
                  <DBProxyEndpointName>gos787jog2wk0ye1****</DBProxyEndpointName>
                  <DBProxyConnectStringNetWorkType>2</DBProxyConnectStringNetWorkType>
                  <DBProxyConnectStringNetType>InnerString</DBProxyConnectStringNetType>
                  <DBProxyConnectStringPort>3306</DBProxyConnectStringPort>
                  <DBProxyVpcInstanceId>rm-bp145737x5****131161274792****</DBProxyVpcInstanceId>
            </DBProxyConnectStringItems>
      </DBProxyConnectStringItems>
      <DBProxyInstanceStatus>Running</DBProxyInstanceStatus>
      <DBProxyInstanceType>2</DBProxyInstanceType>
</DescribeDBProxyResponse>

JSON format

{
    "DBProxyInstanceName": "gos787jog2wk0ye1****",
    "DBProxyInstanceCurrentMinorVersion": "1.13.11",
    "DBProxyServiceStatus": "Startup",
    "DBProxyInstanceNum": 1,
    "DBProxyInstanceLatestMinorVersion": "1.13.12",
    "RequestId": "909A69EE-71C8-4417-A0B9-FF085407E1E3",
    "DbProxyEndpointItems": {
        "DbProxyEndpointItems": [
            {
                "DbProxyEndpointName": "gos787jog2wk0ye1****",
                "DbProxyEndpointAliases": "proxy-test",
                "DbProxyEndpointType": "RWSplit",
                "DbProxyReadWriteMode": "ReadWrite"
            }
        ]
    },
    "DBProxyConnectStringItems": {
        "DBProxyConnectStringItems": [
            {
                "DBProxyConnectString": "gos787jog2wk0ye1****-rw4rm.rwlb.rds.aliyuncs.com",
                "DBProxyEndpointId": 209090,
                "DBProxyEndpointName": "gos787jog2wk0ye1****",
                "DBProxyConnectStringNetWorkType": 2,
                "DBProxyConnectStringNetType": "InnerString",
                "DBProxyConnectStringPort": "3306",
                "DBProxyVpcInstanceId": "rm-bp145737x5****131161274792****"
            }
        ]
    },
    "DBProxyInstanceStatus": "Running",
    "DBProxyInstanceType": "2"
}

Error codes

HTTP status code Error code Error message Description
403 IncorrectDBInstanceType The database instance type does not support the operation. The error message returned because this operation is not supported for the database engine that is run on the instance.

For a list of error codes, visit the API Error Center.