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

The Dedicated Proxy feature of ApsaraDB for RDS offers functions such as read/write splitting and short-lived connection optimization. For more information, see Dedicated proxy.

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

  • MySQL 8.0 with a minor engine version of 20191204 or later on RDS Enterprise Edition
  • MySQL 8.0 with a minor engine version of 20190915 or later on RDS High-availability Edition
  • MySQL 5.7 with a minor engine version of 20191128 or later on RDS Enterprise Edition
  • MySQL 5.7 with a minor engine version of 20190925 or later on RDS High-availability Edition
  • MySQL 5.6 with a minor engine version of 20200229 or later on RDS High-availability Edition

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-uf6wjk5xxxxxxx

The ID of the instance.

RegionId String No cn-hangzhou

The ID of the region to which the instance belongs. 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 information about the proxy endpoint.

DBProxyConnectStringItems
DBProxyConnectString String ta9umxxxxx.rwlb.singapore.rds.aliyuncs.com

The proxy endpoint, which is also the read/write splitting endpoint.

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: internal network (classic network)
  • 2: internal network (VPC)
DBProxyConnectStringPort String 3306

The port that is associated with the proxy endpoint.

DBProxyEndpointId String 330

The ID of the proxy endpoint.

DBProxyEndpointName String h7mnkxxxxx

The name of the proxy instance.

DBProxyVpcInstanceId String rm-t4n4xxxxxxx

The ID of the proxy instance.

DBProxyInstanceCurrentMinorVersion String 1.9.19

The version of the proxy instance.

DBProxyInstanceLatestMinorVersion String 1.9.23

The latest version that is available to the proxy instance.

DBProxyInstanceName String h7mnkxxxxx

The name of the proxy instance.

DBProxyInstanceNum Integer 2

The number of dedicated proxies that are enabled on the instance.

DBProxyInstanceStatus String Running

The status of the proxy endpoint. Valid values:

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

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

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

The status of the Dedicated Proxy feature on the instance.

RequestId String C6F00DF0-23F4-466F-BE43-DC9283A8D512

The ID of the request.

Examples

Sample requests

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

Sample success responses

XML format

<DescribeDBProxyResponse>
  <DBProxyInstanceName>h7mnkxxxxx</DBProxyInstanceName>
  <DBProxyInstanceCurrentMinorVersion>1.11.11</DBProxyInstanceCurrentMinorVersion>
  <DBProxyServiceStatus>Startup</DBProxyServiceStatus>
  <DBProxyInstanceNum>2</DBProxyInstanceNum>
  <DBProxyInstanceLatestMinorVersion>1.11.12</DBProxyInstanceLatestMinorVersion>
  <RequestId>CE986188-CFF3-4C19-982F-4B3A6F04FA58</RequestId>
  <DBProxyConnectStringItems>
        <DBProxyConnectStringItems>
              <DBProxyConnectString>xxxxx-rw4rm.rwlb.rds.aliyuncs.com</DBProxyConnectString>
              <DBProxyEndpointId>111111</DBProxyEndpointId>
              <DBProxyEndpointName>h7mnkxxxxx</DBProxyEndpointName>
              <DBProxyConnectStringNetWorkType>0</DBProxyConnectStringNetWorkType>
              <DBProxyConnectStringNetType>OuterString</DBProxyConnectStringNetType>
              <DBProxyConnectStringPort>3306</DBProxyConnectStringPort>
        </DBProxyConnectStringItems>
  </DBProxyConnectStringItems>
  <DBProxyInstanceStatus>Running</DBProxyInstanceStatus>
  <DBProxyInstanceType>2</DBProxyInstanceType>
</DescribeDBProxyResponse>

JSON format

{
	"DBProxyInstanceName": "h7mnkxxxxx",
	"DBProxyInstanceCurrentMinorVersion": "1.11.11",
	"DBProxyServiceStatus": "Startup",
	"DBProxyInstanceNum": 2,
	"DBProxyInstanceLatestMinorVersion": "1.11.12",
	"RequestId": "CE986188-CFF3-4C19-982F-4B3A6F04FA58",
	"DBProxyConnectStringItems": {
		"DBProxyConnectStringItems": [
			{
				"DBProxyConnectString": "xxxxx-rw4rm.rwlb.rds.aliyuncs.com",
				"DBProxyEndpointId": 111111,
				"DBProxyEndpointName": "h7mnkxxxxx",
				"DBProxyConnectStringNetWorkType": 0,
				"DBProxyConnectStringNetType": "OuterString",
				"DBProxyConnectStringPort": "3306"
			}
		]
	},
	"DBProxyInstanceStatus": "Running",
	"DBProxyInstanceType": "2"
}

Error codes

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