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
try{String clusterId = "cls-6vilcufsfd31i010";String groupName = "group1";ListClusterInstancesResponse response = client.listClusterInstances(clusterId, groupName);//SucceededList<ClusterInstance> list = response.getItems(); //List of cluster instancesString marker = ins.getNextMarker();//Next start marker}catch(ClientException e){e.printStackTrace();// Failed}
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 |