All Products
Search
Document Center

get_cluster_instance

Last Updated: May 14, 2018

Parameter description

Attribute Type Description
cluster_id str Cluster ID
group_name str Instance group name
instance_id str Instance ID

Response description

The get_cluster_instance method returns a GetResponse object, which encapsulates all interfaces of the ClusterInstance class.

ClusterInstance class

Parameter description

Parameter Type Description
properties dict, str, ClusterInstance object Status information of the cluster instance

Attribute description

Attribute Type Description
Id str Cluster instance ID
Hint str Cluster instance Affinity, which appears in AutoCluster
State str Instance status. Optional values include Pending, Starting, Running, Deleting, and Deleted
IpAddress str Network address of the cluster instance
CreationTime str Creation time of the cluster instance

Example

  1. try:
  2. # Get a Client object.
  3. client = Client(...
  4. ...
  5. cluster_id = 'cls-xxxx'
  6. group_name = 'group1'
  7. instance_id = 'i-xxxx'
  8. instance_status = client.get_cluster_instance(cluster_id, group_name, instance_id)
  9. print(instance_status.Id, instance_status.IpAddress)
  10. except ClientError, e:
  11. print(e)