Queries the topology information about a PolarDB-X instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Name Type Required Example Description
Action String Yes DescribeDBInstanceTopology

The operation that you want to perform. Set the value to DescribeDBInstanceTopology.

RegionId String Yes cn-hangzhou

The ID of the region in which the instance is located.

DBInstanceName String Yes pxc-********

The ID of the instance whose topology information you want to query.

Response parameters

Name Type Example Description
RequestId String C458B1E8-1683-3645-B154-6BA32080EEA

The ID of the request.

Data Object

The returned data.

LogicInstanceTopology Object

The topology information.

DBInstanceName String pxc-sprcym7g7w****

The name of the instance.

DBInstanceCreateTime String 2021-10-21T10:30:45Z 04:00:00

The time when the instance is created.

MaintainStartTime String 04:00:00

The start time of the maintenance window.

MaintainEndTime String 05:00:00

The end time of the maintenance window.

LockReason String OverduePayments

The reason why the instance was locked.

DBInstanceStatus Integer 8

The state of the instance.

LockMode Integer 0

Indicates whether the instance is locked. Valid values:

  • 0: The instance is not locked.
  • 1: The instance is locked.
EngineVersion String 2.0

The version of the engine that is used by the instance. Default value: 2.0.

DBInstanceStorage Integer 1

The number of data nodes of the instance.

DBInstanceConnType String lvs

Indicates that LVS is used for load balancing.

DBInstanceId String 304726047

The ID of the instance.

Engine String polarx

The engine that is used by the instance. Default value: polarx.

DBInstanceDescription String pxc-sprcym7g7wj7k

The description of the instance.

DBInstanceStatusDescription String TDE_MODIFYING

The description of the instance state.

Items Array of Items

The information about the nodes of the instance.

DBInstanceCreateTime String 2021-10-21T10:30:45Z

The time when the instance is created.

DBInstanceName String pxc-i-tk6t4z****

The name of the instance.

CharacterType String Node role

The role of the node. Valid values:

  • polarx_cn: The node is a compute node.
  • polarx_store: The node is a data node.
  • polarx_gms: The node is a GMS node.
MaintainStartTime String N/A

The start time of the maintenance window.

DiskSize Long 3145728

The disk size of the node.

MaintainEndTime String N/A

The end time of the maintenance window.

LockReason String N/A

The reason why the instance is locked.

DBInstanceStatus Integer 8

The state of the instance.

LockMode Integer 0

Indicates whether the node is locked.

  • 0: The node is not locked.
  • 1: The node is locked.
EngineVersion String 5.7

The version of the engine that is used by the node. Default value: 2.0.

DBInstanceConnType Integer N/A

The type of connection to the node.

MaxConnections Integer 4000

The maximum number of connections that can be established to the node.

DBInstanceId String 304726049

The ID of the instance.

Engine String mysql

The engine that is used by the node. Valid values:

  • mysql
  • polarx_cdc
  • polarx_dn
MaxIops Integer 7000

The maximum IOPS that is provided by the node.

DBInstanceDescription String N/A

The description of the instance.

DBInstanceStatusDescription String N/A

The description of the instance state.

ConnectionIp Array of ConnectionIp

The structure that indicates the connection information about the node.

Port String 3306

The port number that is used to connect to the node.

DBInstanceNetType Integer 1

The connection method of nodes in the instance. The value of this parameter is set to 1, which indicates that nodes are connected by using classic networks.

ConnectionString String pxc-xdb-m-pxcdym7g7w********.mysql.singapore.rds.aliyuncs.com

The connection string used to connect to the node.

Region String cn-hangzhou

The region to which the node is located. If the node is an ApsaraDB RDS for MySQL instance, the regions of the sub-nodes are separated by semicolons (;).

Azone String cn-hangzhou-a

The zone to which the node is located. If the node is an Apsara RDS for MySQL instance, the zones of the sub-nodes are separated by semicolons (;).

Role String master

The role of the node. Valid values:

  • master: The node is a primary node.
  • standby: The node is a secondary node.
Activated Boolean true

Indicates whether the node is activated. In the computing layer, only nodes in the primary zone are activated. If a switchover is performed on the instance, the secondary node becomes the primary node. In the storage layer, all nodes are activated.

AzoneRoleList Array of aoneRoleMap

The information about the three sub-nodes of the ApsaraDB RDS for MySQL instance.

Azone String cn-hangzhou-a

The zone of a sub-node of the ApsaraDB RDS for MySQL instance.

Role String leader

The role of a sub-node of the ApsaraDB RDS for MySQL instance. Valid values:

  • leader: The sub-node is the leader node.
  • follower: The sub-node is the follower node.
  • logger: The sub-node is the logger node.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeDBInstanceTopology
