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 Information About Database Proxy

Updated on 2024-04-01 GMT+08:00

Function

This API is used to query information about the database proxy of a specified DB instance.

NOTICE:

This API will be unavailable on April 30, 2024.

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

Constraints

  • Only PostgreSQL 11 and PostgreSQL 12 are supported.
  • A database proxy must have been enabled for the DB instance.

URI

  • URI format

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

  • Example

    https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/f569f1358436479dbcba8603c32cc4aein03/proxy

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

    For details about how to obtain the project ID, see Obtaining a Project ID.

    instance_id

    Yes

    Specifies the DB instance ID.

Request

None

Response

  • Normal response
    Table 2 Parameter description

    Name

    Type

    Description

    proxy

    Object

    Indicates the proxy instance information.

    For details, see Table 3.

    master_instance

    Object

    Indicates the primary instance information.

    For details, see Table 4

    readonly_instances

    Array of objects

    Indicates read replica information.

    For details, see Table 5.

    Table 3 proxy element data structure description

    Name

    Type

    Description

    pool_id

    String

    Indicates the proxy instance ID.

    status

    String

    Indicates whether the proxy instance is enabled. The value can be any of the following:

    • open
    • closed
    • frozen
    • opening
    • closing
    • freezing
    • unfreezing

    address

    String

    Indicates the proxy read/write splitting address.

    elb_vip

    String

    Indicates the virtual IP address in ELB mode.

    eip

    String

    Indicates the EIP.

    port

    Integer

    Indicates the proxy port.

    pool_status

    String

    Indicates the proxy instance status. The value can be any of the following:

    • abnormal
    • normal
    • creating
    • deleted

    delay_threshold_in_kilobytes

    Integer

    Indicates the delay threshold (KB).

    cpu

    String

    Indicates the number of CPUs of a proxy instance.

    mem

    String

    Indicates the memory of a proxy instance.

    node_num

    Integer

    Indicates the number of a proxy node.

    nodes

    Array of objects

    Indicates the proxy node information.

    For details, see Table 6.

    mode

    String

    Indicates the proxy in the primary/standby mode. The value can be Ha.

    Table 4 master_instance element data structure description

    Name

    Type

    Description

    id

    String

    Indicates the primary DB instance ID.

    status

    String

    Indicates the primary DB instance status.

    name

    String

    Indicates the primary DB instance name.

    weight

    Integer

    Indicates the read weight of a primary DB instance.

    available_zones

    Array of objects

    Indicates the AZ information.

    For details, see Table 7.

    cpu_num

    Integer

    Indicates the number of CPUs of a primary DB instance.

    Table 5 readonly_instances element data structure description

    Name

    Type

    Description

    id

    String

    Indicates the read replica ID.

    status

    String

    Indicates the read replica status.

    name

    String

    Indicates the read replica name.

    weight

    Integer

    Indicates the read weight of a read replica.

    available_zones

    Array of objects

    Indicates the AZ information.

    For details, see Table 7.

    cpu_num

    Integer

    Indicates the number of CPUs of a read replica.

    Table 6 nodes element data structure description

    Name

    Type

    Description

    id

    String

    Indicates the proxy node ID.

    name

    String

    Indicates the proxy node name.

    role

    String

    Indicates the proxy node role. The value can be either of the following:

    • master
    • slave

    az_code

    String

    Indicates the AZ.

    status

    String

    Indicates the proxy node status. The value can be any of the following:

    • normal
    • abnormal
    • creating
    • deleted

    frozen_flag

    Integer

    Indicates whether the proxy node is frozen.

    • 0: unfrozen.
    • 1: frozen
    • 2: deleted after being frozen.
    Table 7 available_zones element data structure description

    Name

    Type

    Description

    code

    String

    Indicates the AZ code.

    description

    String

    Indicates the AZ description.

  • Example normal response
    {
        "proxy":{
            "pool_id":"c6ee492784b640e694f1da0201cd82c8po03",
            "status":"open",
            "address":"192.168.0.60",
            "elb_vip":null,
            "eip":null,
            "port":3306,
            "pool_status":"normal",
            "delay_threshold_in_kilobytes":30,
            "cpu":"4",
            "mem":"8",
            "node_num":2,
            "nodes":[
                {
                    "id":"4fb00607cffd42dc9583ca09863df93cpn03",
                    "name":"PROXY-c6ee492784b640e694f1da0201cd82c8po03_1",
                    "role":"slave",
                    "az_code":"az1xahz",
                    "status":"normal",
                    "frozen_flag":0
                },
                {
                    "id":"191f3164f918463bb6aedeb6ba742920pn03",
                    "name":"PROXY-c6ee492784b640e694f1da0201cd82c8po03_0",
                    "role":"master",
                    "az_code":"az1xahz",
                    "status":"normal",
                    "frozen_flag":0
                }
            ],
            "mode":"Ha"
        },
        "master_instance":{
            "id":"49fcbb94435c4d89930e91dcf5884909in03",
            "status":"normal",
            "name":"proxy-hwt-0922-3",
            "weight":0,
            "available_zones":[
                {
                    "code":"az1xahz",
                    "description":"AZ 1"
                }
            ],
            "cpu_num":8
        },
        "readonly_instances":[
            {
                "id":"83251d1398594b9fbfc8f1ab8b8228b2in03",
                "status":"normal",
                "name":"replica-a392",
                "weight":100,
                "available_zones":[
                    {
                        "code":"az1xahz",
                    "description":"AZ 1"
                    }
                ],
                "cpu_num":4
            }
        ]
    }
  • 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