Skip to main content

access_grants

Creates, updates, deletes or gets an access_grant resource or lists access_grants in a region

Overview

Nameaccess_grants
TypeResource
DescriptionThe AWS::S3::AccessGrant resource is an Amazon S3 resource type representing permissions to a specific S3 bucket or prefix hosted in an S3 Access Grants instance.
Idawscc.s3.access_grants

Fields

NameDatatypeDescription
access_grant_idstringThe ID assigned to this access grant.
access_grants_location_idstringThe custom S3 location to be accessed by the grantee
tagsarray
permissionstringThe level of access to be afforded to the grantee
application_arnstringThe ARN of the application grantees will use to access the location
s3_prefix_typestringThe type of S3SubPrefix.
grant_scopestringThe S3 path of the data to which you are granting access. It is a combination of the S3 path of the registered location and the subprefix.
access_grant_arnstringThe Amazon Resource Name (ARN) of the specified access grant.
granteeobjectThe principal who will be granted permission to access S3.
access_grants_location_configurationobjectThe configuration options of the grant location, which is the S3 path to the data to which you are granting access.
regionstringAWS region.

For more information, see AWS::S3::AccessGrant.

Methods

NameResourceAccessible byRequired Params
create_resourceaccess_grantsINSERTGrantee, Permission, AccessGrantsLocationId, region
delete_resourceaccess_grantsDELETEIdentifier, region
update_resourceaccess_grantsUPDATEIdentifier, PatchDocument, region
list_resourcesaccess_grants_list_onlySELECTregion
get_resourceaccess_grantsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual access_grant.

SELECT
region,
access_grant_id,
access_grants_location_id,
tags,
permission,
application_arn,
s3_prefix_type,
grant_scope,
access_grant_arn,
grantee,
access_grants_location_configuration
FROM awscc.s3.access_grants
WHERE
region = 'us-east-1' AND
Identifier = '{{ access_grant_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new access_grant resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.s3.access_grants (
AccessGrantsLocationId,
Permission,
Grantee,
region
)
SELECT
'{{ access_grants_location_id }}',
'{{ permission }}',
'{{ grantee }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a access_grant resource, using stack-deploy.

/*+ update */
UPDATE awscc.s3.access_grants
SET PatchDocument = string('{{ {
"AccessGrantsLocationId": access_grants_location_id,
"Permission": permission,
"ApplicationArn": application_arn,
"Grantee": grantee,
"AccessGrantsLocationConfiguration": access_grants_location_configuration
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ access_grant_id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.s3.access_grants
WHERE
Identifier = '{{ access_grant_id }}' AND
region = 'us-east-1';

Permissions

To operate on the access_grants resource, the following permissions are required:

s3:CreateAccessGrant,
s3:TagResource