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

Querying Proxy Instance Information

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.

  • Database proxy is unavailable for DB instances in a DeC.

URI

  • URI format

    GET https://{endpoint}/mysql/v3/{project_id}/instances/{instance_id}/proxy

  • Example

    GET https://{endpoint}/mysql/v3/97b026aa9cc4417888c14c84a1ad9860/instances/436aaafb689c4250a9a5bb33cb271e8cin07/proxy

  • Parameter description
    Table 1 Parameter description

    Name

    Type

    Mandatory

    Description

    project_id

    String

    Yes

    Project ID of a tenant in a region.

    To obtain this value, see Obtaining a Project ID.

    instance_id

    String

    Yes

    DB instance ID.

Request

None

Response

  • Normal response
    Table 2 Parameter description

    Name

    Type

    Description

    proxy

    Object

    Proxy instance information.

    For details, see Table 3.

    master_node

    Object

    Primary node.

    For details, see Table 4.

    readonly_nodes

    Array of Object

    Read replica information.

    For details, see Table 5.

    Table 3 proxy field data structure description

    Name

    Type

    Description

    pool_id

    String

    Proxy instance ID.

    status

    String

    Whether the proxy instance is enabled. It can be closed, open, frozen, opening, closing, enlarging, freezing, or unfreezing.

    address

    String

    Proxy read/write splitting address.

    port

    Integer

    Proxy port information.

    pool_status

    String

    Proxy instance status. It can be abnormal, normal, creating, 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. It can be Cluster.

    nodes

    Object

    Proxy node information.

    For details, see Table 6.

    flavor_ref

    String

    Proxy specification code.

    Table 4 master_node data structure description

    Name

    Type

    Description

    id

    String

    Primary node ID.

    instance_id

    String

    DB instance ID.

    status

    String

    Primary node status.

    name

    String

    Primary node name.

    weight

    Integer

    Read/write splitting weight of the primary node.

    available_zones

    Array of object

    AZ information.

    For details, see Table 7.

    Table 5 readonly_nodes field data structure description

    Name

    Type

    Description

    id

    String

    Read replica ID.

    instance_id

    String

    DB instance ID.

    status

    String

    Read replica status.

    name

    String

    Read replica name.

    weight

    Integer

    Read weight of read replicas.

    available_zones

    Array of object

    AZ information.

    Table 6 nodes field data structure description

    Name

    Type

    Description

    id

    String

    Proxy node ID.

    status

    String

    Proxy node status. It can be 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 7 available_zones field data structure description

    Name

    Type

    Description

    code

    String

    AZ code.

    description

    String

    AZ description.

  • Example normal response

    {

    "proxy":{

    "pool_id":null,

    "status":"closed",

    "address":null,

    "port":null,

    "pool_status":null,

    "delay_threshold_in_seconds":null,

    "elb_vip":null,

    "eip":null,

    "vcpus":null,

    "ram":null,

    "node_num":null,

    "mode":null,

    "nodes":[

    ],

    "flavor_ref": "gaussdb.proxy.xlarge.arm.2"

    },

    "master_node":{

    "id":"294daeb0ec9e4c4eacaf2c6dbd8246a9no07",

    "instance_id":"71215aadf19c428db088e51b157583f2in07",

    "status":"ACTIVE",

    "name":"BUG-gauss-dw_node01",

    "weight":null,

    "available_zones":[

    {

    "code":"az1xahz",

    "description":"az1xahz"

    }

    ]

    },

    "readonly_nodes":[

    {

    "id":"b36d70cc3c3b4ef680e34c5b25b168dano07",

    "instance_id":"71215aadf19c428db088e51b157583f2in07",

    "status":"ACTIVE",

    "name":"BUG-gauss-dw_node02",

    "weight":null,

    "available_zones":[

    {

    "code":"az1xahz",

    "description":"az1xahz"

    }

    ]

    }

    ]

    }

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.