@SdkInternalApi
    final SetDataRetrievalPolicyResult executeSetDataRetrievalPolicy(SetDataRetrievalPolicyRequest setDataRetrievalPolicyRequest) {

        ExecutionContext executionContext = createExecutionContext(setDataRetrievalPolicyRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<SetDataRetrievalPolicyRequest> request = null;
        Response<SetDataRetrievalPolicyResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new SetDataRetrievalPolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(setDataRetrievalPolicyRequest));
                // 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, "Glacier");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SetDataRetrievalPolicy");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

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

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

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
This operation sets and then enacts a data retrieval policy in the region specified in the PUT request. You can
set one policy per region for an AWS account. The policy is enacted within a few minutes of a successful PUT
operation.
</p>
<p>
The set policy operation does not affect retrieval jobs that were in progress before the policy was enacted. For
more information about data retrieval policies, see <a
href="https://docs.aws.amazon.com/amazonglacier/latest/dev/data-retrieval-policy.html">Amazon Glacier Data
Retrieval Policies</a>.
</p>

@param setDataRetrievalPolicyRequest
       SetDataRetrievalPolicy input.
@return Result of the SetDataRetrievalPolicy operation returned by the service.
@throws InvalidParameterValueException
        Returned if a parameter of the request is incorrectly specified.
@throws MissingParameterValueException
        Returned if a required header or parameter is missing from the request.
@throws ServiceUnavailableException
        Returned if the service cannot complete the request.
@sample AmazonGlacier.SetDataRetrievalPolicy
aws-java-sdk-glacier/src/main/java/com/amazonaws/services/glacier/AmazonGlacierClient.java