You can call this operation to query all clusters in a specified region.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeClusters

The operation that you want to perform. Set the value to DescribeClusters.

RegionId String No cn-hangzhou

The ID of the region. Example: cn-hangzhou.

PageNumber Integer No 1

The number of the page to return. Valid values: any non-zero positive integer.

Default value: 1

PageSize Integer No 20

The number of entries to return on each page.

Tag.N.Key String No key

The key of custom tag N.

Tag.N.Value String No value

The value of custom tag N.

ClusterName String No test

The name of the cluster.

Response parameters

Parameter Type Example Description
Clusters Array

The list of entries returned.

Cluster
ClusterId String cds-bp1e4e32****z75c

The ID of the cluster.

ClusterName String Cassandra-test

The name of the cluster.

CreatedTime String 2019-09-20T16:02:34Z

The time when the cluster was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC and denoted by Z.

DataCenterCount Integer 1

The number of data centers.

ExpireTime String 2019-10-20T16:02:34Z

The expiration time of the cluster. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC and denoted by Z.

LockMode String None

The lock mode. Valid values:

  • None: The cluster is not locked.
  • Expired: The cluster is locked upon expiration of subscription.
  • DiskFull: The cluster is locked because the disk is full.
MajorVersion String 3.11

The major version number.

MinorVersion String 3.11.5

The minor version number.

PayType String PayAsYouGo

The billing method. Valid values:

  • Subscription
  • PayAsYouGo
Note Pay-as-you-go clusters never expire.
Status String Running

The running status of the cluster. Valid values:

  • Creating
  • CreateFailed
  • Running
  • Deleting
  • DeleteFailed
  • Deleted
Tags Array

The tag.

Tag
Key String test-key

The tag key.

Value String test-value

The tag value.

PageNumber Integer 1

The page number of the returned page.Valid values: any non-zero positive integer.

Default value: 1

PageSize Integer 10

The number of entries returned per page.

RequestId String 4EA95B55-58AB-469E-BD8E-5B1F9EEB1683

The ID of the request.

TotalCount Long 3

The total number of clusters returned.

Examples

Sample requests

http(s)://[Endpoint]/? Action=DescribeClusters
&<Common request parameters>

Sample success responses

XML format

<DescribeClustersResponse>
  <TotalCount>5</TotalCount>
  <PageSize>10</PageSize>
  <RequestId>3FAD819C-5D1C-4E20-BBCE-7E946F6FA196</RequestId>
  <PageNumber>1</PageNumber>
  <Clusters>
        <Cluster>
              <Status>Running</Status>
              <MajorVersion>3.11</MajorVersion>
              <CreatedTime>2020-02-26T01:29:03Z</CreatedTime>
              <ClusterId>cds-bp11tjzh****o87v</ClusterId>
              <DataCenterCount>1</DataCenterCount>
              <ClusterName>hz_test_jy</ClusterName>
              <MinorVersion>3.11.9</MinorVersion>
              <PayType>PayAsYouGo</PayType>
              <LockMode>None</LockMode>
        </Cluster>
        <Cluster>
              <Status>Running</Status>
              <MajorVersion>3.11</MajorVersion>
              <CreatedTime>2020-02-21T10:29:45Z</CreatedTime>
              <ClusterId>cds-bp1syjlt****q976</ClusterId>
              <DataCenterCount>1</DataCenterCount>
              <ClusterName>test</ClusterName>
              <MinorVersion>3.11.9</MinorVersion>
              <PayType>Subscription</PayType>
              <LockMode>None</LockMode>
              <ExpireTime>2020-03-22T00:00:00Z</ExpireTime>
        </Cluster>
        <Cluster>
              <Status>Running</Status>
              <MajorVersion>3.11</MajorVersion>
              <CreatedTime>2020-01-17T22:09:16Z</CreatedTime>
              <ClusterId>cds-bp1u7146****udz2</ClusterId>
              <DataCenterCount>2</DataCenterCount>
              <ClusterName>cassandra_test_hz</ClusterName>
              <MinorVersion>3.11.8</MinorVersion>
              <PayType>PayAsYouGo</PayType>
              <LockMode>None</LockMode>
        </Cluster>
        <Cluster>
              <Status>Running</Status>
              <MajorVersion>3.11</MajorVersion>
              <CreatedTime>2020-01-08T10:37:21Z</CreatedTime>
              <ClusterId>cds-bp1j837b****vqrk</ClusterId>
              <DataCenterCount>1</DataCenterCount>
              <ClusterName>baitu-pre</ClusterName>
              <MinorVersion>3.11.7</MinorVersion>
              <PayType>PayAsYouGo</PayType>
              <LockMode>None</LockMode>
        </Cluster>
        <Cluster>
              <Status>Running</Status>
              <MajorVersion>3.11</MajorVersion>
              <CreatedTime>2019-12-27T10:47:55Z</CreatedTime>
              <ClusterId>cds-bp192wu9****u8au</ClusterId>
              <DataCenterCount>1</DataCenterCount>
              <ClusterName>ghj</ClusterName>
              <MinorVersion>3.11.7</MinorVersion>
              <PayType>Subscription</PayType>
              <LockMode>None</LockMode>
              <ExpireTime>2020-04-10T00:00:00Z</ExpireTime>
        </Cluster>
  </Clusters>
