ListAccessGrants
Returns the list of access grants in your S3 Access Grants instance.
- Permissions
-
You must have the
s3:ListAccessGrants
permission to use this operation.
Request Syntax
GET /v20180820/accessgrantsinstance/grants?application_arn=ApplicationArn
&granteeidentifier=GranteeIdentifier
&granteetype=GranteeType
&grantscope=GrantScope
&maxResults=MaxResults
&nextToken=NextToken
&permission=Permission
HTTP/1.1
Host: s3-control.amazonaws.com
x-amz-account-id: AccountId
URI Request Parameters
The request uses the following URI parameters.
- application_arn
-
The Amazon Resource Name (ARN) of an AWS 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.
Length Constraints: Minimum length of 10. Maximum length of 1224.
Pattern:
arn:[^:]+:sso::\d{12}:application/.*$
- granteeidentifier
-
The unique identifer of the
Grantee
. If the grantee type isIAM
, the identifier is the IAM Amazon Resource Name (ARN) of the user or role. If the grantee type is a directory user or group, the identifier is 128-bit universally unique identifier (UUID) in the formata1b2c3d4-5678-90ab-cdef-EXAMPLE11111
. You can obtain this UUID from your AWS IAM Identity Center instance. - granteetype
-
The type of the grantee to which access has been granted. It can be one of the following values:
-
IAM
- An IAM user or role. -
DIRECTORY_USER
- Your corporate directory user. You can use this option if you have added your corporate identity directory to IAM Identity Center and associated the IAM Identity Center instance with your S3 Access Grants instance. -
DIRECTORY_GROUP
- Your corporate directory group. You can use this option if you have added your corporate identity directory to IAM Identity Center and associated the IAM Identity Center instance with your S3 Access Grants instance.
Valid Values:
DIRECTORY_USER | DIRECTORY_GROUP | IAM
-
- 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.Length Constraints: Minimum length of 1. Maximum length of 2000.
Pattern:
^.+$
- maxResults
-
The maximum number of access grants that you would like returned in the
List Access Grants
response. If the results include the pagination tokenNextToken
, make another call using theNextToken
to determine if there are more results.Valid Range: Minimum value of 0. Maximum value of 1000.
- nextToken
-
A pagination token to request the next page of results. Pass this value into a subsequent
List Access Grants
request in order to retrieve the next page of results. - permission
-
The type of permission granted to your S3 data, which can be set to 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.
Valid Values:
READ | WRITE | READWRITE
-
- x-amz-account-id
-
The AWS account ID of the S3 Access Grants instance.
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"?>
<ListAccessGrantsResult>
<NextToken>string</NextToken>
<AccessGrantsList>
<AccessGrant>
<AccessGrantArn>string</AccessGrantArn>
<AccessGrantId>string</AccessGrantId>
<AccessGrantsLocationConfiguration>
<S3SubPrefix>string</S3SubPrefix>
</AccessGrantsLocationConfiguration>
<AccessGrantsLocationId>string</AccessGrantsLocationId>
<ApplicationArn>string</ApplicationArn>
<CreatedAt>timestamp</CreatedAt>
<Grantee>
<GranteeIdentifier>string</GranteeIdentifier>
<GranteeType>string</GranteeType>
</Grantee>
<GrantScope>string</GrantScope>
<Permission>string</Permission>
</AccessGrant>
</AccessGrantsList>
</ListAccessGrantsResult>
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.
- ListAccessGrantsResult
-
Root level tag for the ListAccessGrantsResult parameters.
Required: Yes
- AccessGrantsList
-
A container for a list of grants in an S3 Access Grants instance.
Type: Array of ListAccessGrantEntry data types
- NextToken
-
A pagination token to request the next page of results. Pass this value into a subsequent
List Access Grants
request in order to retrieve the next page of results.Type: String
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: