All Products
Search
Document Center

AnalyticDB for PostgreSQL:DescribeDBInstanceDiagnosisSummary

Last Updated:Jan 22, 2024

Queries the information about nodes in an AnalyticDB for PostgreSQL instance.

Operation description

You can call this operation to query the distribution and states of coordinator and compute nodes in an AnalyticDB for PostgreSQL instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Debug

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
gpdb:DescribeDBInstanceDiagnosisSummaryRead
  • DBInstance
    acs:gpdb:*:{#accountId}:dbinstance/{#DBInstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The instance ID.

Note You can call the DescribeDBInstances operation to query details about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.
gp-bp12ga6v69h86****
PageSizeintegerNo

The number of entries per page. Valid values:

  • 20
  • 50
  • 100

Default value: 20.

20
PageNumberintegerNo

The page number. Pages start from page 1. Default value: 1.

1
StartStatusstringNo

The running state of the node. Valid values:

  • UP: The node is running.
  • DOWN: The node is faulty.

If you do not specify this parameter, the information about nodes in all running states is returned.

UP
SyncModestringNo

The data synchronization state of the node. Valid values:

  • synced: The node data is synchronized.
  • notSyncing: The node data is not synchronized.

If you do not specify this parameter, the information about nodes in all synchronization states is returned.

synced
RolePreferdstringNo

The role state of the node. It specifies whether a primary/secondary switchover occurs. Valid values:

  • normal: The node role is normal. No primary/secondary switchover occurs.
  • reverse: The node role is reversed. A primary/secondary switchover occurs.
normal

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

070534EC-78D5-5519-83CC-E7B1A9213483
TotalCountstring

The total number of entries returned.

6
PageNumberstring

The page number.

1
Itemsobject []

The group ID.

Hostnamestring

The name of the node.

gp-t4np568qe9710****-master-100984919
NodeAddressstring

The IP address of the node.

192.168.XX.XX
NodeTypestring

The type of the node. Valid values:

  • master: primary coordinator node.
  • slave: standby coordinator node.
  • segment: compute node.
master
NodeNamestring

The name of the host where the node resides.

ap-southeast-1.i-t4n4c4ryr0yr441d****
NodePortstring

The port number of the node.

3000
NodeIDstring

The node ID.

1
NodeStatusstring

The running state of the node. Valid values:

  • UP: The node is running.
  • DOWN: The node is faulty.
UP
NodeRolestring

The current role of the node. Valid values:

  • primary: primary node.
  • mirror: secondary node.
primary
NodePreferredRolestring

The initial role of the node. Valid values:

  • primary: primary node.
  • mirror: secondary node.

If the value of this parameter is the same as that of NodeRole, no primary/secondary switchover occurs. If the value of this parameter is different from that of NodeRole, a primary/secondary switchover occurs.

primary
NodeReplicationModestring

The data synchronization state of the node. Valid values:

  • Synced: The node data is synchronized.
  • Not Syncing: The node data is not synchronized.
  • No sync required: Data synchronization is not required. This value may be returned only for the coordinator node.
Synced
NodeCIDstring

The node group ID.

-1
MasterStatusInfoobject

The state information about the coordinator node.

NormalNodeNuminteger

The number of normal nodes.

2
ExceptionNodeNuminteger

The number of abnormal nodes.

0
NotSyncingNodeNuminteger

The number of unsynchronized nodes.

0
SyncedNodeNuminteger

The number of synchronized nodes.

1
PreferredNodeNuminteger

The number of nodes whose roles are normal.

2
NotPreferredNodeNuminteger

The number of nodes whose roles are reversed.

0
SegmentStatusInfoobject

The state information about compute nodes.

NormalNodeNuminteger

The number of normal nodes.

4
ExceptionNodeNuminteger

The number of abnormal nodes.

0
NotSyncingNodeNuminteger

The number of unsynchronized nodes.

4
SyncedNodeNuminteger

The number of synchronized nodes.

0
PreferredNodeNuminteger

The number of nodes whose roles are normal.

4
NotPreferredNodeNuminteger

The number of nodes whose roles are reversed.

0

Examples

Sample success responses

JSONformat

{
  "RequestId": "070534EC-78D5-5519-83CC-E7B1A9213483",
  "TotalCount": "6",
  "PageNumber": "1",
  "Items": [
    {
      "Hostname": "gp-t4np568qe9710****-master-100984919",
      "NodeAddress": "192.168.XX.XX",
      "NodeType": "master",
      "NodeName": "ap-southeast-1.i-t4n4c4ryr0yr441d****",
      "NodePort": "3000",
      "NodeID": "1",
      "NodeStatus": "UP",
      "NodeRole": "primary",
      "NodePreferredRole": "primary",
      "NodeReplicationMode": "Synced",
      "NodeCID": "-1"
    }
  ],
  "MasterStatusInfo": {
    "NormalNodeNum": 2,
    "ExceptionNodeNum": 0,
    "NotSyncingNodeNum": 0,
    "SyncedNodeNum": 1,
    "PreferredNodeNum": 2,
    "NotPreferredNodeNum": 0
  },
  "SegmentStatusInfo": {
    "NormalNodeNum": 4,
    "ExceptionNodeNum": 0,
    "NotSyncingNodeNum": 4,
    "SyncedNodeNum": 0,
    "PreferredNodeNum": 4,
    "NotPreferredNodeNum": 0
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history