caller_access_grants
Creates, updates, deletes, gets or lists a caller_access_grants resource.
Overview
| Name | caller_access_grants |
| Type | Resource |
| Id | aws.s3control.caller_access_grants |
Fields
The following fields are returned by SELECT queries:
- list_caller_access_grants
| Name | Datatype | Description |
|---|---|---|
application_arn | string | The Amazon Resource Name (ARN) of an Amazon Web Services 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. |
grant_scope | string | The S3 path of the data to which you have been granted access. |
permission | string | The type of permission granted, which can be one of the following values: READ - Grants read-only access to the S3 data. WRITE - Grants write-only access to the S3 data. READWRITE - Grants both read and write access to the S3 data. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_caller_access_grants | select | x-amz-account-id, region | grantscope, nextToken, maxResults, allowedByApplication | Use this API to list the access grants that grant the caller access to Amazon S3 data through S3 Access Grants. The caller (grantee) can be an Identity and Access Management (IAM) identity or Amazon Web Services Identity Center corporate directory identity. You must pass the Amazon Web Services account of the S3 data owner (grantor) in the request. You can, optionally, narrow the results by GrantScope, using a fragment of the data's S3 path, and S3 Access Grants will return only the grants with a path that contains the path fragment. You can also pass the AllowedByApplication filter in the request, which returns only the grants authorized for applications, whether the application is the caller's Identity Center application or any other application (ALL). For more information, see List the caller's access grants in the Amazon S3 User Guide. Permissions You must have the s3:ListCallerAccessGrants permission to use this operation. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
x-amz-account-id | string | The Amazon Web Services account ID of the S3 Access Grants instance. |
allowedByApplication | boolean | If this optional parameter is passed in the request, a filter is applied to the results. The results will include only the access grants for the caller's Identity Center application or for any other applications (ALL). |
grantscope | string | The S3 path of the data that you would like to access. Must start with s3://. You can optionally pass only the beginning characters of a path, and S3 Access Grants will search for all applicable grants for the path fragment. |
maxResults | integer | The maximum number of access grants that you would like returned in the List Caller Access Grants response. If the results include the pagination token NextToken, make another call using the NextToken to determine if there are more results. |
nextToken | string | A pagination token to request the next page of results. Pass this value into a subsequent List Caller Access Grants request in order to retrieve the next page of results. |
SELECT examples
- list_caller_access_grants
Use this API to list the access grants that grant the caller access to Amazon S3 data through S3 Access Grants. The caller (grantee) can be an Identity and Access Management (IAM) identity or Amazon Web Services Identity Center corporate directory identity. You must pass the Amazon Web Services account of the S3 data owner (grantor) in the request. You can, optionally, narrow the results by GrantScope, using a fragment of the data's S3 path, and S3 Access Grants will return only the grants with a path that contains the path fragment. You can also pass the AllowedByApplication filter in the request, which returns only the grants authorized for applications, whether the application is the caller's Identity Center application or any other application (ALL). For more information, see List the caller's access grants in the Amazon S3 User Guide. Permissions You must have the s3:ListCallerAccessGrants permission to use this operation.
SELECT
application_arn,
grant_scope,
permission
FROM aws.s3control.caller_access_grants
WHERE `x-amz-account-id` = '{{ x-amz-account-id }}' -- required
AND region = '{{ region }}' -- required
AND grantscope = '{{ grantscope }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
AND allowedByApplication = '{{ allowedByApplication }}'
;