Querying Information About Database Proxy
Function
This API is used to query information about the database proxy of a specified DB instance.
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
- 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.
- 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
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot