@SdkInternalApi
    final PutAutoTerminationPolicyResult executePutAutoTerminationPolicy(PutAutoTerminationPolicyRequest putAutoTerminationPolicyRequest) {

        ExecutionContext executionContext = createExecutionContext(putAutoTerminationPolicyRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<PutAutoTerminationPolicyRequest> request = null;
        Response<PutAutoTerminationPolicyResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new PutAutoTerminationPolicyRequestProtocolMarshaller(protocolFactory).marshall(super
                        .beforeMarshalling(putAutoTerminationPolicyRequest));
                // Binds the request metrics to the current request.
                request.setAWSRequestMetrics(awsRequestMetrics);
                request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
                request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
                request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
                request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EMR");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutAutoTerminationPolicy");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

            } finally {
                awsRequestMetrics.endEvent(Field.RequestMarshallTime);
            }

            HttpResponseHandler<AmazonWebServiceResponse<PutAutoTerminationPolicyResult>> responseHandler = protocolFactory.createResponseHandler(
                    new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
                    new PutAutoTerminationPolicyResultJsonUnmarshaller());
            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<note>
<p>
Auto-termination is supported in Amazon EMR releases 5.30.0 and 6.1.0 and later. For more information, see <a
href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-auto-termination-policy.html">Using an
auto-termination policy</a>.
</p>
</note>
<p>
Creates or updates an auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the
amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster
termination options, see <a
href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-termination.html">Control cluster
termination</a>.
</p>

@param putAutoTerminationPolicyRequest
@return Result of the PutAutoTerminationPolicy operation returned by the service.
@sample AmazonElasticMapReduce.PutAutoTerminationPolicy
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutAutoTerminationPolicy"
     target="_top">AWS API Documentation</a>
aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/AmazonElasticMapReduceClient.java