All Products
Search
Document Center

listClusterInstances

Last Updated: May 11, 2018

Method description

Lists the cluster instances. Pagination is supported.

Parameter description

Parameter Type Required Description
clusterId String Yes Cluster ID
groupName String Yes Name of an instance group
marker String No Start resource ID of the current page. Default value: Null string
maxItemCount int No Maximum number of returned items. The maximum value is 200. The default value is also 200

Response description

  • If the call succeeds, a ListClusterInstancesResponse instance is returned. You can use the getClusterInstance method of this instance to obtain the ClusterInstance object.

  • If a failure occurs, a ClientException is thrown.

Sample code

  1. try{
  2. String clusterId = "cls-6vilcufsfd31i010";
  3. String groupName = "group1";
  4. ListClusterInstancesResponse response = client.listClusterInstances(clusterId, groupName);
  5. //Succeeded
  6. List<ClusterInstance> list = response.getItems(); //List of cluster instances
  7. String marker = ins.getNextMarker();//Next start marker
  8. }catch(ClientException e){
  9. e.printStackTrace();
  10. // Failed
  11. }

Attributes of ClusterInstance

Attribute Type Description
id String Cluster instance ID
hint String Hint of the cluster instance
state String Cluster instance status. Optional values include Pending, Starting, Running, Deleting, and Deleted
ipAddress String IP address of the instance
creationTime Date Creation time of the instance