@SdkInternalApi
    final GetAccessGrantsInstanceResult executeGetAccessGrantsInstance(GetAccessGrantsInstanceRequest getAccessGrantsInstanceRequest) {

        ExecutionContext executionContext = createExecutionContext(getAccessGrantsInstanceRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<GetAccessGrantsInstanceRequest> request = null;
        Response<GetAccessGrantsInstanceResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new GetAccessGrantsInstanceRequestMarshaller().marshall(super.beforeMarshalling(getAccessGrantsInstanceRequest));
                // 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, "S3 Control");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetAccessGrantsInstance");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

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

            URI endpointTraitHost = null;
            if (!clientConfiguration.isDisableHostPrefixInjection()) {
                ValidationUtils.assertStringNotEmpty(getAccessGrantsInstanceRequest.getAccountId(), "AccountId");
                HostnameValidator.validateHostnameCompliant(getAccessGrantsInstanceRequest.getAccountId(), "AccountId", "getAccessGrantsInstanceRequest");

                String hostPrefix = "{AccountId}.";
                String resolvedHostPrefix = String.format("%s.", getAccessGrantsInstanceRequest.getAccountId());

                endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
            }

            StaxResponseHandler<GetAccessGrantsInstanceResult> responseHandler = new com.amazonaws.services.s3control.internal.S3ControlStaxResponseHandler<GetAccessGrantsInstanceResult>(
                    new GetAccessGrantsInstanceResultStaxUnmarshaller());

            response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Retrieves the S3 Access Grants instance for a Region in your account.
</p>
<dl>
<dt>Permissions</dt>
<dd>
<p>
You must have the <code>s3:GetAccessGrantsInstance</code> permission to use this operation.
</p>
</dd>
</dl>

@param getAccessGrantsInstanceRequest
@return Result of the GetAccessGrantsInstance operation returned by the service.
@sample AWSS3Control.GetAccessGrantsInstance
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/GetAccessGrantsInstance"
     target="_top">AWS API Documentation</a>
aws-java-sdk-s3control/src/main/java/com/amazonaws/services/s3control/AWSS3ControlClient.java