AWS SDK for .NET Documentation
SetTerminationProtection Method (request)
Amazon ► Amazon.ElasticMapReduce ► AmazonElasticMapReduce ► SetTerminationProtection(SetTerminationProtectionRequest)
Did this page help you? Yes No Tell us about it...
SetTerminationProtection locks a 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 job flow is analogous to calling the Amazon EC2 DisableAPITermination API on all of the EC2 instances in a cluster.

SetTerminationProtection is used to prevent accidental termination of a job flow and to ensure that in the event of an error, the instances will persist so you can recover any data stored in their ephemeral instance storage.

To terminate a job flow that has been locked by setting SetTerminationProtection to

CopyC#

    true

, you must first unlock the job flow by a subsequent call to SetTerminationProtection in which you set the value to
CopyC#

    false

.

For more information, go to Protecting a Job Flow from Termination in the Amazon Elastic MapReduce Developer's Guide.

Declaration Syntax

C#

    SetTerminationProtectionResponse SetTerminationProtection(
    	SetTerminationProtectionRequest request
    )

Parameters

request (SetTerminationProtectionRequest)
  Container for the necessary parameters to execute the SetTerminationProtection service method.

Return Value
The response from the SetTerminationProtection service method, as returned by ElasticMapReduce.
Exceptions

Exception | Condition
--- | ---
InternalServerErrorException | Indicates that an error occurred while processing the request and that the request was not completed.

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)