DescribeInstanceTopology

Updated at: 2025-03-19 03:08

You can call this operation to query the topology of an OceanBase cluster.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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
OperationAccess levelResource typeCondition keyAssociated operation
oceanbase:DescribeInstanceTopologyget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the OceanBase cluster.

ob317v4uif****

Response parameters

ParameterTypeDescriptionExample
ParameterTypeDescriptionExample
object

The return result of the request.

RequestIdstring

The ID of the request.

EE205C00-30E4-****-****-87E3A8A2AA0C
InstanceTopologyobject

The topology of the cluster.

Tenantsarray<object>

The information about the tenants.

Tenantsobject

The information about the tenants.

TenantIdstring

The ID of the tenant.

t33h8y08k****
TenantNamestring

The name of the tenant.

pay_online
TenantCpufloat

The number of CPU cores of the tenant.

2
TenantMemoryfloat

The memory size of the tenant, in GB.

10
TenantModestring

The mode of the tenant. Valid values:

  • Oracle
  • MySQL
Oracle
TenantZonesarray<object>

The information about the zones.

TenantZonesobject

The information about the zones.

TenantZoneRolestring

The role to access the zone. Valid values:

  • ReadWrite: a role that has the read and write privileges.
  • ReadOnly: a role that has only the read-only privilege.
ReadWrite
IsPrimaryTenantZoneboolean

Indicates whether the zone is the primary zone.

true
TenantZoneIdstring

The ID of the zone.

cn-hangzhou-h
Unitsarray<object>

The information about the resource units.

Unitsobject

The information about the resource units.

UnitIdstring

The ID of the resource unit.

1002
UnitStatusstring

The status of the resource unit. Valid values:

  • ONLINE: The resource unit is running.
  • IMMIGRATING: The resource unit is being immigrated.
  • EMIGRATING: The resource unit is being emigrated.
  • CANCEL_EMIGRATING: The immigration of the resource unit is being canceled.
  • CANCEL_EMIGRATING: The emigration of the resource unit is being canceled.
  • DELETING: The resource unit is being deleted.
ONLINE
NodeIdstring

The ID of the OBServer node in which the resource unit resides.

i-bp16niirq4zdmgvm****
UnitCpufloat

The number of CPU cores of the resource unit.

2
UnitMemoryfloat

The memory size of the resource unit, in GB.

10
EnableMigrateUnitboolean

Indicates whether the resource unit can be migrated.

true
ManualMigrateboolean

Indicates whether the resource unit is manually migrated.

true
EnableCancelMigrateUnitboolean

Indicates whether the migration can be canceled. This parameter is valid only for resource units that are being manually immigrated or emigrated.

true
UnitDataSizelong

The data size of the resource unit.

10
ReplicaTypestring

The type of the replica. Node filtering conditions are configured based on the replica type when you query the monitoring data of the OceanBase cluster.

  • By default, the replica type is not specified when you query the monitoring data of OceanBase clusters or the access proxy. If you do not specify the replica type when you query the monitoring data of an OceanBase cluster, the monitoring data of all nodes is queried.
  • If you set the replica type to FULL when you query the monitoring data of an OceanBase cluster, the monitoring data of only the full-featured replica nodes is queried.
  • If you set the replica type to READONLY when you query the monitoring data of an OceanBase cluster, the monitoring data of only the read-only replica nodes is queried.
FULL
LogicalZonestring

The ID of the replica.

cn-hangzhou-h-z0
ReplicaTypestring

The replica type of the tenant.

FULL
ReadOnlyReplicaTypestring

The type of the read-only replica.

ROW_STORE
TenantStatusstring

The status of the tenant. Valid values:

  • PENDING_CREATE: The tenant is being created.
  • RESTORE: The tenant is being restored.
  • ONLINE: The tenant is running.
  • SPEC_MODIFYING: The specification of the tenant is being modified.
  • ALLOCATING_INTERNET_ADDRESS: A public IP address is being allocated to the tenant.
  • PENDING_OFFLINE_INTERNET_ADDRESS: The public IP address is being disabled.
  • PRIMARY_ZONE_MODIFYING: The tenant is being switched to a new primary zone.
  • PARAMETER_MODIFYING: Parameters are being modified.
  • WHITE_LIST_MODIFYING: The allowlist is being modified.
ONLINE
TenantDeployTypestring

The deployment type of the tenant. Valid values:

  • multiple: multi-IDC deployment.
  • single: single-IDC deployment.
  • dual: dual-IDC deployment.
multiple
TenantUnitNuminteger

The number of resource units in the tenant.

1
PrimaryZoneDeployTypestring

The deployment mode of the primary zone. Valid values:

  • RANDOM.
  • STATIC.
RANDOM
TenantDiskSizefloat

The disk space of the tenant, in GB.

2
TenantUnitCpufloat

The number of CPU cores of a single node in the tenant.

4
TenantUnitMemoryfloat

The memory size of a single node in the tenant, in GB.

16
Zonesarray<object>

The information about the zones in which the cluster is deployed.

Zonesobject

The information about the zones in which the cluster is deployed.

ZoneIdstring

The ID of the zone.

cn-hangzhou-i
Regionstring

The ID of the region.

cn-hangzhou
ZoneDiskstring

The storage capacity of the zone.

200 GB
Nodesarray<object>

The information about the nodes.

Nodesobject

The information about the nodes.

NodeIdstring

The ID of the node.

i-bp16niirq4zdmgvm****
NodeCopyIdlong

The ID of the replica node.

1
NodeStatusstring

The status of the node.

ONLINE
NodeResourceobject

The information about node resources.

Cpuobject

The information about the CPU resources of the node.

UsedCpufloat

The number of CPU cores used by the node.

4
TotalCpuinteger

The total number of CPU cores of the node.

14
Memoryobject

The information about the memory resources of the node.

UsedMemoryfloat

The size of memory used by the node, in GB.

10
TotalMemorylong

The total memory size of the node, in GB.

70
DiskSizeobject

The information about the storage resources of the node.

TotalDiskSizedouble

The total storage space of the node, in GB.

100
UsedDiskSizedouble

The size of storage space used by the node, in GB.

50
ReplicaTypestring

The type of the replica. Valid values:

  • FULL.
  • READONLY.
FULL
FullCopyIdlong

The ID of the full-featured replica.

1
ReadOnlyCopyIdlong

The ID of the read-only replica.

1
LogicalZonestring

The ID of the replica.

cn-hangzhou-h-z0
ReadOnlyReplicaTypestring

The type of the read-only replica.

ROW_STORE
ZoneResourceobject

The information about zones.

DiskSizeobject

The information about the storage resources of the node.

MaxDiskUsedPercentdouble

The maximum disk usage, in percentage.

0.14
MaxDiskUsedObServerarray

The IDs of OBServer nodes that use the maximum disk space.

MaxDiskUsedObServerstring

The IDs of OBServer nodes that use the maximum disk space.

i-bp1fhj23fs32dfbg4****
Replicasarray<object>

The information about replicas.

Replicasobject

The information about replicas.

LogicalZonestring

The ID of the replica.

cn-hangzhou-h-z0
NodeNuminteger

The number of nodes of the replica.

1
ZoneLogicalNamestring

The region of the replica.

cn-hangzhou-h
ZoneRegionNamestring

The zone of the replica.

cn-hangzhou-h
ReplicaResourceobject

The information about the replica resources.

Memoryobject

The information about the memory resources of the replica.

UsedMemorylong

The size of memory used by the replica, in GB.

16
TotalMemorylong

The total memory size of the replica, in GB.

32
DiskSizeobject

The information about the data disk of the replica.

UsedDiskSizefloat

The disk space used by the replica, in GB.

50
TotalDiskSizelong

The total disk space of the replica, in GB.

100
Cpuobject

The information about the CPU resources of the replica.

TotalCpuinteger

The total number of CPU cores of the replica.

16
UsedCpuinteger

The number of CPU cores used by the replica.

8
ZoneLogicalIdinteger

The serial number of the replica.

1
ReplicaTypestring

The type of the replica.

FULL
Statusstring

The status of the replica. Valid values: ACTIVE, INACTIVE, and UNKNOWN.

ACTIVE
ReadOnlyReplicaTypestring

The type of the read-only replica.

ROW_STORE

Examples

Sample success responses

JSONformat

{
  "RequestId": "EE205C00-30E4-****-****-87E3A8A2AA0C",
  "InstanceTopology": {
    "Tenants": [
      {
        "TenantId": "t33h8y08k****",
        "TenantName": "pay_online",
        "TenantCpu": 2,
        "TenantMemory": 10,
        "TenantMode": "Oracle",
        "TenantZones": [
          {
            "TenantZoneRole": "ReadWrite",
            "IsPrimaryTenantZone": true,
            "TenantZoneId": "cn-hangzhou-h",
            "Units": [
              {
                "UnitId": "1002",
                "UnitStatus": "ONLINE",
                "NodeId": "i-bp16niirq4zdmgvm****",
                "UnitCpu": 2,
                "UnitMemory": 10,
                "EnableMigrateUnit": true,
                "ManualMigrate": true,
                "EnableCancelMigrateUnit": true,
                "UnitDataSize": 10,
                "ReplicaType": "FULL"
              }
            ],
            "LogicalZone": "cn-hangzhou-h-z0",
            "ReplicaType": "FULL",
            "ReadOnlyReplicaType": "ROW_STORE"
          }
        ],
        "TenantStatus": "ONLINE",
        "TenantDeployType": "multiple",
        "TenantUnitNum": 1,
        "PrimaryZoneDeployType": "RANDOM",
        "TenantDiskSize": 2,
        "TenantUnitCpu": 4,
        "TenantUnitMemory": 16
      }
    ],
    "Zones": [
      {
        "ZoneId": "cn-hangzhou-i",
        "Region": "cn-hangzhou",
        "ZoneDisk": "200 GB",
        "Nodes": [
          {
            "NodeId": "i-bp16niirq4zdmgvm****",
            "NodeCopyId": 1,
            "NodeStatus": "ONLINE",
            "NodeResource": {
              "Cpu": {
                "UsedCpu": 4,
                "TotalCpu": 14
              },
              "Memory": {
                "UsedMemory": 10,
                "TotalMemory": 70
              },
              "DiskSize": {
                "TotalDiskSize": 100,
                "UsedDiskSize": 50
              }
            },
            "ReplicaType": "FULL",
            "FullCopyId": 1,
            "ReadOnlyCopyId": 1,
            "LogicalZone": "cn-hangzhou-h-z0",
            "ReadOnlyReplicaType": "ROW_STORE"
          }
        ],
        "ZoneResource": {
          "DiskSize": {
            "MaxDiskUsedPercent": 0.14,
            "MaxDiskUsedObServer": [
              "i-bp1fhj23fs32dfbg4****"
            ]
          }
        }
      }
    ],
    "Replicas": [
      {
        "LogicalZone": "cn-hangzhou-h-z0",
        "NodeNum": 1,
        "ZoneLogicalName": "cn-hangzhou-h",
        "ZoneRegionName": "cn-hangzhou-h",
        "ReplicaResource": {
          "Memory": {
            "UsedMemory": 16,
            "TotalMemory": 32
          },
          "DiskSize": {
            "UsedDiskSize": 50,
            "TotalDiskSize": 100
          },
          "Cpu": {
            "TotalCpu": 16,
            "UsedCpu": 8
          }
        },
        "ZoneLogicalId": 1,
        "ReplicaType": "FULL",
        "Status": "ACTIVE",
        "ReadOnlyReplicaType": "ROW_STORE"
      }
    ]
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
Change timeSummary of changesOperation
2024-10-29The response structure of the API has changedView Change Details
2024-07-04The response structure of the API has changedView Change Details
2024-06-06The response structure of the API has changedView Change Details
2024-04-15The response structure of the API has changedView Change Details
2023-12-26The response structure of the API has changedView Change Details
2022-09-28The response structure of the API has changedView Change Details
2021-08-19Add OperationView Change Details
  • On this page (0)
  • Debugging
  • Authorization information
  • Request parameters
  • Response parameters
  • Examples
  • Error codes
  • Change history
Feedback