DescribeInstanceTopology

更新时间:
复制 MD 格式

Query the topology information of an OceanBase cluster.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

oceanbase:DescribeInstanceTopology

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The ID of the OceanBase cluster.

ob317v4uif****

Response elements

Element

Type

Description

Example

object

The data returned for the request.

RequestId

string

The request ID.

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

InstanceTopology

object

The topology of the cluster.

Tenants

array<object>

The list of tenants.

array<object>

The details of a tenant.

TenantId

string

The tenant ID.

t33h8y08k****

TenantName

string

The tenant name.

pay_online

TenantCpu

number

The number of CPU cores for the tenant.

2

TenantMemory

number

The memory size of the tenant, in GB.

10

TenantMode

string

The tenant mode.

  • Oracle: Oracle mode.

  • MySQL: MySQL mode.

Oracle

TenantZones

array<object>

The list of zones for the tenant.

array<object>

The details of a tenant zone.

TenantZoneRole

string

The access role of the zone.

  • ReadWrite: The zone is readable and writable.

  • ReadOnly: The zone is read-only.

ReadWrite

IsPrimaryTenantZone

boolean

Indicates whether the zone is the primary zone.

true

TenantZoneId

string

The zone ID.

cn-hangzhou-h

Units

array<object>

The list of resource units.

object

The details of a unit.

UnitId

string

The resource unit ID.

1002

UnitStatus

string

The status of the resource unit.

  • ONLINE: The unit is running.

  • IMMIGRATING: The unit is being migrated in.

  • EMIGRATING: The unit is being migrated out.

  • CANCEL_IMMIGRATING: The immigration is being canceled.

  • CANCEL_EMIGRATING: The emigration is being canceled.

  • DELETING: The unit is being deleted.

ONLINE

NodeId

string

The ID of the OBServer node where the resource unit is located.

i-bp16niirq4zdmgvm****

UnitCpu

number

The number of CPU cores for the unit.

2

UnitMemory

number

The memory size of the unit, in GB.

10

EnableMigrateUnit

boolean

Indicates whether the unit can be migrated.

true

ManualMigrate

boolean

Indicates whether the migration is manual.

true

EnableCancelMigrateUnit

boolean

Indicates whether the migration can be canceled.
This parameter applies only to units that are being manually immigrated or emigrated.

true

UnitDataSize

integer

The amount of data used by the unit.

10

ReplicaType

string

The replica type.
OceanBase cluster monitoring uses this parameter to filter nodes.

  • By default, this parameter is not specified. This setting applies to OceanBase monitoring and access proxy monitoring. For OceanBase monitoring queries, if you do not specify this parameter, data from nodes of all replica types is returned.

  • FULL: This value is valid only for OceanBase monitoring. It specifies that only the monitoring data of full-featured replica nodes is queried.

  • READONLY: This value is valid only for OceanBase monitoring. It specifies that only the monitoring data of read-only replica nodes is queried.

FULL

LogicalZone

string

The replica ID.

cn-hangzhou-h-z0

ReplicaType

string

The replica type of the tenant.

FULL

ReadOnlyReplicaType

string

The read-only replica type.

ROW_STORE

TenantStatus

string

The tenant status.

  • PENDING_CREATE: The tenant is being created.

  • RESTORE: The tenant is being restored.

  • ONLINE: The tenant is running.

  • SPEC_MODIFYING: The specifications are being modified.

  • ALLOCATING_INTERNET_ADDRESS: The public IP address is being allocated.

  • PENDING_OFFLINE_INTERNET_ADDRESS: The public IP address is being disabled.

  • PRIMARY_ZONE_MODIFYING: The primary zone is being modified.

  • PARAMETER_MODIFYING: Parameters are being modified.

  • WHITE_LIST_MODIFYING: The whitelist is being modified.

ONLINE

TenantDeployType

string

The deployment type of the tenant.

  • multiple: multiple data centers.

  • single: a single data center.

  • dual: two data centers.

multiple

TenantUnitNum

integer

The number of units in the tenant.

1

PrimaryZoneDeployType

string

The deployment mode of the primary zone.

Valid values:

  • RANDOM :

    RANDOM

  • STATIC :

    STATIC

RANDOM

TenantDiskSize

number

The data size of the tenant.

2

TenantUnitCpu

number

The number of CPU cores per unit for the tenant.

4

TenantUnitMemory

number

The memory size per unit of the tenant.

16

Zones

array<object>

The zone information of the cluster.

array<object>

The details of a zone.

ZoneId

string

The zone ID.

cn-hangzhou-i

Region

string

The region ID.

cn-hangzhou

ZoneDisk

string

The storage capacity of the zone.

200 GB

Nodes

array<object>

The list of nodes.

array<object>

The details of a node.

NodeId

string

The node ID.

i-bp16niirq4zdmgvm****

NodeCopyId

integer

The ID of the replica to which the node belongs.

1

NodeStatus

string

The running status of the node.

ONLINE

NodeResource

object

The resource information of the node.

Cpu

object

The CPU resources of the node.

UsedCpu

number

The number of CPU cores used by the node.

4

TotalCpu

integer

The total number of CPU cores for the node.

14

Memory

object

The memory resources of the node.

UsedMemory

number

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

10

TotalMemory

integer

The total memory size of the node, in GB.

70

DiskSize

object

The storage resources of the node.

TotalDiskSize

number

The total disk space of the node, in GB.

100

UsedDiskSize

number

The used disk space of the node, in GB.

50

ReplicaType

string

The replica type. Valid values:

  • FULL

  • READONLY

FULL

FullCopyId

integer

The ID of the full-featured replica.

1

ReadOnlyCopyId

integer

The ID of the read-only replica.

1

LogicalZone

string

The replica ID.

cn-hangzhou-h-z0

ReadOnlyReplicaType

string

The read-only replica type.

ROW_STORE

ZoneResource

object

The zone information.

DiskSize

object

The storage resources of the node.

MaxDiskUsedPercent

number

The maximum disk usage, as a percentage.

0.14

MaxDiskUsedObServer

array

The IDs of the OBServer nodes with the highest disk usage.

string

The ID of the OBServer node with the highest disk usage.

i-bp1fhj23fs32dfbg4****

Replicas

array<object>

The replica information.

array<object>

The details of a replica.

LogicalZone

string

The replica ID.

cn-hangzhou-h-z0

NodeNum

integer

The number of replica nodes.

1

ZoneLogicalName

string

The region of the replica.

cn-hangzhou-h

ZoneRegionName

string

The zone of the replica.

cn-hangzhou-h

ReplicaResource

object

The replica resource information.

Memory

object

The memory resources of the replica.

UsedMemory

integer

The amount of memory used by the replica.

16

TotalMemory

integer

The total memory of the replica.

32

DiskSize

object

The disk resources of the replica.

UsedDiskSize

number

The amount of disk space used by the replica.

50

TotalDiskSize

integer

The total disk space of the replica.

100

Cpu

object

The CPU resources of the replica.

TotalCpu

integer

The total number of CPU cores for the replica.

16

UsedCpu

integer

The number of CPU cores used by the replica.

8

ZoneLogicalId

integer

The replica number.

1

ReplicaType

string

The replica type.

FULL

Status

string

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

ACTIVE

ReadOnlyReplicaType

string

The read-only replica type.

ROW_STORE

OnlineNodeNum

integer

The number of online nodes.

Examples

Success response

JSON format

{
  "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",
        "OnlineNodeNum": 0
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.