全部产品
E-MapReduce

查询集群列表

更新时间:2017-06-07 13:26:11   分享:   

ListClusters 查询集群列表

请求参数

字段 类型 是否必须 默认值 描述
StatusList Array<String> 选择需要的集群状态进行筛选。使用类似如下的格式的字符串数组:[“CREATING”, “RUNNING”, “IDLE”]
RegionId String
PageNumber Integer 1 查询的页码
PageSize Integer 10 查询的页面条数

返回参数

字段 类型 描述
Cluster Array<ClusterInfoSimple> ClusterInfoSimple数组。ClusterInfoSimple结构见下面的对象。
TotalCount Integer 总条数
PageNumber Integer 当前页码
PageSize Integer 当前查询页面条数

ClusterInfoSimple

字段 类型 描述
Id String 集群Id
Name String 集群名称
ChargeType String 集群的付费类型。 PrePaid:包年包月,PostPaid:按量付费
ExpiredTime Long 集群到期的时间,时间戳格式。类似:1459236255438
Type String 集群类型,HADOOP,HBASE
CreateTime Long 集群创建的时间,时间戳格式。类似:1459236255438
RunningTime Integer 集群运行的时间,单位:秒
Status String 集群的状态,参考集群状态
FailReason FailReason 集群创建失败的信息
CreateType String ON-DEMAND:按需创建,指使用执行计划动态创建出来的集群。MANUAL:手动创建的集群

示例

请求示例

  1. https://emr.aliyuncs.com/?Action=ListClusters
  2. &PageSize=100
  3. &StatusList=%5B%22CREATING%22%2C+%22RUNNING%22%2C+%22IDLE%22%2C+%22RELEASING%22%2C+%22CREATE_FAILED%22%2C+%22RELEASE_FAILED%22%5D
  4. &PageNumber=1
  5. &RegionId=cn-hangzhou
  6. &公共请求参数

返回格式

JSON 格式

  1. {
  2. "code": "200",
  3. "data": {
  4. "Clusters": {
  5. "ClusterInfo": [
  6. {
  7. "CreateTime": 1454035046000,
  8. "FailReason": {
  9. "ErrorCode": "OperationDenied",
  10. "ErrorMsg": "The resource is out of usage.",
  11. "RequestId": "C0946CDD-25A6-45F5-8F5C-D095F12E8B6B"
  12. },
  13. "Id": "500000845",
  14. "Name": "ffff",
  15. "PayType": "PostPaid",
  16. "RunningTime": 0,
  17. "Status": "LAUNCHING_FAIL",
  18. "Type": "hadoop"
  19. },
  20. {
  21. "CreateTime": 1454034802000,
  22. "FailReason": {
  23. "ErrorCode": "OperationDenied",
  24. "ErrorMsg": "The resource is out of usage.",
  25. "RequestId": "3FCF17ED-9277-40B0-983F-52939B1B8BFF"
  26. },
  27. "Id": "500000844",
  28. "Name": "testforcerelease",
  29. "PayType": "PostPaid",
  30. "RunningTime": 0,
  31. "Status": "LAUNCHING_FAIL",
  32. "Type": "hadoop"
  33. },
  34. {
  35. "CreateTime": 1453879601000,
  36. "FailReason": {},
  37. "Id": "500000760",
  38. "Name": "新Hadoop",
  39. "PayType": "PostPaid",
  40. "RunningTime": 18938,
  41. "Status": "TERMINATED",
  42. "Type": "hadoop"
  43. },
  44. {
  45. "CreateTime": 1453877940000,
  46. "FailReason": {
  47. "ErrorCode": "MissingParameter",
  48. "ErrorMsg": "The input parameter &quot;InstanceId&quot; that is mandatory for processing this request is not supplied.",
  49. "RequestId": "D1CEBBCD-2FFD-4BBF-A7A0-87FC9378A237"
  50. },
  51. "Id": "500000759",
  52. "Name": "Cluster_OnDemandWithHourSchedual",
  53. "PayType": "PostPaid",
  54. "RunningTime": 0,
  55. "Status": "LAUNCHING_FAIL",
  56. "Type": "hadoop"
  57. },
  58. {
  59. "CreateTime": 1453877939000,
  60. "FailReason": {
  61. "ErrorCode": "MissingParameter",
  62. "ErrorMsg": "The input parameter &quot;InstanceId&quot; that is mandatory for processing this request is not supplied.",
  63. "RequestId": "F06849BF-391A-450D-AC8A-978C7DF798BF"
  64. },
  65. "Id": "500000758",
  66. "Name": "Cluster_OnDemandWithDaySchedual",
  67. "PayType": "PostPaid",
  68. "RunningTime": 0,
  69. "Status": "LAUNCHING_FAIL",
  70. "Type": "hadoop"
  71. }
  72. ]
  73. },
  74. "PageNumber": 1,
  75. "PageSize": 100,
  76. "RequestId": "C7067848-F4DC-42B4-A596-235F82E43E2E",
  77. "TotalCount": 849
  78. },
  79. "requestId": "C7067848-F4DC-42B4-A596-235F82E43E2E",
  80. "successResponse": true
  81. }
本文导读目录
本文导读目录
以上内容是否对您有帮助?