GetAccessGrant - 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).

GetAccessGrant

Get the details of an access grant from your S3 Access Grants instance.

Permissions

You must have the s3:GetAccessGrant permission to use this operation.

Request Syntax

GET /v20180820/accessgrantsinstance/grant/id HTTP/1.1 Host: s3-control.amazonaws.com.cn x-amz-account-id: AccountId

URI Request Parameters

The request uses the following URI parameters.

id

The ID of the access grant. S3 Access Grants auto-generates this ID when you create the access grant.

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9\-]+

Required: Yes

x-amz-account-id

The ID of the Amazon account that is making this request.

Length Constraints: Maximum length of 64.

Pattern: ^\d{12}$

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 <?xml version="1.0" encoding="UTF-8"?> <GetAccessGrantResult> <CreatedAt>timestamp</CreatedAt> <AccessGrantId>string</AccessGrantId> <AccessGrantArn>string</AccessGrantArn> <Grantee> <GranteeIdentifier>string</GranteeIdentifier> <GranteeType>string</GranteeType> </Grantee> <Permission>string</Permission> <AccessGrantsLocationId>string</AccessGrantsLocationId> <AccessGrantsLocationConfiguration> <S3SubPrefix>string</S3SubPrefix> </AccessGrantsLocationConfiguration> <GrantScope>string</GrantScope> <ApplicationArn>string</ApplicationArn> </GetAccessGrantResult>

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

GetAccessGrantResult

Root level tag for the GetAccessGrantResult parameters.

Required: Yes

AccessGrantArn

The Amazon Resource Name (ARN) of the access grant.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: arn:[a-z\-]+:s3:[a-z0-9\-]+:\d{12}:access\-grants\/grant/[a-zA-Z0-9\-]+

AccessGrantId

The ID of the access grant. S3 Access Grants auto-generates this ID when you create the access grant.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9\-]+

AccessGrantsLocationConfiguration

The configuration options of the grant location. The grant location is the S3 path to the data to which you are granting access.

Type: AccessGrantsLocationConfiguration data type

AccessGrantsLocationId

The ID of the registered location to which you are granting access. S3 Access Grants assigns this ID when you register the location. S3 Access Grants assigns the ID default to the default location s3:// and assigns an auto-generated ID to other locations that you register.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9\-]+

ApplicationArn

The Amazon Resource Name (ARN) of an Amazon IAM Identity Center application associated with your Identity Center instance. If the grant includes an application ARN, the grantee can only access the S3 data through this application.

Type: String

Length Constraints: Minimum length of 10. Maximum length of 1224.

Pattern: arn:[^:]+:sso:.*$

CreatedAt

The date and time when you created the access grant.

Type: Timestamp

Grantee

The user, group, or role to which you are granting access. You can grant access to an IAM user or role. If you have added a corporate directory to Amazon IAM Identity Center and associated this Identity Center instance with the S3 Access Grants instance, the grantee can also be a corporate directory user or group.

Type: Grantee data type

GrantScope

The S3 path of the data to which you are granting access. It is the result of appending the Subprefix to the location scope.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2000.

Pattern: ^.+$

Permission

The type of permission that was granted in the access grant. Can be one of the following values:

  • READ – Grant read-only access to the S3 data.

  • WRITE – Grant write-only access to the S3 data.

  • READWRITE – Grant both read and write access to the S3 data.

Type: String

Valid Values: READ | WRITE | READWRITE

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: