调用DescribeClusters查询指定地域下的所有集群信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeClusters

系统规定参数。取值:DescribeClusters。

RegionId String cn-hangzhou

地域ID,如cn-hangzhou。

PageNumber Integer 1

页码,取值:大于0且不超过Integer的最大值。

默认值:1。

PageSize Integer 20

每页记录数。

Tag.N.Key String key

自定义标签key

Tag.N.Value String value

自定义标签value

ClusterName String test

集群名称

返回数据

名称 类型 示例值 描述
Clusters Array

集群查询结果列表。

Cluster
ClusterId String cds-bp1e4e32****z75c

集群ID。

ClusterName String Cassandra-test

集群名称。

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

集群创建时间。格式:yyyy-MM-ddTHH:mm:ssZ(UTC 通用标准时,以Z来标识)。

DataCenterCount Integer 1

数据中心个数。

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

集群到期时间。格式:yyyy-MM-ddTHH:mm:ssZ(UTC 通用标准时,以Z来标识)。

LockMode String None

锁定模式。

  • None:未锁定
  • Expired:集群订阅到期锁定
  • DiskFull:磁盘已满锁定
MajorVersion String 3.11

主版本号。

MinorVersion String 3.11.5

小版本号。

PayType String PayAsYouGo

付费类型,可取值:

  • Subscription:包年包月
  • PayAsYouGo:按量付费
说明 按量付费实例无到期时间
Status String Running

集群运行状态,取值示例:

  • Creating:创建中
  • CreateFailed:创建失败
  • Running:运行中
  • Deleting:删除中
  • DeleteFailed:删除失败
  • Deleted:已删除
Tags Array

标签

Tag
Key String test-key

标签键

Value String test-value

标签值

PageNumber Integer 1

页码,取值:大于0且不超过Integer的最大值。

默认值:1。

PageSize Integer 10

每页记录数。

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

请求ID。

TotalCount Long 3

查询集群总记录数。

示例

请求示例

http(s)://[Endpoint]/?Action=DescribeClusters
&<公共请求参数>

正常返回示例

XML 格式

<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 格式

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

错误码

访问错误中心查看更多错误码。