All Products
Search
Document Center

PolarDB:DescribeDBInstanceTopology

最終更新日:Nov 09, 2023

Queries the topology information of 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 for different SDKs.

Request parameters

Parameter

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 region ID of the instance.

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

The instance ID.

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

The beginning of the time range to query historical instances in the topology. Specify the time in the ISO 8601 standard in the yyyy-MM-dd HH:mm:ss format.

EndTime String No 2021-10-22T10:30:45Z 04:00:00

The end of the time range to query historical instances in the topology. Specify the time in the ISO 8601 standard in the yyyy-MM-dd HH:mm:ss format.

Response parameters

Parameter

Type

Example

Description

RequestId String C458B1E8-1683-3645-B154-6BA32080EEA

The request ID.

Data Object

The data structure.

LogicInstanceTopology Object

The information about the topology.

DBInstanceName String pxc-sprcym7g7w****

The name of the instance.

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

The time when the instance was created. The time follows the ISO 8601 standard in the yyyy-MM-dd HH:mm:ss format.

MaintainStartTime String 04:00:00

The start time of the maintenance window. The time follows the ISO 8601 standard in the HH:mm:ss format.

MaintainEndTime String 05:00:00

The end time of the maintenance window. The time follows the ISO 8601 standard in the HH:mm:ss format.

LockReason String OverduePayments

The reason for locking the instance.

DBInstanceStatus Integer 8

The status 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 database engine version of the instance. Default value: 2.0.

DBInstanceStorage Integer 1

The number of data nodes in the instance.

DBInstanceConnType String lvs

The load balancing mechanism used for the instance.

DBInstanceId String 304726047

The instance ID.

Engine String polarx

The type of the database engine. Default value: polarx.

DBInstanceDescription String pxc-sprcym7******

The description of the instance.

DBInstanceStatusDescription String TDE_MODIFYING

The status of the instance.

Items Array of Items

The details of the nodes in the instance.

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

The time when the instance was created.

DBInstanceName String pxc-i-tk6t4z****

The name of the instance.

CharacterType String Node role

The character type 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.

MaintainEndTime String N/A

The end time of the maintenance window.

LockReason String N/A

The reason for locking the instance.

DBInstanceStatus Integer 8

The status 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 5.7

The database engine version of the instance. Default value: 2.0.

DBInstanceConnType Integer N/A

The connection type.

MaxConnections Integer 4000

The maximum number of connections.

DBInstanceId String 304726049

The instance ID.

Engine String mysql

The engine that the instance runs. Valid values:

  • mysql
  • polarx_cdc
  • polarx_dn
MaxIops Integer 7000

The maximum IOPS.

DBInstanceDescription String N/A

The description of the instance.

DBInstanceStatusDescription String N/A

The status of the instance.

ConnectionIp Array of ConnectionIp

The data structure.

Port String 3306

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

DBInstanceNetType Integer 1

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

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

The connection string used to connect to the instance.

Region String cn-hangzhou

The region in 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 in 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 CDC instance.
Status String 0

The status of the node. Valid values:

  • 0: The node is running.
  • 1: The node is being created.
  • 2: An exception occurs in the node.
  • 3: The node has expired.
  • 4: The node is being released.
  • 5: The node is released.
  • 6: The node is locked.
NodeClass String polarx.x4.large.2e

The instance type of the node. Valid values:

  • polarx.x4.medium.2e: 2 CPU cores and 8 GB of memory
  • polarx.x4.large.2e: 4 CPU cores and 16 GB of memory
  • polarx.x8.large.2e: 4 CPU cores and 32 GB of memory
  • polarx.x4.xlarge.2e: 8 CPU cores and 32 GB of memory
  • polarx.x8.xlarge.2e: 8 CPU cores and 64 GB of memory
  • polarx.x4.2xlarge.2e: 16 CPU cores and 64 GB of memory
  • polarx.x8.2xlarge.2e: 16 CPU cores and 128 GB of memory
  • polarx.x4.4xlarge.2e: 32 CPU cores and 128 GB of memory
  • polarx.x8.4xlarge.2e: 32 CPU cores and 256 GB of memory
  • polarx.st.8xlarge.2e: 60 CPU cores and 470 GB of memory
  • polarx.st.12xlarge.2e: 90 CPU cores and 720 GB of memory
