Querying Information About Database Proxy
Function
This API is used to query information about database proxy of a specified DB instance.
- Before calling an API, you need to understand the API in Authentication.
- Before calling this API, obtain the required region and endpoint.
Constraints
- Only PostgreSQL 11 and PostgreSQL 12 are supported.
- The database proxy of DB instances has been enabled.
URI
- URI format
GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/proxy
- Example
https://rds.cn-north-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/cee5265e1e5845649e354841234567dfin01/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
Objects
Indicates the proxy instance information.
For details, see Table 3.
master_instance
Objects
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 status. The value can be 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 the following:
- abnormal
- normal
- creating
- deleted
delay_threshold_in_kilobytes
String
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
Object
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 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.
- 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
For details, see Status Codes.
Error Code
For details, see Error Codes.
Last Article: Disabling Database Proxy
Next Article: Modifying Read Weight
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.