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

Before you call the DescribeDBProxy 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?

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. You can call the DescribeDBInstances operation to query the ID of the instance.

RegionId String No cn-hangzhou

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

Response parameters

Parameter Type Example Description
DBProxyInstanceLatestMinorVersion String 1.13.12

The latest database proxy version that is available for the instance.

RequestId String 909A69EE-71C8-4417-A0B9-FF085407E1E3

The ID of the request.

DBProxyInstanceCurrentMinorVersion String 1.13.11

The database proxy version that is run by the instance.

DBProxyInstanceNum Integer 1

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

DBProxyInstanceType String 2

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

  • 1: shared proxy
  • 2: dedicated proxy
Note ApsaraDB RDS for PostgreSQL instances support only the dedicated proxy feature.
DBProxyInstanceStatus String Running

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

  • Creating: The proxy instance is being created.
  • Running: The proxy instance is running.
  • DBInstanceClassChanging: The specifications of the proxy instance are being changed.
  • Deleting: The proxy instance is being deleted.
DBProxyServiceStatus String Startup

The status of the database proxy feature.

  • Startup: enabled
  • Shutdown: disabled
DBProxyInstanceName String gos787jog2wk0ye1****

The name of the proxy instance that is enabled.

DBProxyInstanceSize String 4/8

The specifications of the proxy instance that is enabled. This parameter is available only for ApsaraDB RDS for PostgreSQL instances.

Format: Number of cores/Memory capacity. For example, a value of 4/8 indicates that the proxy instance has 4 cores and 8 GB of memory.

DBProxyConnectStringItems Array of DBProxyConnectStringItems

An array that consists of the proxy endpoints that are created for the instance.

DBProxyConnectStringItems
DBProxyConnectStringNetWorkType String 2

The network type of the proxy endpoint. Valid values:

  • 0: Internet
  • 1: classic network
  • 2: Virtual Private Cloud (VPC)
DBProxyConnectStringNetType String InnerString

The network type of the proxy endpoint. Valid values:

  • InnerString: internal network
  • OuterString: Internet
DBProxyVpcInstanceId String rm-bp145737x5****131161274792****

The ID of the proxy instance.

DBProxyEndpointName String gos787jog2wk0ye1****

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

DBProxyEndpointId String 20****

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

DBProxyConnectStringPort String 3306

The port number that is associated with the proxy endpoint.

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

The proxy endpoint that is returned.

DbProxyEndpointItems Array of DbProxyEndpointItems

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

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.

Examples

Sample requests

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

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<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

HTTP/1.1 200 OK
Content-Type:application/json

{
  "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
400 InvalidDBInstanceName Specified parameter DBInstanceName is not valid. The error message returned because the value of the DBInstanceName parameter is invalid. Check whether the value is null or an empty string.
403 IncorrectKindCode Current custins kindCode does not support this operation. The error message returned because the configuration of the instance does not support this operation. Check the configuration of the instance.
403 IncorrectDBInstanceType The database instance type does not support the operation. The error message returned because this operation is not supported by the database engine that is run on the instance.

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