Smaws_Client_EMR.SetTerminationProtectionSetTerminationProtection locks a cluster (job flow) so the Amazon EC2 instances in the cluster cannot be terminated by user intervention, an API call, or in the event of a job-flow error. The cluster still terminates upon successful completion of the job flow. Calling SetTerminationProtection on a cluster is similar to calling the Amazon EC2 DisableAPITermination API on all Amazon EC2 instances in a cluster.
SetTerminationProtection is used to prevent accidental termination of a cluster and to ensure that in the event of an error, the instances persist so that you can recover any data stored in their ephemeral instance storage.
To terminate a cluster that has been locked by setting SetTerminationProtection to true, you must first unlock the job flow by a subsequent call to SetTerminationProtection in which you set the value to false.
For more information, see Managing Cluster Termination in the Amazon EMR Management Guide.
val error_to_string :
[ Smaws_Lib.Protocols.AwsJson.error
| `InternalServerError of Types.internal_server_error ] ->
stringval request :
'http_type Smaws_Lib.Context.t ->
Types.set_termination_protection_input ->
(Smaws_Lib.Smithy_api.Types.unit_,
[> Smaws_Lib.Protocols.AwsJson.error
| `InternalServerError of Types.internal_server_error ])
Stdlib.resultval request_with_metadata :
'http_type Smaws_Lib.Context.t ->
Types.set_termination_protection_input ->
(Smaws_Lib.Smithy_api.Types.unit_ Smaws_Lib.Response.t,
[> Smaws_Lib.Protocols.AwsJson.error
| `InternalServerError of Types.internal_server_error ]
* Smaws_Lib.Response.metadata)
Stdlib.result