All Products
Search
Document Center

ApsaraDB for SelectDB:DescribeDBInstances

Last Updated:Dec 18, 2024

Queries the information about ApsaraDB for SelectDB instances.

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
selectdb:DescribeDBInstanceslist
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ResourceGroupIdstringNo

The resource group ID.

rg-4690g37929****
DBInstanceIdsstringNo

The instance ID. Separate multiple instance IDs with commas (,).

selectdb-cn-7213cjv****
DBInstanceStatusstringNo

The state of the instance. Valid values:

  • CREATING: The instance is being created.
  • ACTIVATION: The instance is running.
  • RESOURCE_CHANGING: The resource configuration of the instance is being changed.
  • ORDER_PREPARING: The order is being confirmed.
  • READONLY_RESOURCE_CHANGING: The resource configuration of the instance is being changed and the instance is write-locked.
  • DELETING: The instance is being deleted.
ACTIVATION
DBInstanceDescriptionstringNo

The description of the instance.

PageSizelongNo

The number of entries per page. Valid values:

  • 30 (default)
  • 50
  • 100
30
PageNumberlongNo

The page number.

1
RegionIdstringYes

The region ID of the instance.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

BC854513-E85E-54F3-9842-B9CCD3308CDD
PageNumberlong

The number of entries per page. Valid values:

  • 30 (default)
  • 50
  • 100
30
PageSizelong

The page number.

1
TotalRecordCountlong

The total number of entries returned.

2
Itemsarray<object>

The details about each instance returned.

DBInstanceobject
connectionStringstring

The connection string of the instance.

DBInstanceIdstring

The instance ID.

selectdb-cn-7213cjv****
Descriptionstring

The description of the instance.

Enginestring

The database engine of the instance.

selectdb
EngineVersionstring

The database engine version of the instance.

2.4
InstanceUsedTypestring

The type of the instance.

Instance
RegionIdstring

The region ID.

cn-hangzhou
ZoneIdstring

The zone ID.

cn-hangzhou-i
ChargeTypestring

The billing method of the instance. Valid values:

  • Postpaid: pay-as-you-go.
  • Prepaid: subscription.
PrePaid
Categorystring

The edition of the instance. Default value: basic.

basic
Statusstring

The state of the instance. Valid values:

  • CREATING: The instance is being created.
  • ACTIVATION: The instance is running.
  • RESOURCE_CHANGING: The resource configuration of the instance is being changed.
  • ORDER_PREPARING: The order is being confirmed.
  • READONLY_RESOURCE_CHANGING: The resource configuration of the instance is being changed and the instance is write-locked.
  • DELETING: The instance is being deleted.
ACTIVATION
VpcIdstring

The virtual private cloud (VPC) ID.

vpc-bp175iuvg8nxqraf2****
VswitchIdstring

The vSwitch ID.

vsw-bp1gzt31twhlo0sa5****
ResourceCpulong

The number of CPU cores of the instance.

8
ResourceMemorylong

The memory capacity of the instance.

64
ScaleMinlong

The minimum number of RDS capacity units (RCUs).

0
ScaleMaxlong

The maximum number of RCUs.

0
ScaleReplicalong

This parameter is not returned.

StorageSizelong

The cache size.

100
StorageTypestring

The storage type of the instance.

cloud_essd
ObjectStoreSizelong

The storage capacity of the instance. Unit: GB.

200
ExpireTimestring

The time when the cluster expires.

Note A specific value is returned only for subscription clusters whose billing method is Prepaid. For pay-as-you-go clusters whose billing method is Postpaid, no value is returned.
2024-03-29T03:47:05Z
LockModelong

The lock mode of the instance.

0
LockReasonstring

The reason why the instance is locked.

nolock
IsDeletedboolean

Indicates whether the instance is deleted. Valid values:

  • true
  • false
false
MaintainStarttimestring

The start time of the instance maintenance window.

MaintainEndtimestring

The end time of the instance maintenance window.

GmtCreatedstring

The time when the task was created. The time is displayed in UTC.

2023-08-12T04:14Z
GmtModifiedstring

The time when the task was last modified. The time is displayed in UTC.

2023-08-12T19:05Z
ParentInstancestring

The time when the instance was created.

ResourceGroupIdstring

The ID of the resource group.

MaintainStartTimeStrstring

