You can call this operation to query the list of all clusters in each region.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListClusters |
The operation that you want to perform. Set the value to ListClusters. |
RegionId | String | Yes | cn-hangzhou |
The ID of the region. You can call the DescribeRegions operation to query the most recent list of regions. |
ClusterTypeList.N | RepeatList | No | ["HADOOP","KAFKA"] |
The type of the cluster. Valid values:
|
CreateType | String | No | ON-DEMAND |
The method of creating the cluster. Valid values:
|
MachineType | String | No | ECS |
The instance type. The default value is ECS. |
StatusList.N | RepeatList | No | ["CREATING","IDLE"] |
The status of the cluster. Valid values:
|
IsDesc | Boolean | No | false |
Indicates whether the order is in reverse order. Valid values:
|
DepositType | String | No | HALF_MANAGED |
The managed type. Valid values:
|
PageNumber | Integer | No | 1 |
The number of the page to return. Pages start from page 1. |
PageSize | Integer | No | 10 |
The number of entries to return on each page. |
DefaultStatus | Boolean | No | true |
Specifies whether to query clusters whose default status is Initializing, Waiting for Build, Idle, Running, Released, or Failed to Create. Valid values:
|
Name | String | No | cluster_name |
The name of the global active database cluster. |
VpcId | String | No | vpc-bp1c85tzgqu1bf5b**** |
The ID of the VPC to which the instance belongs. |
ResourceGroupId | String | No | rg-bp67acfmxazb4p**** |
The ID of the resource group. You can call the ListResourceGroups to view the resource group ID. |
Tag.N.Key | String | No | TestKey |
The tag key of the EMR instance and node ECS instance. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key value is 1 to 128. It cannot start with acs: or aliyun. It cannot contain http:// or https://. |
Tag.N.Value | String | No | TestValue |
The tag values of EMR instances and node ECS instances. Valid values of N: 1 to 20. The tag value can be an empty string. Valid values: 1 to 128. It cannot start with acs: and cannot contain http:// or https://. |
ExpiredTagList.N | RepeatList | No | 0 |
A reserved parameter. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Clusters | Array of ClusterInfo |
The details about the returned clusters. |
|
ClusterInfo | |||
ChargeType | String | PostPaid |
The billing method of the instance. Valid values:
|
CreateResource | String | ECM_EMR |
Tags that are automatically attached to EMR clusters. |
CreateTime | Long | 1542784048000 |
The time when the instance was created. |
DepositType | String | HALF_MANAGED |
The managed type. Valid values:
|
ExpiredTime | Long | 1542784048000 |
The time-out period of the subscription cluster. Note This parameter is not reflected in pay-as-you-go clusters.
|
FailReason | Struct |
The reason why the creation of the cluster fails. |
|
ErrorCode | String | InvalidImageId.NotFound |
The error code. |
ErrorMsg | String | The specified ImageId does not exist. |
The error message. |
RequestId | String | B8DC3A91-3953-4444-92BB-DBC29C47EC1A |
The ID of the request. |
HasUncompletedOrder | Boolean | false |
Whether there are outstanding orders:
|
Id | String | C-010A704DA760**** |
The ID of the cluster. |
K8sClusterId | String | None |
A reserved parameter. |
MachineType | String | ECS |
The instance type of the cluster. Currently, ECS instances are used by default. |
MetaStoreType | String | LOCAL |
The type of the metadata. Valid values:
|
Name | String | cluster_name |
The name of the cluster. |
OperationId | Long | 1111 |
The ID of the operation. |
OrderList | String | 0 |
The list of orders. |
OrderTaskInfo | Struct |
A reserved parameter that indicates the information of orders. |
|
CurrentCount | Integer | 0 |
A reserved parameter. |
OrderIdList | String | 0 |
A reserved parameter. |
TargetCount | Integer | 0 |
A reserved parameter. |
Period | Integer | 36 |
The validity period of the subscription cluster. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36. Unit: months. |
RunningTime | Integer | 2345 |
up time. Unit: seconds. |
Status | String | IDEL |
The status of the global active database cluster. |
Tags | Array of Tag |
The labels of the alert. |
|
Tag | |||
TagKey | String | DevDept |
The key of the resource tag N. Valid values of N: 1 to 20. The tag key cannot be an empty string. The value of the tag key ranges from 1 to 128. It cannot start with acs: or aliyun. It cannot contain http:// or https://. |
TagValue | String | DevNianmin |
The value of the resource tag N. Valid values of N: 1 to 20. The tag value can be an empty string. Valid values: 1 to 128. It cannot start with acs: and cannot contain http:// or https://. |
Type | String | HADOOP |
The type of the cluster. |
PageNumber | Integer | 1 |
The number of the returned page. |
PageSize | Integer | 10 |
The number of entries to return on each page. |
RequestId | String | BF4FBAC6-B03E-4BFB-B6DB-EB53C34F2E22 |
The ID of the request. |
TotalCount | Integer | 12 |
The total number of returned entries. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ListClusters
&RegionId=cn-hangzhou
&<Common request parameters>
Sample success responses
XML
format
<clusters>
<chargeType>PostPaid</chargeType>
<createResource>ECM_EMR</createResource>
<createTime>1542784048000</createTime>
<failReason/>
<hasUncompletedOrder>false</hasUncompletedOrder>
<id>C-010A704DA760****</id>
<name>jy_test_d1_test</name>
<orderTaskInfo/>
<runningTime>3138</runningTime>
<status>RELEASED</status>
<type>HADOOP</type>
</clusters>
<clusters>
<chargeType>PostPaid</chargeType>
<createResource>ECM_EMR</createResource>
<createTime>1538107586000</createTime>
<failReason/>
<hasUncompletedOrder>false</hasUncompletedOrder>
<id>C-B9712209060C****</id>
<name>intelligence-313-yp</name>
<orderTaskInfo/>
<runningTime>2069400</runningTime>
<status>RELEASED</status>
<type>HADOOP</type>
</clusters>
<clusters>
<chargeType>PostPaid</chargeType>
<createResource>ECM_EMR</createResource>
<createTime>1536546078000</createTime>
<failReason/>
<hasUncompletedOrder>false</hasUncompletedOrder>
<id>C-4CD9EBBD6B23****</id>
<name>mg-storm</name>
<orderTaskInfo/>
<runningTime>1382155</runningTime>
<status>RELEASED</status>
<type>HADOOP</type>
</clusters>
<clusters>
<chargeType>PostPaid</chargeType>
<createResource>ECM_EMR</createResource>
<createTime>1535363759000</createTime>
<failReason/>
<hasUncompletedOrder>false</hasUncompletedOrder>
<id>C-75D6EE95D722****</id>
<name>df-3101-upgrade-test</name>
<orderTaskInfo/>
<runningTime>676284</runningTime>
<status>RELEASED</status>
<type>HADOOP</type>
</clusters>
<clusters>
<chargeType>PostPaid</chargeType>
<createResource>ECM_EMR</createResource>
<createTime>1534492361000</createTime>
<failReason>
<errorCode>InvalidImageId.NotFound</errorCode>
<errorMsg>The specified ImageId does not exist.</errorMsg>
<requestId>B8DC3A91-3953-4444-92BB-DBC29C47EC1A</requestId>
</failReason>
<hasUncompletedOrder>false</hasUncompletedOrder>
<id>C-5EF0F3C257B1****</id>
<name>Test Cluster 1</name>
<orderTaskInfo/>
<runningTime>0</runningTime>
<status>CREATE_FAILED</status>
<type>HADOOP</type>
</clusters>
<pageNumber>1</pageNumber>
<pageSize>5</pageSize>
<requestId>5443DB14-4641-4DFF-9226-4888EC5A2EA9</requestId>
<totalCount>11</totalCount>
JSON
format
{
"clusters": [
{
"chargeType": "PostPaid",
"createResource": "ECM_EMR",
"createTime": 1542784048000,
"failReason": {},
"hasUncompletedOrder": false,
"id": "C-010A704DA760****",
"name": "jy_test_d1_test",
"orderTaskInfo": {},
"runningTime": 3138,
"status": "RELEASED",
"type": "HADOOP"
},
{
"chargeType": "PostPaid",
"createResource": "ECM_EMR",
"createTime": 1538107586000,
"failReason": {},
"hasUncompletedOrder": false,
"id": "C-B9712209060C****",
"name": "intelligence-313-yp",
"orderTaskInfo": {},
"runningTime": 2069400,
"status": "RELEASED",
"type": "HADOOP"
},
{
"chargeType": "PostPaid",
"createResource": "ECM_EMR",
"createTime": 1536546078000,
"failReason": {},
"hasUncompletedOrder": false,
"id": "C-4CD9EBBD6B23****",
"name": "mg-storm",
"orderTaskInfo": {},
"runningTime": 1382155,
"status": "RELEASED",
"type": "HADOOP"
},
{
"chargeType": "PostPaid",
"createResource": "ECM_EMR",
"createTime": 1535363759000,
"failReason": {},
"hasUncompletedOrder": false,
"id": "C-75D6EE95D722****",
"name": "df-3101-upgrade-test",
"orderTaskInfo": {},
"runningTime": 676284,
"status": "RELEASED",
"type": "HADOOP"
},
{
"chargeType": "PostPaid",
"createResource": "ECM_EMR",
"createTime": 1534492361000,
"failReason": {
"errorCode": "InvalidImageId.NotFound",
"errorMsg": "The specified ImageId does not exist.",
"requestId": "B8DC3A91-3953-4444-92BB-DBC29C47EC1A"
},
"hasUncompletedOrder": false,
"id": "C-5EF0F3C257B1****",
"name": "Test cluster 1",
"orderTaskInfo": {},
"runningTime": 0,
"status": "CREATE_FAILED",
"type": "HADOOP"
}
],
"pageNumber": 1,
"pageSize": 5,
"requestId": "5443DB14-4641-4DFF-9226-4888EC5A2EA9",
"totalCount": 11
}