CfnAccessGrantProps Struct
Properties for defining a CfnAccessGrant.
| Source | |
|---|---|
| Type last changed |
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',
}],
};
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_s3 as s3
cfn_access_grant_props = s3.CfnAccessGrantProps(
access_grants_location_id="accessGrantsLocationId",
grantee=s3.CfnAccessGrant.GranteeProperty(
grantee_identifier="granteeIdentifier",
grantee_type="granteeType"
),
permission="permission",
# the properties below are optional
access_grants_location_configuration=s3.CfnAccessGrant.AccessGrantsLocationConfigurationProperty(
s3_sub_prefix="s3SubPrefix"
),
application_arn="applicationArn",
s3_prefix_type="s3PrefixType",
tags=[CfnTag(
key="key",
value="value"
)]
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.s3.*;
CfnAccessGrantProps cfnAccessGrantProps = CfnAccessGrantProps.builder()
.accessGrantsLocationId("accessGrantsLocationId")
.grantee(GranteeProperty.builder()
.granteeIdentifier("granteeIdentifier")
.granteeType("granteeType")
.build())
.permission("permission")
// the properties below are optional
.accessGrantsLocationConfiguration(AccessGrantsLocationConfigurationProperty.builder()
.s3SubPrefix("s3SubPrefix")
.build())
.applicationArn("applicationArn")
.s3PrefixType("s3PrefixType")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3;
var cfnAccessGrantProps = new CfnAccessGrantProps {
AccessGrantsLocationId = "accessGrantsLocationId",
Grantee = new GranteeProperty {
GranteeIdentifier = "granteeIdentifier",
GranteeType = "granteeType"
},
Permission = "permission",
// the properties below are optional
AccessGrantsLocationConfiguration = new AccessGrantsLocationConfigurationProperty {
S3SubPrefix = "s3SubPrefix"
},
ApplicationArn = "applicationArn",
S3PrefixType = "s3PrefixType",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnAccessGrantProps := &CfnAccessGrantProps{
AccessGrantsLocationId: jsii.String("accessGrantsLocationId"),
Grantee: &GranteeProperty{
GranteeIdentifier: jsii.String("granteeIdentifier"),
GranteeType: jsii.String("granteeType"),
},
Permission: jsii.String("permission"),
// the properties below are optional
AccessGrantsLocationConfiguration: &AccessGrantsLocationConfigurationProperty{
S3SubPrefix: jsii.String("s3SubPrefix"),
},
ApplicationArn: jsii.String("applicationArn"),
S3PrefixType: jsii.String("s3PrefixType"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
accessGrantsLocationConfigurationoptionalIResolvable | CfnAccessGrant.access_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*string required #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.