DescribeTenants

Updated at: 2025-03-19 03:12

You can call this operation to query the tenants in 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:DescribeTenantsget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the OceanBase cluster.

ob317v4uif****
TenantNamestringNo

The name of the tenant.
It must start with a letter or an underscore (), and contain 2 to 20 characters, which can be uppercase letters, lowercase letters, digits, and underscores (). It cannot be set to sys.

pay_online
PageSizeintegerNo

The number of rows to return on each page.

  • Maximum value: 100.
  • Default value: 10
10
PageNumberintegerNo

The number of the page to return.
Start value: 1

  • Default value: 1
1
TenantIdstringNo

The ID of the tenant.

ob2mr3oae0****
SearchKeystringNo

The search keyword.

pay

Response parameters

ParameterTypeDescriptionExample
ParameterTypeDescriptionExample
object

The return result of the request.

TotalCountinteger

The total number of tenants in the specified OceanBase cluster.

1
RequestIdstring

The request ID.

EE205C00-30E4-XXXX-XXXX-87E3A8A2AA0C
Tenantsarray<object>

The information of tenants.

Dataobject

The information of tenants.

VpcIdstring

The ID of the VPC.
If no suitable VPC is available, create a VPC as prompted. For more information, see "What is a VPC".

vpc-bp1d2q3mhg9i23ofi****
Statusstring

The status of the tenant.

  • PENDING_CREATE: The tenant is being created.
  • RESTORE: The tenant is being recovered.
  • ONLINE: The tenant is running.
  • SPEC_MODIFYING: The specification of the tenant is being modified. ALLOCATING_INTERNET_ADDRESS: An Internet address is being allocated. PENDING_OFFLINE_INTERNET_ADDRESS: The Internet address is being disabled.
  • PRIMARY_ZONE_MODIFYING: The tenant is switching to a new primary zone.
  • PARAMETER_MODIFYING: Parameters are being modified.
  • WHITE_LIST_MODIFYING: The whitelist is being modified.
ONLINE
PrimaryZonestring

The primary zone of the tenant.

cn-hangzhou-i
DeployTypestring

The deployment type of the tenant.

  • multiple: multi-IDC deployment
  • single: single-IDC deployment
  • dual: dual-IDC deployment
multiple
DeployModestring

The data replica distribution mode of the tenant.

  • For the high availability version, N-N-N indicates the three-zone mode, and N-N indicates the dual-zone or single-zone mode.
  • For the basic version, N indicates the single-zone mode.
Note

N represents the number of nodes in a single zone.
1-1-1
CreateTimestring

The time when the tenant was created.

2021-09-17 15:52:17.0
TenantNamestring

The name of the tenant.

pay_online
Meminteger

The total memory size of the tenant, in GB.

20
Cpuinteger

The total number of CPU cores of the tenant.

10
Descriptionstring

The description of the tenant.

PayCore business database
TenantModestring

The tenant mode.
Valid values:
Oracle MySQL

Oracle
TenantIdstring

The ID of the tenant.

t33h8y08k****
UnitCpuinteger

The number of CPU cores in each resource unit of the tenant.

5
UnitMeminteger

The memory size of each resource unit of the tenant, in GB.

10
UnitNuminteger

The number of resource units in the tenant.

2
UsedDiskSizedouble

The number of used disks of the tenant.

10
Charsetstring

The character set.

utf8mb4
Collationstring

The collation.

utf8mb4_general_ci
EnableReadOnlyReplicaboolean

Indicates whether read-only replicas are supported.

true
ParameterTemplatestring

The parameter template.

express_oltp

Examples

Sample success responses

JSONformat

{
  "TotalCount": 1,
  "RequestId": "EE205C00-30E4-XXXX-XXXX-87E3A8A2AA0C",
  "Tenants": [
    {
      "VpcId": "vpc-bp1d2q3mhg9i23ofi****",
      "Status": "ONLINE",
      "PrimaryZone": "cn-hangzhou-i",
      "DeployType": "multiple",
      "DeployMode": "1-1-1",
      "CreateTime": "2021-09-17 15:52:17.0",
      "TenantName": "pay_online",
      "Mem": 20,
      "Cpu": 10,
      "Description": "PayCore business database",
      "TenantMode": "Oracle",
      "TenantId": "t33h8y08k****",
      "UnitCpu": 5,
      "UnitMem": 10,
      "UnitNum": 2,
      "UsedDiskSize": 10,
      "Charset": "utf8mb4",
      "Collation": "utf8mb4_general_ci",
      "EnableReadOnlyReplica": true,
      "ParameterTemplate": "express_oltp"
    }
  ]
}

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-02-02The response structure of the API has changedView Change Details
2022-09-28The response structure of the API has changedView Change Details
2022-01-17The response structure of the API has changedView Change Details
2021-08-19The response structure of the API has changedView Change Details
  • On this page (0)
  • Debugging
  • Authorization information
  • Request parameters
  • Response parameters
  • Examples
  • Error codes
  • Change history
Feedback
phone Contact Us

Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

alicare alicarealicarealicare