View the details of an S3 Access Grants instance - Amazon Simple Storage Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

View the details of an S3 Access Grants instance

You can view the details of your Amazon S3 Access Grants instance in a particular Amazon Web Services Region. You can also list your S3 Access Grants instances, including the instances that have been shared with you through Amazon Resource Access Manager (Amazon RAM).

You can view the details of your S3 Access Grants instance or list your S3 Access Grants instances by using the Amazon S3 console, the Amazon Command Line Interface (Amazon CLI), the Amazon S3 REST API, and the Amazon SDKs.

To view an S3 Access Grants instance
  1. Sign in to the Amazon Web Services Management Console and open the Amazon S3 console at https://console.amazonaws.cn/s3/.

  2. In the left navigation pane, choose Access Grants.

  3. On the S3 Access Grants page, choose the Region that contains the S3 Access Grants instance that you want to work with.

  4. The S3 Access Grants page lists your S3 Access Grants instances and any cross-account instances that have been shared with your account. To view the details of an instance, choose View details.

To install the Amazon CLI, see Installing the Amazon CLI in the Amazon Command Line Interface User Guide.

To use the following example command, replace the user input placeholders with your own information.

Example – Get the details of an S3 Access Grants instance
aws s3control get-access-grants-instance \ --account-id 111122223333 \ --region us-east-2

Response:

{ "AccessGrantsInstanceArn": "arn:aws-cn:s3:us-east-2: 111122223333:access-grants/default", "AccessGrantsInstanceId": "default", "CreatedAt": "2023-05-31T17:54:07.893000+00:00" }
Example – List all S3 Access Grants instances for an account

This action lists the S3 Access Grants instances for an account. You can only have one S3 Access Grants instance per Amazon Web Services Region. This action also lists other cross-account S3 Access Grants instances that your account has access to.

aws s3control list-access-grants-instances \ --account-id 111122223333 \ --region us-east-2

Response:

{ "AccessGrantsInstanceArn": "arn:aws-cn:s3:us-east-2: 111122223333:access-grants/default", "AccessGrantsInstanceId": "default", "CreatedAt": "2023-05-31T17:54:07.893000+00:00" }

For information about the Amazon S3 REST API support for managing an S3 Access Grants instance, see the following sections in the Amazon Simple Storage Service API Reference:

This section provides examples of how to get the details of an S3 Access Grants instance by using the Amazon SDKs.

To use the following examples, replace the user input placeholders with your own information.

Java
Example – Get an S3 Access Grants instance
public void getAccessGrantsInstance() { GetAccessGrantsInstanceRequest getRequest = GetAccessGrantsInstanceRequest.builder() .accountId("111122223333") .build(); GetAccessGrantsInstanceResponse getResponse = s3Control.getAccessGrantsInstance(getRequest); LOGGER.info("GetAccessGrantsInstanceResponse: " + getResponse); }

Response:

GetAccessGrantsInstanceResponse( AccessGrantsInstanceArn=arn:aws-cn:s3:us-east-2: 111122223333:access-grants/default, CreatedAt=2023-06-07T01:46:20.507Z)
Example – List all S3 Access Grants instances for an account

This action lists the S3 Access Grants instances for an account. You can only have one S3 Access Grants instance per Region. This action can also list other cross-account S3 Access Grants instances that your account has access to.

public void listAccessGrantsInstances() { ListAccessGrantsInstancesRequest listRequest = ListAccessGrantsInstancesRequest.builder() .accountId("111122223333") .build(); ListAccessGrantsInstancesResponse listResponse = s3Control.listAccessGrantsInstances(listRequest); LOGGER.info("ListAccessGrantsInstancesResponse: " + listResponse); }

Response:

ListAccessGrantsInstancesResponse( AccessGrantsInstancesList=[ ListAccessGrantsInstanceEntry( AccessGrantsInstanceId=default, AccessGrantsInstanceArn=arn:aws-cn:s3:us-east-2:111122223333:access-grants/default, CreatedAt=2023-06-07T04:28:11.728Z ) ] )