CfnAccessGrantProps Struct
Properties for defining a CfnAccessGrant.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_s3 as s3 } from 'aws-cdk-lib';
const cfnAccessGrantProps: s3.CfnAccessGrantProps = {
accessGrantsLocationId: 'accessGrantsLocationId',
grantee: {
granteeIdentifier: 'granteeIdentifier',
granteeType: 'granteeType',
},
permission: 'permission',
// the properties below are optional
accessGrantsLocationConfiguration: {
s3SubPrefix: 's3SubPrefix',
},
applicationArn: 'applicationArn',
s3PrefixType: 's3PrefixType',
tags: [{
key: 'key',
value: 'value',
}],
};
Properties
accessGrantsLocationConfigurationoptionalIResolvable | CfnAccessGrant.AccessGrantsLocationConfigurationPropertyaccess_grants_location_configurationoptionaltyping.Union[IResolvable, AccessGrantsLocationConfigurationProperty]accessGrantsLocationConfigurationoptionalIResolvableAccessGrantsLocationConfigurationoptionalIResolvableAccessGrantsLocationConfigurationoptionalinterface{}#The grant location is the S3 path to the data to which you are granting access. It contains the S3SubPrefix field. The grant scope is the result of appending the subprefix to the location scope of the registered location.
accessGrantsLocationIdstringaccess_grants_location_idstraccessGrantsLocationIdStringAccessGrantsLocationIdstringAccessGrantsLocationId*stringrequired#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.
applicationArnoptionalstringapplication_arnoptionalstrapplicationArnoptionalStringApplicationArnoptionalstringApplicationArnoptional*string#If the grant includes an application ARN, the grantee can only access the S3 data through this application.
granteeIResolvable | CfnAccessGrant.GranteePropertygranteetyping.Union[IResolvable, GranteeProperty]granteeIResolvableGranteeIResolvableGranteeinterface{}required#notes
You can grant access to an IAM user or role. If you have added your corporate directory to AWS IAM Identity Center and associated your Identity Center instance with your S3 Access Grants instance, the grantee can also be a corporate directory user or group.
WRITE– Grant write-only access to the S3 data.READWRITE– Grant both read and write access to the S3 data.
s3PrefixTypeoptionalstrings3_prefix_typeoptionalstrs3PrefixTypeoptionalStringS3PrefixTypeoptionalstringS3PrefixTypeoptional*string#The only possible value is Object . Pass this value if the access grant scope is an object. Do not pass this value if the access grant scope is a bucket or a bucket and a prefix.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.