/AWS1/CL_EMR=>SETTERMINATIONPROTECTION()
¶
About SetTerminationProtection¶
SetTerminationProtection 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.
Method Signature¶
IMPORTING¶
Required arguments:¶
it_jobflowids
TYPE /AWS1/CL_EMRXMLSTRINGLIST_W=>TT_XMLSTRINGLIST
TT_XMLSTRINGLIST
¶
A list of strings that uniquely identify the clusters to protect. This identifier is returned by RunJobFlow and can also be obtained from DescribeJobFlows .
iv_terminationprotected
TYPE /AWS1/EMRBOOLEAN
/AWS1/EMRBOOLEAN
¶
A Boolean that indicates whether to protect the cluster and prevent the Amazon EC2 instances in the cluster from shutting down due to API calls, user intervention, or job-flow error.
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
lo_client->/aws1/if_emr~setterminationprotection(
it_jobflowids = VALUE /aws1/cl_emrxmlstringlist_w=>tt_xmlstringlist(
( new /aws1/cl_emrxmlstringlist_w( |string| ) )
)
iv_terminationprotected = ABAP_TRUE
).