@SdkInternalApi
    final DeleteAccessGrantsInstanceResourcePolicyResult executeDeleteAccessGrantsInstanceResourcePolicy(
            DeleteAccessGrantsInstanceResourcePolicyRequest deleteAccessGrantsInstanceResourcePolicyRequest) {

        ExecutionContext executionContext = createExecutionContext(deleteAccessGrantsInstanceResourcePolicyRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<DeleteAccessGrantsInstanceResourcePolicyRequest> request = null;
        Response<DeleteAccessGrantsInstanceResourcePolicyResult> response = null;

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

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

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

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

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

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

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

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Deletes the resource policy of the S3 Access Grants instance. The resource policy is used to manage cross-account
access to your S3 Access Grants instance. By deleting the resource policy, you delete any cross-account
permissions to your S3 Access Grants instance.
</p>
<dl>
<dt>Permissions</dt>
<dd>
<p>
You must have the <code>s3:DeleteAccessGrantsInstanceResourcePolicy</code> permission to use this operation.
</p>
</dd>
</dl>

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