All Products
Search
Document Center

ApsaraDB RDS:DescribeDBProxy

Last Updated:May 29, 2023

Queries the settings of the dedicated proxy for an instance.

Operation Description

Before you call the ModifyDBProxyEndpoint 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: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 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

The response parameters.

DBProxyInstanceLatestMinorVersionstring

The latest version that is available for the proxy instance.

1.13.12
RequestIdstring

The ID of the request.

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

The version of the proxy 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.

NoteApsaraDB RDS for PostgreSQL instances support only dedicated proxies.

Valid values:

  • 1

    :

    shared proxy

  • 2

    :

    dedicated proxy

2
DBProxyInstanceStatusstring

The status of the proxy instance.

Valid values:

  • DBInstanceClassChanging

  • Creating

  • Running

  • Deleting

Running
DBProxyServiceStatusstring

The status of the database proxy.

Valid values:

  • Shutdown

  • Startup

Startup
DBProxyInstanceNamestring

The name of the proxy instance.

gos787jog2wk0ye1****
DBProxyInstanceSizestring

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

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.

4/8
DBProxyEngineTypestring

An internal parameter. You can ignore this parameter.

normal
DBProxyConnectStringItemsobject []

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

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:

  • OuterString

    :

    Internet

  • InnerString

    :

    internal network

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
DBProxyVpcIdstring

The VPC that is associated with the proxy endpoint.

vpc-uf6oobt****
DBProxyVswitchIdstring

The vSwitch that is associated with the proxy endpoint.

vsw-uf6l0pic17****
DbProxyEndpointItemsobject []

The proxy terminals of the instance.

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:

  • Custom

    :

    custom proxy terminal

  • RWSplit

    :

    default proxy terminal

RWSplit
DbProxyReadWriteModestring

The read and write attributes of the proxy terminal.

Valid values:

  • ReadOnly

  • ReadWrite

ReadWrite
ResourceGroupIdstring

The ID of the resource group.

rg-acfmy*****
DBProxyAVZonesarray

The list of zones that are available for the database proxy.

string

The zone that is available for the database proxy.

cn-shanghai-e

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",
        "DBProxyVpcId": "vpc-uf6oobt****",
        "DBProxyVswitchId": "vsw-uf6l0pic17****"
      }
    ]
  },
  "DbProxyEndpointItems": {
    "DbProxyEndpointItems": [
      {
        "DbProxyEndpointAliases": "proxy-test",
        "DbProxyEndpointName": "gos787jog2wk0ye1****",
        "DbProxyEndpointType": "RWSplit",
        "DbProxyReadWriteMode": "ReadWrite"
      }
    ]
  },
  "ResourceGroupId": "rg-acfmy*****",
  "DBProxyAVZones": {
    "DBProxyAVZones": [
      "cn-shanghai-e"
    ]
  }
}

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.