</DescribeClustersResponse>

JSON format

{
  "TotalCount": 5,
  "PageSize": 10,
  "RequestId": "3FAD819C-5D1C-4E20-BBCE-7E946F6FA196",
  "PageNumber": 1,
  "Clusters": {
    "Cluster": [
      {
        "Status": "Running",
        "MajorVersion": "3.11",
        "CreatedTime": "2020-02-26T01:29:03Z",
        "ClusterId": "cds-bp11tjzh****o87v",
        "DataCenterCount": 1,
        "ClusterName": "hz_test_jy",
        "MinorVersion": "3.11.9",
        "PayType": "PayAsYouGo",
        "LockMode": "None"
      },
      {
        "Status": "Running",
        "MajorVersion": "3.11",
        "CreatedTime": "2020-02-21T10:29:45Z",
        "ClusterId": "cds-bp1syjlt****q976",
        "DataCenterCount": 1,
        "ClusterName": "test",
        "MinorVersion": "3.11.9",
        "PayType": "Subscription",
        "LockMode": "None",
        "ExpireTime": "2020-03-22T00:00:00Z"
      },
      {
        "Status": "Running",
        "MajorVersion": "3.11",
        "CreatedTime": "2020-01-17T22:09:16Z",
        "ClusterId": "cds-bp1u7146****udz2",
        "DataCenterCount": 2,
        "ClusterName": "cassandra_test_hz",
        "MinorVersion": "3.11.8",
        "PayType": "PayAsYouGo",
        "LockMode": "None"
      },
      {
        "Status": "Running",
        "MajorVersion": "3.11",
        "CreatedTime": "2020-01-08T10:37:21Z",
        "ClusterId": "cds-bp1j837b****vqrk",
        "DataCenterCount": 1,
        "ClusterName": "baitu-pre",
        "MinorVersion": "3.11.7",
        "PayType": "PayAsYouGo",
        "LockMode": "None"
      },
      {
        "Status": "Running",
        "MajorVersion": "3.11",
        "CreatedTime": "2019-12-27T10:47:55Z",
        "ClusterId": "cds-bp192wu9****u8au",
        "DataCenterCount": 1,
        "ClusterName": "ghj",
        "MinorVersion": "3.11.7",
        "PayType": "Subscription",
        "LockMode": "None",
        "ExpireTime": "2020-04-10T00:00:00Z"
      }
    ]
  }
}

Error codes

For a list of error codes, visit the API Error Center.