@SdkInternalApi
    final DeleteAccessGrantsInstanceResult executeDeleteAccessGrantsInstance(DeleteAccessGrantsInstanceRequest deleteAccessGrantsInstanceRequest) {

        ExecutionContext executionContext = createExecutionContext(deleteAccessGrantsInstanceRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<DeleteAccessGrantsInstanceRequest> request = null;
        Response<DeleteAccessGrantsInstanceResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new DeleteAccessGrantsInstanceRequestMarshaller().marshall(super.beforeMarshalling(deleteAccessGrantsInstanceRequest));
                // 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, "DeleteAccessGrantsInstance");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

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

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

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

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

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

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

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Deletes your S3 Access Grants instance. You must first delete the access grants and locations before S3 Access
Grants can delete the instance. See <a
href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DeleteAccessGrant.html">DeleteAccessGrant</a>
and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DeleteAccessGrantsLocation.html">
DeleteAccessGrantsLocation</a>. If you have associated an IAM Identity Center instance with your S3 Access Grants
instance, you must first dissassociate the Identity Center instance from the S3 Access Grants instance before you
can delete the S3 Access Grants instance. See <a
href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_AssociateAccessGrantsIdentityCenter.html"
>AssociateAccessGrantsIdentityCenter</a> and <a
href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DissociateAccessGrantsIdentityCenter.html"
>DissociateAccessGrantsIdentityCenter</a>.
</p>
<dl>
<dt>Permissions</dt>
<dd>
<p>
You must have the <code>s3:DeleteAccessGrantsInstance</code> permission to use this operation.
</p>
</dd>
</dl>

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