Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Querying Database Proxies

Updated on 2024-08-28 GMT+08:00

Function

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

  • Before calling an API, you need to understand the API in Authentication.

URI

  • URI format

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

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Project ID of a tenant in a region.

    To obtain it, refer to Obtaining a Project ID.

    instance_id

    Yes

    Instance ID.

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

    List of database proxies under a DB instance.

    For details, see Table 3.

    max_proxy_num

    Integer

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

    max_proxy_node_num

    Integer

    Maximum number of nodes allowed for one database proxy.

    support_balance_route_mode_for_favored_version

    Boolean

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

    Table 3 proxy_query_info_list field data structure description

    Parameter

    Type

    Description

    proxy

    Object

    Database proxy information.

    For details, see Table 4.

    master_instance

    Object

    Primary instance information.

    For details, see Table 7.

    readonly_instances

    Array of objects

    Read replica information.

    For details, see Table 7.

    proxy_security_group_check_result

    Boolean

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

    Table 4 proxy field data structure description

    Parameter

    Type

    Description

    pool_id

    String

    Database proxy ID.

    status

    String

    Database proxy status. Valid values:

    • 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

    Read/write splitting address.

    port

    Integer

    Port number.

    delay_threshold_in_seconds

    Integer

    Delay threshold, in seconds.

    cpu

    String

    vCPUs of the database proxy.

    mem

    String

    Memory size of the database proxy.

    node_num

    Integer

    Number of database proxy nodes.

    nodes

    Array of objects

    List of database proxy nodes.

    For details, see Table 5.

    mode

    String

    Database proxy mode. Valid values:

    • Cluster
    • Ha: primary/standby

    flavor_info

    Object

    Database proxy specifications.

    For details, see Table 6.

    transaction_split

    String

    Status of transaction splitting for the database proxy.

    • true: enabled
    • false: disabled

    connection_pool_type

    String

    Connection pool type.

    Valid values:

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

    pay_mode

    String

    Billing mode of the database proxy.

    Valid values:

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

    name

    String

    Name of the database proxy.

    proxy_mode

    String

    Read/write mode of the database proxy. Valid values:

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

    dns_name

    String

    Private domain name for the read/write splitting address of the database proxy. If this parameter is left blank, no private domain name has been requested.

    subnet_id

    String

    ID of the subnet to which the database proxy belongs.

    seconds_level_monitor_fun_status

    String

    Status of Monitoring by Seconds of the database proxy.

    Enumerated values:

    • off
    • on

    alt_flag

    Boolean

    ALT switch status.

    force_read_only

    Boolean

    Whether to forcibly route read requests to read replicas.

    route_mode

    Integer

    Routing policy of the database proxy. Valid values:

    • 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

    SSL switch status.

    support_balance_route_mode

    Boolean

    Whether load balancing can be enabled for the database proxy.

    support_proxy_ssl

    Boolean

    Whether SSL can be enabled for the database proxy.

    support_switch_connection_pool_type

    Boolean

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

    support_transaction_split

    Boolean

    Whether transaction splitting can be enabled for the database proxy.

    Table 5 nodes field data structure description

    Parameter

    Type

    Description

    id

    String

    ID of the database proxy node.

    status

    String

    Status of the database proxy node.

    Valid values:

    • 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

    Role of the database proxy node.

    • master: primary node
    • slave: standby node

    az_code

    String

    AZ where the database proxy node is located.

    frozen_flag

    Integer

    Whether the database proxy node is frozen.

    Valid values:

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

    Parameter

    Type

    Description

    group_type

    String

    CPU architecture.

    Enumerated values:

    • X86
    • ARM

    code

    String

    Specification code.

    Table 7 readonly_instances field data structure description

    Parameter

    Type

    Description

    id

    String

    ID of the primary instance or read replica.

    status

    String

    Node status.

    name

    String

    Instance name.

    weight

    Integer

    Read weight of the instance.

    available_zones

    Array of objects

    AZ information.

    For details, see Table 8.

    Table 8 available_zones field data structure description

    Parameter

    Type

    Description

    code

    String

    AZ code.

    description

    String

    AZ description.

  • 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.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback