@SdkInternalApi
    final AssociateUserToPermissionGroupResult executeAssociateUserToPermissionGroup(AssociateUserToPermissionGroupRequest associateUserToPermissionGroupRequest) {

        ExecutionContext executionContext = createExecutionContext(associateUserToPermissionGroupRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<AssociateUserToPermissionGroupRequest> request = null;
        Response<AssociateUserToPermissionGroupResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new AssociateUserToPermissionGroupRequestProtocolMarshaller(protocolFactory).marshall(super
                        .beforeMarshalling(associateUserToPermissionGroupRequest));
                // 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, "finspace data");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AssociateUserToPermissionGroup");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

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

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

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Adds a user to a permission group to grant permissions for actions a user can perform in FinSpace.
</p>

@param associateUserToPermissionGroupRequest
@return Result of the AssociateUserToPermissionGroup operation returned by the service.
@throws InternalServerException
        The request processing has failed because of an unknown error, exception or failure.
@throws ValidationException
        The input fails to satisfy the constraints specified by an AWS service.
@throws ThrottlingException
        The request was denied due to request throttling.
@throws AccessDeniedException
        You do not have sufficient access to perform this action.
@throws ResourceNotFoundException
        One or more resources can't be found.
@throws ConflictException
        The request conflicts with an existing resource.
@sample AWSFinSpaceData.AssociateUserToPermissionGroup
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/finspace-2020-07-13/AssociateUserToPermissionGroup"
     target="_top">AWS API Documentation</a>
aws-java-sdk-finspacedata/src/main/java/com/amazonaws/services/finspacedata/AWSFinSpaceDataClient.java