Skip to content

describe_cluster

describe_cluster(
    *,
    config_overrides: Optional[EMRClientConfig] = None,
    cluster_id: Optional[ClusterId] = None,
) -> DescribeClusterOutput

Provides cluster-level details including status, hardware and software configuration, VPC settings, and so on.

Parameters:

  • cluster_id (Optional[ClusterId], default: None ) –

    The identifier of the cluster to describe.

Raises:

Source code in docs_src/capo_emr/_services/emr.py
def describe_cluster(
    self,
    *,
    config_overrides: Optional[EMRClientConfig] = None,
    cluster_id: Optional["capo_emr.types.cluster_id.ClusterId"] = None,
) -> "capo_emr.types.describe_cluster_output.DescribeClusterOutput":
    """<p>Provides cluster-level details including status, hardware and software configuration, VPC settings, and so on.</p>

    Args:
        cluster_id: <p>The identifier of the cluster to describe.</p>

    Raises:
        capo_emr.errors.internal_server_exception.InternalServerException: <p>This exception occurs when there is an internal failure in the Amazon EMR service.</p>
        capo_emr.errors.invalid_request_exception.InvalidRequestException: <p>This exception occurs when there is something wrong with user input.</p>
        capo_emr.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_emr.types.describe_cluster_input.DescribeClusterInput]",
    ) -> OperationResponse[
        "capo_emr.types.describe_cluster_output.DescribeClusterOutput"
    ]:
        import capo_emr._operations.elastic_map_reduce.describe_cluster

        output, http_response = (
            capo_emr._operations.elastic_map_reduce.describe_cluster.describe_cluster(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeCluster")
    )
    input_: capo_emr.types.describe_cluster_input.DescribeClusterInput = {}
    if cluster_id is not None:
        input_["cluster_id"] = cluster_id

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output