Method description
Obtains information about a cluster instance.
Parameter description
Parameter | Type | Description |
---|---|---|
clusterId | String | Cluster ID |
groupName | String | Name of an instance group |
id | String | Cluster instance ID |
Response description
If the call succeeds, a GetClusterInstanceResponse 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";
String id = "ins-xxxxxxxx";
GetClusterInstanceResponse response = client.getClusterInstance(clusterId,groupName,id);
//Succeeded
ClusterInstance clusterInstance = response.getClusterInstance();
String state = clusterInstance.getState();
//assertEquals('Pending', state); //Pending, Starting, Running, Deleting, Deleted
}catch(ClientException e){
e.printStackTrace();
// Failed
}