Querying Proxy Instances
Function
This API is used to query proxy instances. Before calling this API:
- Learn how to authorize and authenticate it.
- Obtain the required region and endpoint.
URI
GET /v3/{project_id}/instances/{instance_id}/proxies
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Explanation: Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. Constraints: None Value range: The value can contain 32 characters. Only letters and digits are allowed. Default value: None |
instance_id |
Yes |
String |
Explanation: Instance ID, which uniquely identifies an instance. Constraints: None Value range: The value can contain 36 characters with a suffix of in07. Only letters and digits are allowed. Default value: None |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
No |
Integer |
Explanation: Index offset. The query starts from the next piece of data indexed by this parameter. Constraints: The value must be an integer and cannot be a negative number. Value range: ≥0 Default value: 0 |
limit |
No |
Integer |
Explanation: Number of records to be queried. Constraints: The value must be an integer and cannot be a negative number. Value range: 1–100 Default value: 100 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Explanation: User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the token value. Constraints: None Value range: None Default value: None |
X-Language |
No |
String |
Explanation: Request language type. Constraints: None Value range:
Default value: en-us |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
proxy_list |
Array of MysqlShowProxyResponseV3 objects |
Explanation: Proxy instances. |
Parameter |
Type |
Description |
---|---|---|
proxy |
MysqlProxyV3 object |
Explanation: Proxy instance information. |
master_node |
MysqlProxyNodeV3 object |
Explanation: Primary node information. |
readonly_nodes |
Array of MysqlProxyNodeV3 objects |
Explanation: Read replica information. |
Parameter |
Type |
Description |
---|---|---|
pool_id |
String |
Explanation: Proxy instance ID. Value range: The value can contain 36 characters with a suffix of po01. Only letters and digits are allowed. |
status |
String |
Explanation: Status of a proxy instance. Value range:
|
address |
String |
Explanation: Proxy IP address. Value range: None |
port |
Integer |
Explanation: Port of a proxy instance. Value range: None |
pool_status |
String |
Explanation: Status of a proxy instance. Value range:
|
delay_threshold_in_seconds |
Integer |
Explanation: Delay threshold in seconds. Value range: None |
elb_vip |
String |
Explanation: Virtual IP address in ELB mode. Value range: None |
eip |
String |
Explanation: EIP. Value range: None |
vcpus |
String |
Explanation: vCPUs of a proxy instance. Value range: None |
ram |
String |
Explanation: Memory size of a proxy instance. Value range: None |
node_num |
Integer |
Explanation: Number of proxy instance nodes. Value range: None |
mode |
String |
Explanation: Proxy instance in primary/standby mode. Value range: Cluster |
nodes |
Array of MysqlProxyNodes objects |
Explanation: Database proxy nodes. |
flavor_ref |
String |
Explanation: Proxy instance specifications. Value range: None |
name |
String |
Explanation: Proxy instance name. Value range: None |
transaction_split |
String |
Explanation: Status of transaction splitting for the proxy instance. Value range:
|
connection_pool_type |
String |
Explanation: Connection pool type. Value range:
|
switch_connection_pool_type_enabled |
Boolean |
Explanation: Whether the proxy instance version supports session-level connection pool. Value range:
|
route_mode |
Integer |
Explanation: Routing policy of the proxy instance. Value range:
|
balance_route_mode_enabled |
Boolean |
Explanation: Whether the proxy instance version supports load balancing. Value range:
|
consistence_mode |
String |
Explanation: Consistency level. The parameter is left blank by default. Value range:
|
subnet_id |
String |
Explanation: ID of the subnet that the proxy instance belongs to. Value range: None |
ssl_option |
String |
Explanation: Whether to enable SSL. Value range:
|
new_node_auto_add_status |
String |
Explanation: Whether new nodes are automatically associated with proxy instances. Value range:
|
new_node_weight |
Integer |
Explanation: Read weight of a new node. Value range: 1–1000 |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Explanation: Proxy node ID. |
status |
String |
Explanation: Status of the proxy instance node. Value range:
|
name |
String |
Explanation: Name of the proxy instance node. Value range: None |
role |
String |
Explanation: Role of the proxy instance node. Value range:
|
az_code |
String |
Description AZ. Value range: None |
frozen_flag |
Integer |
Explanation: Whether the proxy instance node is frozen. Value range:
|
Parameter |
Type |
Description |
---|---|---|
id |
String |
Explanation: ID of the proxy instance node. Value range: The value can contain 36 characters with a suffix of no07. Only letters and digits are allowed. |
instance_id |
String |
Explanation: Instance ID, which uniquely identifies an instance. Value range: The value can contain 36 characters with a suffix of in07. Only letters and digits are allowed. |
status |
String |
Explanation: Node status. Value range:
|
name |
String |
Explanation: Node name. Value range: None |
weight |
Integer |
Explanation: Read weight of the node. Value range: 1–1000 |
availability_zone |
Array of MysqlProxyAvailable objects |
Explanation: AZ information. |
Parameter |
Type |
Description |
---|---|---|
code |
String |
Explanation: AZ code. Value range: None |
description |
String |
Explanation: AZ description. Value range: None |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Request
Querying proxy instances
GET https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances/096c0fc43e804757b59946b80dc27f8bin07/proxies?offset=0&limit=10
Example Response
Status code: 200
Success.
{ "proxy_list" : [ { "proxy" : { "pool_id" : "2e7cf21d14794bafab623a334efd9ad8po01", "status" : "ACTIVE", "address" : "192.168.125.69", "port" : 3306, "pool_status" : "ACTIVE", "delay_threshold_in_seconds" : 30, "elb_vip" : "192.168.125.60", "eip" : "192.168.125.50", "vcpus" : 4, "ram" : 8, "node_num" : 2, "mode" : "Cluster", "nodes" : [ { "id" : "db53a238a02240c49365e72e284a4890pn01", "name" : "PROXY-2e7cf21d14794bafab623a334efd9ad8po01_0", "role" : "master", "az_code" : "az1xahz", "status" : "ACTIVE", "frozen_flag" : 0 } ], "name" : "proxy-name", "connection_pool_type" : "SESSION", "switch_connection_pool_type_enabled" : true , "subnet_id" : "6991d82d-9166-4aff-a1fa-d2a8748b7084" }, "master_node" : { "id" : "c01a5645eb2c4fb6a9373542f5366e50no07", "instance_id" : "7a871d6d494e4327ad2e326afb591108in07", "status" : "ACTIVE", "name" : "taurus_mysql80_x86-ondemand-2-1U4G_1_202103070251274842281_node01", "weight" : 0, "availability_zone" : [{ "code" : "az1", "description": "AZ1" }] }, "readonly_nodes" : { "id" : "d23535333138462880bfa1838fdfced2no07", "instance_id" : "7a871d6d494e4327ad2e326afb591108in07", "status" : "ACTIVE", "name" : "taurus_mysql80_x86-ondemand-2-1U4G_1_202103070251274842281_node02", "weight" : 100, "availability_zone" : [{ "code" : "az1", "description": "AZ1" }] } } ] }
Status Code
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