All Products
Search
Document Center

ListClusters

Last Updated: May 14, 2018

Description

Obtains the cluster list.

Request syntax

  1. GET /clusters?Marker={Marker}&MaxItemCount={MaxItemCount}

Attribute description

Attribute Type Required Description
Marker String No Start resource ID of the current page.Default value: Null string
MaxItemCount int No Maximum number of actually returned resources.The default value is 50, and the maximum value is 100.

Response

Success

The 200 status code and the following cluster list information are returned:

  1. {
  2. "NextMarker": "",
  3. "Items":[{
  4. "Name": "clusterName1",
  5. "Id": "cls-6kir9pdp3lg6220g418002",
  6. "OwnerId": 123,
  7. "Description": "demo",
  8. "CreationTime": "2016-10-31T06:55:33.921897Z",
  9. "State": "Active",
  10. "ImageId": "img-ubuntu",
  11. "Notification": {
  12. "Topic": {
  13. "Name": "test-topic",
  14. "Endpoint": "http://[UserId].mns.[Region].aliyuncs.com/",
  15. "Events": [
  16. "OnClusterDeleted",
  17. "OnInstanceCreated",
  18. "OnInstanceActive"
  19. ]
  20. }
  21. },
  22. "Configs": {
  23. "Disks": {
  24. "SystemDisk": {
  25. "Type": "cloud",
  26. "Size": 500
  27. },
  28. "DataDisk": {
  29. "Type": "cloud",
  30. "Size": 500,
  31. "MountPoint": "/path/to/mount"
  32. }
  33. }
  34. },
  35. "Groups": {
  36. "group1": {
  37. "DesiredVMCount": 3,
  38. "ActualVMCount": 2,
  39. "InstanceType": "bcs.a2.large",
  40. "ResourceType": "OnDemand"
  41. }
  42. },
  43. "OperationLogs": ["[2016-10-31T06:55:33.921897Z][group]Creating instance group successfully","[2016-10-31T06:55:33.941897Z]Creating cluster successfully"],
  44. "Metrics": {
  45. "RunningCount": 1,
  46. "StartingCount": 0,
  47. "StoppingCount": 0,
  48. "StoppedCount": 0
  49. }
  50. }]
  51. }

Attribute description

Attribute Type Description
NextMarker string Start resource ID on the next page.The value is blank in the last page.
Items Array Cluster list.

Error codes

Error code Error message Status code Syntax
InvalidMaxItemCount Specified parameter MaxItemCount is not valid. Its type must be integer. 400 MaxItemCount must be an integer.
InvalidMaxItemCount Specified parameter MaxItemCount is not valid. It must be in [0, 100]. 400 The MaxItemCount value must be in the range of [0, 100].