Version String polarx-cdc-kernel-2.0.0-3985896

The version of the CDC instance.

PhyInstanceName String pxc-unrbk8oyz**********

The physical instance name.

HistoryItems Array of historyItems

The details of historical nodes.

CharacterType String Node role

The character type 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.
Role String master

The role of the node. Valid values:

  • master: The node is a primary node.
  • standby: The node is a secondary node.
DBInstanceName String pxc-sprcym7g7w****

The name of the instance.

DBInstanceId String 304726049

The instance ID.

Region String cn-hangzhou

The region in 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 in 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 (;).

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.

PhyInstanceName String pxc-unrbk8oyz**********

The physical instance name.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeDBInstanceTopology
&RegionId=cn-hangzhou
&DBInstanceName=pxc-********
&StartTime=2021-10-21T10:30:45Z 04:00:00
&EndTime=2021-10-22T10:30:45Z 04:00:00
&<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-sprcym7******</DBInstanceDescription>
            <DBInstanceStatusDescription>TDE_MODIFYING</DBInstanceStatusDescription>
            <Items>
                <DBInstanceCreateTime>2021-10-21T10:30:45Z</DBInstanceCreateTime>
                <DBInstanceName>pxc-i-tk6t4z****</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-pxcdym7g7w********.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>
                <Status>0</Status>
                <NodeClass>polarx.x4.large.2e</NodeClass>
                <Version>polarx-cdc-kernel-2.0.0-3985896</Version>
                <PhyInstanceName>pxc-unrbk8oyz**********</PhyInstanceName>
            </Items>
            <HistoryItems>
                <CharacterType>Node role</CharacterType>
                <Role>master</Role>
                <DBInstanceName>pxc-sprcym7g7w****</DBInstanceName>
                <DBInstanceId>304726049</DBInstanceId>
                <Region>cn-hangzhou</Region>
                <Azone>cn-hangzhou-a</Azone>
                <Activated>true</Activated>
                <PhyInstanceName>pxc-unrbk8oyz**********</PhyInstanceName>
            </HistoryItems>
        </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-sprcym7******",
      "DBInstanceStatusDescription" : "TDE_MODIFYING",
      "Items" : [ {
        "DBInstanceCreateTime" : "2021-10-21T10:30:45Z",
        "DBInstanceName" : "pxc-i-tk6t4z****",
        "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-pxcdym7g7w********.mysql.singapore.rds.aliyuncs.com"
        } ],
        "Region" : "cn-hangzhou",
        "Azone" : "cn-hangzhou-a",
        "Role" : "master",
        "Activated" : true,
        "AzoneRoleList" : [ {
          "Azone" : "cn-hangzhou-a",
          "Role" : "leader"
        } ],
        "Status" : "0",
        "NodeClass" : "polarx.x4.large.2e",
        "Version" : "polarx-cdc-kernel-2.0.0-3985896",
        "PhyInstanceName" : "pxc-unrbk8oyz**********"
      } ],
      "HistoryItems" : [ {
        "CharacterType" : "Node role",
        "Role" : "master",
        "DBInstanceName" : "pxc-sprcym7g7w****",
        "DBInstanceId" : "304726049",
        "Region" : "cn-hangzhou",
        "Azone" : "cn-hangzhou-a",
        "Activated" : true,
        "PhyInstanceName" : "pxc-unrbk8oyz**********"
      } ]
    }
  }
}

Error codes

HttpCode

Error code

Error message

Description

404 InvalidDBInstance.NotFound The specified DB instance does not exist. The specified PolarDB-X instance does not exist.

For a list of error codes, see Service error codes.