CfnAccessGrantProps

class aws_cdk.aws_s3.CfnAccessGrantProps(*, access_grants_location_id, grantee, permission, access_grants_location_configuration=None, application_arn=None, s3_prefix_type=None, tags=None)

Bases: object

Properties for defining a CfnAccessGrant.

Parameters:
  • access_grants_location_id (str) – The ID of the registered location to which you are granting access. 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.

  • grantee (Union[IResolvable, GranteeProperty, Dict[str, Any]]) – The user, group, or role to which you are granting access. 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.

  • permission (str) – The type of access that you are granting 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.

  • access_grants_location_configuration (Union[IResolvable, AccessGrantsLocationConfigurationProperty, Dict[str, Any], None]) – The configuration options of the grant location. 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.

  • application_arn (Optional[str]) – 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.

  • s3_prefix_type (Optional[str]) – The type of S3SubPrefix . 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.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – The AWS resource tags that you are adding to the access grant. 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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accessgrant.html

ExampleMetadata:

fixture=_generated

Example:

# 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"
    )]
)

Attributes

access_grants_location_configuration

The configuration options of the grant location.

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accessgrant.html#cfn-s3-accessgrant-accessgrantslocationconfiguration

access_grants_location_id

The ID of the registered location to which you are granting access.

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accessgrant.html#cfn-s3-accessgrant-accessgrantslocationid

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accessgrant.html#cfn-s3-accessgrant-applicationarn

grantee

The user, group, or role to which you are granting access.

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accessgrant.html#cfn-s3-accessgrant-grantee

permission
  • 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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accessgrant.html#cfn-s3-accessgrant-permission

Type:

The type of access that you are granting to your S3 data, which can be set to one of the following values

s3_prefix_type

The type of S3SubPrefix .

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accessgrant.html#cfn-s3-accessgrant-s3prefixtype

tags

The AWS resource tags that you are adding to the access grant.

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accessgrant.html#cfn-s3-accessgrant-tags