DescribeDBInstances

更新时间:
复制 MD 格式

Call the DescribeDBInstances API to query a list of DB instances.

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

clickhouse:DescribeDBInstances

get

*EnterpriseDBCluster

acs:clickhouse:{#regionId}:{#accountId}:enterprisedbcluster/{#DBInstanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

cn-hangzhou

DBInstanceIds

string

No

A comma-separated list of instance IDs.

cc-xxxxx,cx-xxxx

VpcIds

string

No

A comma-separated list of VPC IDs.

vpc-2ze4ee9z******,vpc-2ze4ee9z5l******

DBInstanceStatus

string

No

The instance status.

active

Description

string

No

The instance description.

test

PageSize

integer

No

The number of entries per page.

30

PageNumber

integer

No

The page number.

1

ResourceGroupId

string

No

The resource group ID.

rg-4690g37929****

Tags

array<object>

No

The tags for filtering instances.

DescribeDBInstances

object

No

A tag, which is a key-value pair.

Key

string

No

The tag key.

user_123

Value

string

No

The tag value.

example value

Response elements

Element

Type

Description

Example

object

The details of the response.

Data

object

The response data.

TotalCount

string

The total number of entries.

1

PageSize

integer

The number of entries per page.

30

PageNumber

integer

The page number.

1

DBInstances

array<object>

The list of instance details.

array<object>

Details of an instance.

DBInstanceId

string

The instance ID.

cc-xxxxxxx

Description

string

The instance description.

test_desc

Engine

string

The engine.

clickhouse

EngineVersion

string

The engine version.

22.8

AliUid

string

The account ID.

1294****

Bid

string

The channel ID.

186681****

RegionId

string

The region ID.

cn-hangzhou

ZoneId

string

The zone ID.

cn-hangzhou-i

ChargeType

string

The billing method for the instance. Valid values:

  • PrePaid: subscription.

  • PostPaid: pay-as-you-go.

PostPaid

Status

string

The instance status.

active

VpcId

string

The VPC ID.

vpc-uf6kg****

VSwitchId

string

The vSwitch ID.

vsw-8vb5mw****

ScaleMin

integer

The minimum compute capacity for serverless elastic scaling.

1

ScaleMax

integer

The maximum compute capacity for serverless elastic scaling.

13

ExpireTime

string

The expiration time.

2024-02-16 11:51:06

LockMode

string

The lock mode.

0

LockReason

string

The reason for the lock.

null

MaintainStartTime

string

The maintenance window start time.

00:00Z

MaintainEndTime

string

The maintenance window end time.

04:00:00Z

DeletionProtection

string

Indicates whether deletion protection is enabled.

False

ResourceGroupId

string

The resource group ID.

rg-acfmzy****

CreateTime

string

The instance creation time.

2022-12-04 21:16:15

Tags

array<object>

The tags attached to the instance.

object

A tag.

Key

string

The tag key.

tag

Value

string

The tag value.

test

StorageType

string

The instance storage type.

oss

RequestId

string

The request ID.

xxx-xxx-xxx

Examples

Success response

JSON format

{
  "Data": {
    "TotalCount": "1",
    "PageSize": 30,
    "PageNumber": 1,
    "DBInstances": [
      {
        "DBInstanceId": "cc-xxxxxxx",
        "Description": "test_desc",
        "Engine": "clickhouse",
        "EngineVersion": "22.8",
        "AliUid": "1294****",
        "Bid": "186681****",
        "RegionId": "cn-hangzhou",
        "ZoneId": "cn-hangzhou-i",
        "ChargeType": "PostPaid",
        "Status": "active",
        "VpcId": "vpc-uf6kg****",
        "VSwitchId": "vsw-8vb5mw****",
        "ScaleMin": 1,
        "ScaleMax": 13,
        "ExpireTime": "2024-02-16 11:51:06",
        "LockMode": "0",
        "LockReason": "null",
        "MaintainStartTime": "00:00Z",
        "MaintainEndTime": "04:00:00Z",
        "DeletionProtection": "False",
        "ResourceGroupId": "rg-acfmzy****",
        "CreateTime": "2022-12-04 21:16:15",
        "Tags": [
          {
            "Key": "tag",
            "Value": "test"
          }
        ],
        "StorageType": "oss"
      }
    ]
  },
  "RequestId": "xxx-xxx-xxx"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.