Help Center/ GaussDB(for MySQL)/ API Reference/ APIs (Unavailable Soon)/ Database Proxy/ Querying Information About a Proxy Instance
Updated on 2024-09-11 GMT+08:00

Querying Information About a Proxy Instance

Function

This API is used to query information of a proxy instance. Before calling this API:

This API will be unavailable on March 31, 2025. You are advised to switch workloads to the new API (Querying Proxy Instances) before then.

URI

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

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region.

To obtain this value, see Obtaining a Project ID.

instance_id

Yes

String

Instance ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

User token.

X-Language

No

String

Language.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

proxy

MysqlProxy object

Proxy instance information.

master_node

MysqlProxyNode object

Primary node information.

readonly_nodes

Array of MysqlProxyNode objects

Read replica information.

Table 4 MysqlProxy

Parameter

Type

Description

pool_id

String

Proxy instance ID.

status

String

Operating status of the proxy instance.

Values: closed, open, frozen, opening, closing, enlarging, freezing, and unfreezing.

address

String

Proxy read/write splitting address.

port

Integer

Proxy port information.

pool_status

String

Proxy instance status. Value: ACTIVE, BUILD, FAILED, or DELETED.

delay_threshold_in_seconds

Integer

Delay threshold in seconds.

elb_vip

String

Virtual IP address in ELB mode.

eip

String

EIP information.

vcpus

String

Number of vCPUs of the proxy instance.

ram

String

Memory size of the proxy instance.

node_num

Integer

Number of proxy nodes.

mode

String

Primary/standby proxy. The value is Cluster.

nodes

Array of MysqlProxyNodes objects

Proxy node information.

flavor_ref

String

Proxy specifications.

name

String

Proxy instance name.

Table 5 MysqlProxyNodes

Parameter

Type

Description

id

String

Proxy node ID.

status

String

Proxy node status. Value: normal, abnormal, creating, or deleted.

name

String

Proxy node name.

role

String

Role of the proxy node. It can be master or slave.

az_code

String

AZ.

frozen_flag

Integer

Whether the proxy node is frozen. It can be 0 (unfrozen), 1 (frozen), or 2 (deleted after being frozen).

Table 6 MysqlProxyNode

Parameter

Type

Description

id

String

Node ID.

instance_id

String

Instance ID.

status

String

Node status.

name

String

Node name.

weight

Integer

Read weight of the node.

available_zones

Array of MysqlProxyAvailable objects

AZ information.

Table 7 MysqlProxyAvailable

Parameter

Type

Description

code

String

AZ code.

description

String

AZ description.

Status code: 400

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Request

GET https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances/096c0fc43e804757b59946b80dc27f8bin07/proxy

Example Response

Status code: 200

Success.

{
  "proxy" : {
    "pool_id" : "2e7cf21d14794bafab623a334efd9ad8po01",
    "status" : "open",
    "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"
  },
  "master_node" : {
    "id" : "5ee8010ab992460d8d9cffcc5edabb59no07",
    "instance_id" : "7a871d6d494e4327ad2e326afb591108in07",
    "status" : "ACTIVE",
    "name" : "taurus_mysql80_x86-ondemand-2-1U4G_1_202103070251274842281_node01",
    "weight" : 0,
    "available_zones" : {
      "code" : "az1xahz",
        "description": "AZ1"
    }
  },
  "readonly_nodes" : {
    "id" : "d23535333138462880bfa1838fdfced2no07",
    "instance_id" : "7a871d6d494e4327ad2e326afb591108in07",
    "status" : "ACTIVE",
    "name" : "taurus_mysql80_x86-ondemand-2-1U4G_1_202103070251274842281_node02",
    "weight" : 100,
    "available_zones" : {
      "code" : "az1xahz",
        "description": "AZ1"
    }
  }
}

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.