The start timestamp of the maintenance window.

MaintainEndTimeStrstring

The end timestamp of the maintenance window.

TenantClusterIdstring

The ID of the cluster that is monitored by Managed Service for Prometheus.

TenantTokenstring

The token that is used to access Managed Service for Prometheus.

TenantUserIdstring

The ID of the account that uses Managed Service for Prometheus.

Tagsarray<object>

The details about each tag returned.

ClusterCountinteger

The total number of clusters.

1

Examples

Sample success responses

JSONformat

{
  "RequestId": "BC854513-E85E-54F3-9842-B9CCD3308CDD",
  "PageNumber": 30,
  "PageSize": 1,
  "TotalRecordCount": 2,
  "Items": [
    {
      "connectionString": "",
      "DBInstanceId": "selectdb-cn-7213cjv****",
      "Description": "",
      "Engine": "selectdb",
      "EngineVersion": "2.4",
      "InstanceUsedType": "Instance",
      "RegionId": "cn-hangzhou",
      "ZoneId": "cn-hangzhou-i",
      "ChargeType": "PrePaid",
      "Category": "basic",
      "Status": "ACTIVATION",
      "VpcId": "vpc-bp175iuvg8nxqraf2****",
      "VswitchId": "vsw-bp1gzt31twhlo0sa5****",
      "ResourceCpu": 8,
      "ResourceMemory": 64,
      "ScaleMin": 0,
      "ScaleMax": 0,
      "ScaleReplica": 0,
      "StorageSize": 100,
      "StorageType": "cloud_essd",
      "ObjectStoreSize": 200,
      "ExpireTime": "2024-03-29T03:47:05Z",
      "LockMode": 0,
      "LockReason": "nolock",
      "IsDeleted": false,
      "MaintainStarttime": "",
      "MaintainEndtime": "",
      "GmtCreated": "2023-08-12T04:14Z\n",
      "GmtModified": "2023-08-12T19:05Z",
      "ParentInstance": "",
      "ResourceGroupId": "",
      "MaintainStartTimeStr": "",
      "MaintainEndTimeStr": "",
      "TenantClusterId": "",
      "TenantToken": "",
      "TenantUserId": "",
      "Tags": [
        {
          "TagKey": "testKey",
          "TagValue": "testValue"
        }
      ],
      "ClusterCount": 1
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidPageNumber.MalformedThe specified parameter "PageNumber" is not valid.The number of records per page parameter is illegal.
400DocumentConvertFailed.ExceedFileSizeLimitThe conversion has been failed, exceed file size limit.english description1
400ForbiddenUser not authorized to operate on the specified resource, or this API does not support RAM.english description1
400InvalidDBNameThe specified database name is not allowed.english description1
400CreateOrderFailedFailed to create order.Failed to create order.
403DBClusterNotSupportedThe requested operation can not be performed while the cluster is not sale.The requested operation cannot be performed while the cluster is not running.
403IncorrectDBInstanceStateCurrent DB instance state does not support this operation.english description1
403InstanceEngineType.NotSupportThe instance engine and type does not support operations.english description1
403InvalidDBInstanceState.NotSupportThe specified instance state does't support this operation.The instance is in a state that does not support the current operation.
403MoneyLessThan100The Account Monet less Than 100.english description1
403OperationDenied.DBNameAndAccountPrivilegeCountThe operation is not permitted due to count of database or account privilege.english description1
403InsufficientResourceCapacityThe resource is out of usage.Not enough resources, please try again later.
404DBInstanceLockedThe current instance lock mode does not support this operation.english description1
404IncorrectVswitchIdThe specified parameter VSwitchId is not valid.english description1
404InvalidApi.NotFoundSpecified api is not found, please check your url and method.-
404InvalidDBInstance.NotFoundThe specified instance is not found.english description1
404InvalidDBInstanceClass.NotFoundThe specified instance classic does not exist.english description1
404InvalidRegionId.NotFoundThe provided RegionId does not exist in our records.english description1
404QueryPrice.FailedThe inquiry failed. Contact Alibaba Cloud customer service representatives.english description1

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

Change history

Change timeSummary of changesOperation
2024-06-24The Error code has changedView Change Details
2024-06-12The request parameters of the API has changed. The response structure of the API has changedView Change Details
2023-12-27The response structure of the API has changedView Change Details