@SdkInternalApi
    final PutIntegrationResult executePutIntegration(PutIntegrationRequest putIntegrationRequest) {

        ExecutionContext executionContext = createExecutionContext(putIntegrationRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<PutIntegrationRequest> request = null;
        Response<PutIntegrationResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new PutIntegrationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putIntegrationRequest));
                // 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, "Customer Profiles");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutIntegration");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

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

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

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Adds an integration between the service and a third-party service, which includes Amazon AppFlow and Amazon
Connect.
</p>
<p>
An integration can belong to only one domain.
</p>
<p>
To add or remove tags on an existing Integration, see <a
href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_TagResource.html"> TagResource </a>/<a
href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_UntagResource.html">
UntagResource</a>.
</p>

@param putIntegrationRequest
@return Result of the PutIntegration operation returned by the service.
@throws BadRequestException
        The input you provided is invalid.
@throws ResourceNotFoundException
        The requested resource does not exist, or access was denied.
@throws AccessDeniedException
        You do not have sufficient access to perform this action.
@throws ThrottlingException
        You exceeded the maximum number of requests.
@throws InternalServerException
        An internal service error occurred.
@sample AmazonCustomerProfiles.PutIntegration
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/customer-profiles-2020-08-15/PutIntegration"
     target="_top">AWS API Documentation</a>
aws-java-sdk-customerprofiles/src/main/java/com/amazonaws/services/customerprofiles/AmazonCustomerProfilesClient.java