Skip to content

remove_auto_termination_policy async

remove_auto_termination_policy(
    *,
    config_overrides: Optional[AsyncEMRClientConfig] = None,
    cluster_id: Optional[ClusterId] = None,
) -> RemoveAutoTerminationPolicyOutput

Removes an auto-termination policy from an Amazon EMR cluster.

Parameters:

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

    Specifies the ID of the Amazon EMR cluster from which the auto-termination policy will be removed.

Raises:

Source code in docs_src/capo_emr/_services/async_emr.py
async def remove_auto_termination_policy(
    self,
    *,
    config_overrides: Optional[AsyncEMRClientConfig] = None,
    cluster_id: Optional["capo_emr.types.cluster_id.ClusterId"] = None,
) -> "capo_emr.types.remove_auto_termination_policy_output.RemoveAutoTerminationPolicyOutput":
    """<p>Removes an auto-termination policy from an Amazon EMR cluster.</p>

    Args:
        cluster_id: <p>Specifies the ID of the Amazon EMR cluster from which the auto-termination policy will be removed.</p>

    Raises:
        capo_emr.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_emr.types.remove_auto_termination_policy_input.RemoveAutoTerminationPolicyInput]",
    ) -> AsyncOperationResponse[
        "capo_emr.types.remove_auto_termination_policy_output.RemoveAutoTerminationPolicyOutput"
    ]:
        import capo_emr._operations.elastic_map_reduce.remove_auto_termination_policy

        (
            output,
            http_response,
        ) = await capo_emr._operations.elastic_map_reduce.remove_auto_termination_policy.async_remove_auto_termination_policy(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

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

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output