All Products
Search
Document Center

ApsaraDB RDS:DescribeDBProxy

Last Updated:Mar 30, 2023

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

Operation Description

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?

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 keyAssociation operation
rds:DescribeDBProxyREAD
  • 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****
RegionIdstringNo

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
ResourceGroupIdstringNo

The ID of the resource group.

rg-acfmy*****

Response parameters

ParameterTypeDescriptionExample
object
DBProxyInstanceLatestMinorVersionstring

The latest proxy version that is available for the instance.

1.13.12
RequestIdstring

The ID of the request.

909A69EE-71C8-4417-A0B9-FF085407E1E3
DBProxyInstanceCurrentMinorVersionstring

The proxy version that is run by the instance.

1.13.11
DBProxyInstanceNuminteger

The number of proxies that are enabled on the instance.

1
DBProxyInstanceTypestring

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

  • 1: shared proxy
  • 2: dedicated proxy
NoteApsaraDB RDS for PostgreSQL instances support only dedicated proxies.
2
DBProxyInstanceStatusstring

The status of the proxy instance. 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.
Running
DBProxyServiceStatusstring

The status of the database proxy feature. Valid values:

  • Startup: enabled
  • Shutdown: disabled
Startup
DBProxyInstanceNamestring

The name of the proxy instance.

gos787jog2wk0ye1****
DBProxyInstanceSizestring

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

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

4/8
DBProxyEngineTypestring

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

normal
DBProxyConnectStringItemsarray

An array consisting of the information about the proxy endpoint that is created for the instance.

object
DBProxyConnectStringNetWorkTypestring

The network type of the database proxy. Valid values:

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

The network type of the proxy endpoint. Valid values:

  • InnerString: internal network
  • OuterString: Internet
InnerString
DBProxyVpcInstanceIdstring

The ID of the proxy instance.

rm-bp145737x5****131161274792****
DBProxyEndpointNamestring

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

gos787jog2wk0ye1****
DBProxyEndpointIdstring

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

20****
DBProxyConnectStringPortstring

The port number that is associated with the proxy endpoint.

3306
DBProxyConnectStringstring

The endpoint of the proxy terminal.

gos787jog2wk0ye1****-rw4rm.rwlb.rds.aliyuncs.com
DbProxyEndpointItemsarray

An array consisting of the information about the proxy terminal.

object
DbProxyEndpointAliasesstring

The description of the proxy terminal.

proxy-test
DbProxyEndpointNamestring

The ID of the proxy terminal.

gos787jog2wk0ye1****
DbProxyEndpointTypestring

The type of the proxy terminal. Valid values:

  • RWSplit: default proxy terminal
  • Custom: custom proxy terminal
RWSplit
DbProxyReadWriteModestring

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.
ReadWrite
ResourceGroupIdstring

The ID of the resource group.

rg-acfmy*****

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400RWSplitNetTypeNotExistsSpecified rw split net type is not eixsts.-
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.
403IncorrectKindCodeCurrent custins kindCode does not support this operation.The operation failed. The operation is not supported for the database engine that is run on the RDS instance.
403IncorrectDBInstanceTypeThe database instance type does not support the operation.The operation failed. The operation is not supported for the database engine of the RDS instance.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-03-14The error codes 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
Output ParametersThe response structure of the API operation changes.
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
Input ParametersThe input parameters of the API operation change.
    Added Input Parameters: DBProxyEngineType
Output ParametersThe response structure of the API operation changes.