@SdkInternalApi
    final AssociateCustomDomainResult executeAssociateCustomDomain(AssociateCustomDomainRequest associateCustomDomainRequest) {

        ExecutionContext executionContext = createExecutionContext(associateCustomDomainRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<AssociateCustomDomainRequest> request = null;
        Response<AssociateCustomDomainResult> response = null;

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

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

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

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Associate your own domain name with the App Runner subdomain URL of your App Runner service.
</p>
<p>
After you call <code>AssociateCustomDomain</code> and receive a successful response, use the information in the
<a>CustomDomain</a> record that's returned to add CNAME records to your Domain Name System (DNS). For each mapped
domain name, add a mapping to the target App Runner subdomain and one or more certificate validation records. App
Runner then performs DNS validation to verify that you own or control the domain name that you associated. App
Runner tracks domain validity in a certificate stored in <a
href="https://docs.aws.amazon.com/acm/latest/userguide">AWS Certificate Manager (ACM)</a>.
</p>

@param associateCustomDomainRequest
@return Result of the AssociateCustomDomain operation returned by the service.
@throws InvalidRequestException
        One or more input parameters aren't valid. Refer to the API action's document page, correct the input
        parameters, and try the action again.
@throws InternalServiceErrorException
        An unexpected service exception occurred.
@throws InvalidStateException
        You can't perform this action when the resource is in its current state.
@sample AWSAppRunner.AssociateCustomDomain
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/apprunner-2020-05-15/AssociateCustomDomain"
     target="_top">AWS API Documentation</a>
aws-java-sdk-apprunner/src/main/java/com/amazonaws/services/apprunner/AWSAppRunnerClient.java