Returns the auto-termination policy for an Amazon EMR cluster.
Parameters:
-
cluster_id
(Optional[ClusterId], default:
None
)
–
Specifies the ID of the Amazon EMR cluster for which the auto-termination policy will be fetched.
Raises:
Source code in docs_src/capo_emr/_services/emr.py
| def get_auto_termination_policy(
self,
*,
config_overrides: Optional[EMRClientConfig] = None,
cluster_id: Optional["capo_emr.types.cluster_id.ClusterId"] = None,
) -> "capo_emr.types.get_auto_termination_policy_output.GetAutoTerminationPolicyOutput":
"""<p>Returns the auto-termination policy for an Amazon EMR cluster.</p>
Args:
cluster_id: <p>Specifies the ID of the Amazon EMR cluster for which the auto-termination policy will be fetched.</p>
Raises:
capo_emr.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_emr.types.get_auto_termination_policy_input.GetAutoTerminationPolicyInput]",
) -> OperationResponse[
"capo_emr.types.get_auto_termination_policy_output.GetAutoTerminationPolicyOutput"
]:
import capo_emr._operations.elastic_map_reduce.get_auto_termination_policy
output, http_response = (
capo_emr._operations.elastic_map_reduce.get_auto_termination_policy.get_auto_termination_policy(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetAutoTerminationPolicy")
)
input_: capo_emr.types.get_auto_termination_policy_input.GetAutoTerminationPolicyInput = {}
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
|