awswrangler.emr.get_cluster_state

awswrangler.emr.get_cluster_state(cluster_id: str, boto3_session: Optional[Session] = None) str

Get the EMR cluster state.

Possible states: ‘STARTING’, ‘BOOTSTRAPPING’, ‘RUNNING’, ‘WAITING’, ‘TERMINATING’, ‘TERMINATED’, ‘TERMINATED_WITH_ERRORS’

Parameters
  • cluster_id (str) – Cluster ID.

  • boto3_session (boto3.Session(), optional) – Boto3 Session. The default boto3 session will be used if boto3_session receive None.

Returns

State.

Return type

str

Examples

>>> import awswrangler as wr
>>> state = wr.emr.get_cluster_state("cluster-id")