All Products
Search
Document Center

Batch Compute:list_clusters

Last Updated:May 14, 2018

Parameter description

Attribute Type Description
next_marker str Start resource ID on the next page. The value is null for the last page
max_item_count int Maximum number of actually returned resources. The default value is 50, and the maximum value is 100

Response description

  • The list_clusters method returns a ListResponse object, which contains a set of Cluster objects.
  • For more information about attributes of the Cluster object, see the description of the Cluster class.
Attribute Type Description
NextMarker str Start resource ID on the next page. The value is null for the last page
Items list List of Cluster classes

Example

  1. try:
  2. # Get a Client object.
  3. client = Client(...
  4. ...
  5. marker = ""
  6. max_item = 100
  7. round = 0
  8. while marker or round != 0:
  9. response = client.list_clusters(marker, max_item)
  10. marker = response.NextMarker
  11. for cluster in response.Items:
  12. print (cluster.Id, cluster.State)
  13. round += 1
  14. except ClientError, e:
  15. print(e)