@SdkInternalApi
    final DeleteContinuousDeploymentPolicyResult executeDeleteContinuousDeploymentPolicy(
            DeleteContinuousDeploymentPolicyRequest deleteContinuousDeploymentPolicyRequest) {

        ExecutionContext executionContext = createExecutionContext(deleteContinuousDeploymentPolicyRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<DeleteContinuousDeploymentPolicyRequest> request = null;
        Response<DeleteContinuousDeploymentPolicyResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new DeleteContinuousDeploymentPolicyRequestMarshaller().marshall(super.beforeMarshalling(deleteContinuousDeploymentPolicyRequest));
                // 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, "CloudFront");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteContinuousDeploymentPolicy");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

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

            StaxResponseHandler<DeleteContinuousDeploymentPolicyResult> responseHandler = new StaxResponseHandler<DeleteContinuousDeploymentPolicyResult>(
                    new DeleteContinuousDeploymentPolicyResultStaxUnmarshaller());

            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Deletes a continuous deployment policy.
</p>
<p>
You cannot delete a continuous deployment policy that's attached to a primary distribution. First update your
distribution to remove the continuous deployment policy, then you can delete the policy.
</p>

@param deleteContinuousDeploymentPolicyRequest
@return Result of the DeleteContinuousDeploymentPolicy operation returned by the service.
@throws InvalidIfMatchVersionException
        The <code>If-Match</code> version is missing or not valid.
@throws InvalidArgumentException
        An argument is invalid.
@throws AccessDeniedException
        Access denied.
@throws PreconditionFailedException
        The precondition in one or more of the request fields evaluated to <code>false</code>.
@throws ContinuousDeploymentPolicyInUseException
        You cannot delete a continuous deployment policy that is associated with a primary distribution.
@throws NoSuchContinuousDeploymentPolicyException
        The continuous deployment policy doesn't exist.
@sample AmazonCloudFront.DeleteContinuousDeploymentPolicy
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteContinuousDeploymentPolicy"
     target="_top">AWS API Documentation</a>
aws-java-sdk-cloudfront/src/main/java/com/amazonaws/services/cloudfront/AmazonCloudFrontClient.java