&RegionId=cn-hangzhou
&DBInstanceName=pxc-********
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeDBInstanceTopologyResponse>
    <RequestId>C458B1E8-1683-3645-B154-6BA32080EEA</RequestId>
    <Data>
        <LogicInstanceTopology>
            <DBInstanceName>pxc-sprcym7g7w****</DBInstanceName>
            <DBInstanceCreateTime>2021-10-21T10:30:45Z 04:00:00</DBInstanceCreateTime>
            <MaintainStartTime>04:00:00</MaintainStartTime>
            <MaintainEndTime>05:00:00</MaintainEndTime>
            <LockReason>OverduePayments</LockReason>
            <DBInstanceStatus>8</DBInstanceStatus>
            <LockMode>0</LockMode>
            <EngineVersion>2.0</EngineVersion>
            <DBInstanceStorage>1</DBInstanceStorage>
            <DBInstanceConnType>lvs</DBInstanceConnType>
            <DBInstanceId>304726047</DBInstanceId>
            <Engine>polarx</Engine>
            <DBInstanceDescription>pxc-sprcym7g7wj7k</DBInstanceDescription>
            <DBInstanceStatusDescription>TDE_MODIFYING</DBInstanceStatusDescription>
            <Items>
                <DBInstanceCreateTime>2021-10-21T10:30:45Z</DBInstanceCreateTime>
                <DBInstanceName>pxc-i-tk6t4zfn2m</DBInstanceName>
                <CharacterType>Node role</CharacterType>
                <MaintainStartTime>N/A</MaintainStartTime>
                <DiskSize>3145728</DiskSize>
                <MaintainEndTime>N/A</MaintainEndTime>
                <LockReason>N/A</LockReason>
                <DBInstanceStatus>8</DBInstanceStatus>
                <LockMode>0</LockMode>
                <EngineVersion>5.7</EngineVersion>
                <MaxConnections>4000</MaxConnections>
                <DBInstanceId>304726049</DBInstanceId>
                <Engine>mysql</Engine>
                <MaxIops>7000</MaxIops>
                <DBInstanceDescription>N/A</DBInstanceDescription>
                <DBInstanceStatusDescription>N/A</DBInstanceStatusDescription>
                <ConnectionIp>
                    <Port>3306</Port>
                    <DBInstanceNetType>1</DBInstanceNetType>
                    <ConnectionString>pxc-xdb-m-pxcdym7g7wj7kv5dea.mysql.singapore.rds.aliyuncs.com</ConnectionString>
                </ConnectionIp>
                <Region>cn-hangzhou</Region>
                <Azone>cn-hangzhou-a</Azone>
                <Role>master</Role>
                <Activated>true</Activated>
                <AzoneRoleList>
                    <Azone>cn-hangzhou-a</Azone>
                    <Role>leader</Role>
                </AzoneRoleList>
            </Items>
        </LogicInstanceTopology>
    </Data>
</DescribeDBInstanceTopologyResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "C458B1E8-1683-3645-B154-6BA32080EEA",
  "Data" : {
    "LogicInstanceTopology" : {
      "DBInstanceName" : "pxc-sprcym7g7w****",
      "DBInstanceCreateTime" : "2021-10-21T10:30:45Z 04:00:00",
      "MaintainStartTime" : "04:00:00",
      "MaintainEndTime" : "05:00:00",
      "LockReason" : "OverduePayments",
      "DBInstanceStatus" : 8,
      "LockMode" : 0,
      "EngineVersion" : "2.0",
      "DBInstanceStorage" : 1,
      "DBInstanceConnType" : "lvs",
      "DBInstanceId" : "304726047",
      "Engine" : "polarx",
      "DBInstanceDescription" : "pxc-sprcym7g7wj7k",
      "DBInstanceStatusDescription" : "TDE_MODIFYING",
      "Items" : [ {
        "DBInstanceCreateTime" : "2021-10-21T10:30:45Z",
        "DBInstanceName" : "pxc-i-tk6t4zfn2m",
        "CharacterType" : "Node role",
        "MaintainStartTime" : "N/A",
        "DiskSize" : 3145728,
        "MaintainEndTime" : "N/A",
        "LockReason" : "N/A",
        "DBInstanceStatus" : 8,
        "LockMode" : 0,
        "EngineVersion" : "5.7",
        "MaxConnections" : 4000,
        "DBInstanceId" : "304726049",
        "Engine" : "mysql",
        "MaxIops" : 7000,
        "DBInstanceDescription" : "N/A",
        "DBInstanceStatusDescription" : "N/A",
        "ConnectionIp" : [ {
          "Port" : "3306",
          "DBInstanceNetType" : 1,
          "ConnectionString" : "pxc-xdb-m-pxcdym7g7wj7kv5dea.mysql.singapore.rds.aliyuncs.com"
        } ],
        "Region" : "cn-hangzhou",
        "Azone" : "cn-hangzhou-a",
        "Role" : "master",
        "Activated" : true,
        "AzoneRoleList" : [ {
          "Azone" : "cn-hangzhou-a",
          "Role" : "leader"
        } ]
      } ]
    }
  }
}

Error codes

HttpCode Error code Error message Description
404 InvalidDBInstance.NotFound The specified DB instance does not exist. The error message returned because the specified PolarDB-X instance does not exist.

For a list of error codes, visit the API Error Center.