Updated on 2025-08-20 GMT+08:00

Querying Database Proxies

Function

This API is used to query database proxies of a DB instance.

URI

  • URI format

    GET /v3/{project_id}/instances/{instance_id}/proxy-list

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Definition

    Project ID of a tenant in a region.

    To obtain the value, see Obtaining a Project ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    instance_id

    Yes

    Definition

    Instance ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

Request

  • Request parameters

    None

  • URI example

    GET https://{endpoint}/v3/23a50154cf494ec9ad6883979a12db0a/instances/920ec36cef814a8b830a5bed50d9a088in01/proxy-list

Response

  • Normal response
    Table 2 Parameters

    Parameter

    Type

    Description

    proxy_query_info_list

    Array of objects

    Definition

    List of database proxies under a DB instance.

    For details, see Table 3.

    max_proxy_num

    Integer

    Definition

    Maximum number of database proxies that can be enabled at the same time.

    Range

    N/A

    max_proxy_node_num

    Integer

    Definition

    Maximum number of nodes allowed for one database proxy.

    Range

    N/A

    support_balance_route_mode_for_favored_version

    Boolean

    Definition

    Whether load balancing can be configured when a database proxy is created.

    Range

    N/A

    Table 3 proxy_query_info_list field data structure description

    Parameter

    Type

    Description

    proxy

    Object

    Definition

    Database proxy information.

    For details, see Table 4.

    master_instance

    Object

    Definition

    Primary instance information.

    For details, see Table 7.

    readonly_instances

    Array of objects

    Definition

    Read replica information.

    For details, see Table 7.

    proxy_security_group_check_result

    Boolean

    Definition

    Whether the security group allows the database proxy to access the DB instance.

    Range

    N/A

    Table 4 proxy field data structure description

    Parameter

    Type

    Description

    pool_id

    String

    Definition

    Database proxy ID.

    Range

    N/A

    status

    String

    Definition

    Database proxy status.

    Range

    • ENABLING: The database proxy is being enabled.
    • DISABLING: The database proxy is being disabled.
    • CHANGING_NODE_NUM: The number of nodes is being changed for the database proxy.
    • SCALING: The specifications of the database proxy are being changed.
    • UPGRADING: The kernel version of the database proxy is being upgraded.
    • IPMODIFYING: The read/write splitting address of the database proxy is being changed.
    • RESTARTING: The database proxy is being restarted.
    • TRANSACTION_SPLITTING: Transaction splitting is being enabled or disabled for the database proxy.
    • CONNECTION_POOL_SWITCH_OPERATING: The session connection pool type is being changed for the database proxy.
    • PORT_MODIFYING: The port of the database proxy is being changed.
    • PROXY_SSL_SWITCHING: The SSL status is being changed for the database proxy.
    • ALT_SWITCH_OPERATING: The ALT status is being changed for the database proxy.
    • CHANGING_RESOURCES: Resources are being changed for the database proxy.
    • NORMAL: The database proxy is running properly.
    • ABNORMAL: The database proxy is not running properly.
    • FAILED: The database proxy failed to be created.
    • FROZEN: The database proxy is frozen.

    address

    String

    Definition

    Read/write splitting address.

    Range

    N/A

    port

    Integer

    Definition

    Port number.

    Range

    N/A

    delay_threshold_in_seconds

    Integer

    Definition

    Delay threshold, in seconds.

    Range

    N/A

    cpu

    String

    Definition

    vCPUs of the database proxy.

    Range

    N/A

    mem

    String

    Definition

    Memory size of the database proxy.

    Range

    N/A

    node_num

    Integer

    Definition

    Number of database proxy nodes.

    Range

    N/A

    nodes

    Array of objects

    Definition

    List of database proxy nodes.

    For details, see Table 5.

    mode

    String

    Definition

    Database proxy mode.

    Range

    • Cluster
    • Ha: primary/standby

    flavor_info

    Object

    Definition

    Database proxy specifications.

    For details, see Table 6.

    transaction_split

    String

    Definition

    Status of transaction splitting for the database proxy.

    Range

    • true: enabled
    • false: disabled

    connection_pool_type

    String

    Definition

    Connection pool type.

    Range

    • CLOSED: The connection pool is closed.
    • SESSION: The session-level connection pool is enabled.

    pay_mode

    String

    Definition

    Billing mode of the database proxy.

    Range

    • 0: pay-per-use billing
    • 1: yearly/monthly billing

    name

    String

    Definition

    Name of the database proxy.

    Range

    N/A

    proxy_mode

    String

    Definition

    Read/write mode of the database proxy.

    Range

    • readwrite: readable and writable
    • readonly: read-only

    dns_name

    String

    Definition

    Private domain name for the read/write splitting address of the database proxy.

    Range

    If this parameter is left blank, no private domain name has been requested.

    subnet_id

    String

    Definition

    ID of the subnet to which the database proxy belongs.

    Range

    N/A

    seconds_level_monitor_fun_status

    String

    Definition

    Status of Monitoring by Seconds of the database proxy.

    Range

    • off
    • on

    alt_flag

    Boolean

    Definition

    ALT switch status.

    Range

    N/A

    force_read_only

    Boolean

    Definition

    Whether to forcibly route read requests to read replicas.

    Range

    N/A

    route_mode

    Integer

    Definition

    Routing policy of the database proxy.

    Range

    • 0: weighted
    • 1: load balancing (The primary instance does not process read requests.)
    • 2: load balancing (The primary instance processes read requests.)

    ssl_option

    Boolean

    Definition

    SSL switch status.

    Range

    N/A

    support_balance_route_mode

    Boolean

    Definition

    Whether load balancing can be enabled for the database proxy.

    Range

    N/A

    support_proxy_ssl

    Boolean

    Definition

    Whether SSL can be enabled for the database proxy.

    Range

    N/A

    support_switch_connection_pool_type

    Boolean

    Definition

    Whether the session connection pool type can be changed for the database proxy.

    Range

    N/A

    support_transaction_split

    Boolean

    Definition

    Whether transaction splitting can be enabled for the database proxy.

    Range

    N/A

    Table 5 nodes field data structure description

    Parameter

    Type

    Description

    id

    String

    Definition

    ID of the database proxy node.

    Range

    N/A

    status

    String

    Definition

    Status of the database proxy node.

    Range

    • NORMAL: The node is normal.
    • ABNORMAL: The node is abnormal.
    • CREATING: The node is being created.
    • CREATEFAIL: The node failed to be created.

    role

    String

    Definition

    Role of the database proxy node.

    Range

    • master: primary node
    • slave: standby node

    az_code

    String

    Definition

    AZ where the database proxy node is located.

    Range

    N/A

    frozen_flag

    Integer

    Definition

    Whether the database proxy node is frozen.

    Range

    • 0: unfrozen
    • 1: frozen
    Table 6 flavor_info field data structure description

    Parameter

    Type

    Description

    group_type

    String

    Definition

    CPU architecture.

    Range

    • X86
    • ARM

    code

    String

    Definition

    Specification code.

    Range

    N/A

    Table 7 readonly_instances field data structure description

    Parameter

    Type

    Description

    id

    String

    Definition

    ID of the primary instance or read replica.

    Range

    N/A

    status

    String

    Definition

    Node status.

    Range

    N/A

    name

    String

    Definition

    Instance name.

    Range

    N/A

    weight

    Integer

    Definition

    Read weight of the instance.

    Range

    N/A

    available_zones

    Array of objects

    Definition

    AZ information.

    For details, see Table 8.

    Table 8 available_zones field data structure description

    Parameter

    Type

    Description

    code

    String

    Definition

    AZ code.

    Range

    N/A

    description

    String

    Definition

    AZ description.

    Range

    N/A

  • Example normal response
    { 
      "proxy_query_info_list" : [ { 
        "proxy" : { 
          "pool_id" : "e06ecf4dfea8409690c87a9ee6582b0dpo01", 
          "status" : "NORMAL", 
          "address" : "192.168.0.1", 
          "port" : 3306, 
          "delay_threshold_in_seconds" : 30, 
          "cpu" : "2", 
          "mem" : "4", 
          "node_num" : 2, 
          "nodes" : [ { 
            "id" : "3079919890f24fb8ab284571fc409058pn01", 
            "status" : "NORMAL", 
            "role" : "master", 
            "az_code" : "aaa", 
            "frozen_flag" : 0 
          }, { 
            "id" : "804430ac9068419fa5e49d5ca0684172pn01", 
            "status" : "NORMAL", 
            "role" : "master", 
            "az_code" : "aaa", 
            "frozen_flag" : 0 
          } ], 
          "mode" : "Cluster", 
          "flavor_info" : { 
            "group_type" : "X86", 
            "code" : "rds.proxy.large.2" 
          }, 
          "transaction_split" : "false", 
          "connection_pool_type" : "CLOSED", 
          "pay_mode" : "0", 
          "name" : "test-hll", 
          "proxy_mode" : "readwrite", 
          "route_mode" : 1, 
          "dns_name" : "", 
          "subnet_id" : "2f75f35c-62ca-43b7-9954-8fd1e6be4641", 
          "ssl_option" : false, 
          "force_read_only" : false, 
          "seconds_level_monitor_fun_status" : "off", 
          "alt_flag" : false, 
          "support_transaction_split" : true, 
          "support_switch_connection_pool_type" : true, 
          "support_balance_route_mode" : true, 
          "support_proxy_ssl" : true 
        }, 
        "master_instance" : { 
          "id" : "920ec36cef814a8b830a5bed50d9a088in01", 
          "status" : "normal", 
          "name" : "rds-2c54", 
          "weight" : 0, 
          "available_zones" : [ { 
            "code" : "aaa", 
            "description" : "az3" 
          } ] 
        }, 
        "readonly_instances" : [ { 
          "id" : "f9462b58982d484fb64fd9880504d863in01", 
          "status" : "abnormal", 
          "name" : "replica-f966", 
          "weight" : 0, 
          "available_zones" : [ { 
            "code" : "aaa", 
            "description" : "az3" 
          } ] 
        } ], 
        "proxy_security_group_check_result" : false 
      } ], 
      "max_proxy_num" : 4, 
      "max_proxy_node_num" : 4, 
      "support_balance_route_mode_for_favored_version" : true 
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.