@SdkInternalApi
    final CreateContinuousDeploymentPolicyResult executeCreateContinuousDeploymentPolicy(
            CreateContinuousDeploymentPolicyRequest createContinuousDeploymentPolicyRequest) {

        ExecutionContext executionContext = createExecutionContext(createContinuousDeploymentPolicyRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<CreateContinuousDeploymentPolicyRequest> request = null;
        Response<CreateContinuousDeploymentPolicyResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new CreateContinuousDeploymentPolicyRequestMarshaller().marshall(super.beforeMarshalling(createContinuousDeploymentPolicyRequest));
                // 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, "CreateContinuousDeploymentPolicy");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

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

            StaxResponseHandler<CreateContinuousDeploymentPolicyResult> responseHandler = new StaxResponseHandler<CreateContinuousDeploymentPolicyResult>(
                    new CreateContinuousDeploymentPolicyResultStaxUnmarshaller());

            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Creates a continuous deployment policy that distributes traffic for a custom domain name to two different
CloudFront distributions.
</p>
<p>
To use a continuous deployment policy, first use <code>CopyDistribution</code> to create a staging distribution,
then use <code>UpdateDistribution</code> to modify the staging distribution's configuration.
</p>
<p>
After you create and update a staging distribution, you can use a continuous deployment policy to incrementally
move traffic to the staging distribution. This workflow enables you to test changes to a distribution's
configuration before moving all of your domain's production traffic to the new configuration.
</p>

@param createContinuousDeploymentPolicyRequest
@return Result of the CreateContinuousDeploymentPolicy operation returned by the service.
@throws AccessDeniedException
        Access denied.
@throws InvalidArgumentException
        An argument is invalid.
@throws InconsistentQuantitiesException
        The value of <code>Quantity</code> and the size of <code>Items</code> don't match.
@throws ContinuousDeploymentPolicyAlreadyExistsException
        A continuous deployment policy with this configuration already exists.
@throws TooManyContinuousDeploymentPoliciesException
        You have reached the maximum number of continuous deployment policies for this Amazon Web Services
        account.
@throws StagingDistributionInUseException
        A continuous deployment policy for this staging distribution already exists.
@sample AmazonCloudFront.CreateContinuousDeploymentPolicy
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateContinuousDeploymentPolicy"
     target="_top">AWS API Documentation</a>
aws-java-sdk-cloudfront/src/main/java/com/amazonaws/services/cloudfront/AmazonCloudFrontClient.java