All Products
Search
Document Center

ApsaraDB for OceanBase:DescribeTenants

Last Updated:Oct 23, 2024

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:
    • 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
oceanbase:DescribeTenantsget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The number of used disks of the tenant.

ob317v4uif****
TenantNamestringNo

The information of tenants.

pay_online
PageSizeintegerNo

You can call this operation to query the tenants in an OceanBase cluster.

10
PageNumberintegerNo

It is an online CLI tool that allows you to quickly retrieve and debug APIs. It can dynamically generate executable SDK code samples.

1
TenantIdstringNo

Alibaba Cloud CLI

ob2mr3oae0****
SearchKeystringNo

The primary zone of the tenant.

pay

Response parameters

ParameterTypeDescriptionExample
object

The number of resource units in the tenant.

TotalCountinteger

The total memory size of the tenant, in GB.

1
RequestIdstring

The ID of the tenant.

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

The ID of the OceanBase cluster.

Dataobject

PayCore business database

VpcIdstring

The time when the tenant was created.

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 return result of the request.

cn-hangzhou-i
DeployTypestring

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.

multiple
DeployModestring

The search keyword.

1-1-1
CreateTimestring

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

2021-09-17 15:52:17.0
TenantNamestring

The information of tenants.

pay_online
Meminteger

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

  • Default value: 1
20
Cpuinteger

The total number of CPU cores of the tenant.

10
Descriptionstring

Example 1

``` http(s)://[Endpoint]/?Action=DescribeTenants &InstanceId=ob317v4uif**** &TenantName=pay_online &PageSize=10 &PageNumber=1 &TenantId=ob2mr3oae0**** &SearchKey=pay &Common request parameters ```
TenantModestring

{ "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 } ] }

Oracle
TenantIdstring

You can call this operation to query the tenants in an OceanBase cluster.

t33h8y08k****

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": "\nhttp(s)://[Endpoint]/?Action=DescribeTenants\n&InstanceId=ob317v4uif****\n&TenantName=pay_online\n&PageSize=10\n&PageNumber=1\n&TenantId=ob2mr3oae0****\n&SearchKey=pay\n&Common request parameters\n",
      "TenantMode": "Oracle",
      "TenantId": "t33h8y08k****",
      "UnitCpu": 5,
      "UnitMem": 10,
      "UnitNum": 2,
      "UsedDiskSize": 10,
      "Charset": "utf8mb4",
      "Collation": "utf8mb4_general_ci"
    }
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperation
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