@SdkInternalApi
    final AssociateApiResult executeAssociateApi(AssociateApiRequest associateApiRequest) {

        ExecutionContext executionContext = createExecutionContext(associateApiRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<AssociateApiRequest> request = null;
        Response<AssociateApiResult> response = null;

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

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

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

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Maps an endpoint to your custom domain.
</p>

@param associateApiRequest
@return Result of the AssociateApi operation returned by the service.
@throws AccessDeniedException
        You don't have access to perform this operation on this resource.
@throws BadRequestException
        The request is not well formed. For example, a value is invalid or a required field is missing. Check the
        field values, and then try again.
@throws InternalFailureException
        An internal AppSync error occurred. Try your request again.
@throws NotFoundException
        The resource specified in the request was not found. Check the resource, and then try again.
@sample AWSAppSync.AssociateApi
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/AssociateApi" target="_top">AWS API
     Documentation</a>
aws-java-sdk-appsync/src/main/java/com/amazonaws/services/appsync/AWSAppSyncClient.java