CfnBucketPropsMixin

class aws_cdk.mixins_preview.aws_s3.mixins.CfnBucketPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::S3::Bucket resource creates an Amazon S3 bucket in the same AWS Region where you create the AWS CloudFormation stack.

To control how AWS CloudFormation handles the bucket when the stack is deleted, you can set a deletion policy for your bucket. You can choose to retain the bucket or to delete the bucket. For more information, see DeletionPolicy Attribute . .. epigraph:

You can only delete empty buckets. Deletion fails for buckets that have contents.
See:

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

CloudformationResource:

AWS::S3::Bucket

Mixin:

true

ExampleMetadata:

infused

Example:

from aws_cdk.mixins_preview.with import


bucket = s3.Bucket(scope, "Bucket").with(CfnBucketPropsMixin(
    versioning_configuration=CfnBucketPropsMixin.VersioningConfigurationProperty(status="Enabled"),
    public_access_block_configuration=CfnBucketPropsMixin.PublicAccessBlockConfigurationProperty(
        block_public_acls=True,
        block_public_policy=True
    )
))

Create a mixin to apply properties to AWS::S3::Bucket.

Parameters:
  • props (Union[CfnBucketMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['abacStatus', 'accelerateConfiguration', 'accessControl', 'analyticsConfigurations', 'bucketEncryption', 'bucketName', 'corsConfiguration', 'intelligentTieringConfigurations', 'inventoryConfigurations', 'lifecycleConfiguration', 'loggingConfiguration', 'metadataConfiguration', 'metadataTableConfiguration', 'metricsConfigurations', 'notificationConfiguration', 'objectLockConfiguration', 'objectLockEnabled', 'ownershipControls', 'publicAccessBlockConfiguration', 'replicationConfiguration', 'tags', 'versioningConfiguration', 'websiteConfiguration']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

AbortIncompleteMultipartUploadProperty

class CfnBucketPropsMixin.AbortIncompleteMultipartUploadProperty(*, days_after_initiation=None)

Bases: object

Specifies the days since the initiation of an incomplete multipart upload that Amazon S3 will wait before permanently removing all parts of the upload.

For more information, see Stopping Incomplete Multipart Uploads Using a Bucket Lifecycle Policy in the Amazon S3 User Guide .

Parameters:

days_after_initiation (Union[int, float, None]) – Specifies the number of days after which Amazon S3 stops an incomplete multipart upload.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-abortincompletemultipartupload.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.mixins_preview.aws_s3 import mixins as s3_mixins

abort_incomplete_multipart_upload_property = s3_mixins.CfnBucketPropsMixin.AbortIncompleteMultipartUploadProperty(
    days_after_initiation=123
)

Attributes

days_after_initiation

Specifies the number of days after which Amazon S3 stops an incomplete multipart upload.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-abortincompletemultipartupload.html#cfn-s3-bucket-abortincompletemultipartupload-daysafterinitiation

AccelerateConfigurationProperty

class CfnBucketPropsMixin.AccelerateConfigurationProperty(*, acceleration_status=None)

Bases: object

Configures the transfer acceleration state for an Amazon S3 bucket.

For more information, see Amazon S3 Transfer Acceleration in the Amazon S3 User Guide .

Parameters:

acceleration_status (Optional[str]) – Specifies the transfer acceleration status of the bucket.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-accelerateconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

accelerate_configuration_property = s3_mixins.CfnBucketPropsMixin.AccelerateConfigurationProperty(
    acceleration_status="accelerationStatus"
)

Attributes

acceleration_status

Specifies the transfer acceleration status of the bucket.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-accelerateconfiguration.html#cfn-s3-bucket-accelerateconfiguration-accelerationstatus

AccessControlTranslationProperty

class CfnBucketPropsMixin.AccessControlTranslationProperty(*, owner=None)

Bases: object

Specify this only in a cross-account scenario (where source and destination bucket owners are not the same), and you want to change replica ownership to the AWS account that owns the destination bucket.

If this is not specified in the replication configuration, the replicas are owned by same AWS account that owns the source object.

Parameters:

owner (Optional[str]) – Specifies the replica ownership. For default and valid values, see PUT bucket replication in the Amazon S3 API Reference .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-accesscontroltranslation.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.mixins_preview.aws_s3 import mixins as s3_mixins

access_control_translation_property = s3_mixins.CfnBucketPropsMixin.AccessControlTranslationProperty(
    owner="owner"
)

Attributes

owner

Specifies the replica ownership.

For default and valid values, see PUT bucket replication in the Amazon S3 API Reference .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-accesscontroltranslation.html#cfn-s3-bucket-accesscontroltranslation-owner

AnalyticsConfigurationProperty

class CfnBucketPropsMixin.AnalyticsConfigurationProperty(*, id=None, prefix=None, storage_class_analysis=None, tag_filters=None)

Bases: object

Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket.

Parameters:
  • id (Optional[str]) – The ID that identifies the analytics configuration.

  • prefix (Optional[str]) – The prefix that an object must have to be included in the analytics results.

  • storage_class_analysis (Union[IResolvable, StorageClassAnalysisProperty, Dict[str, Any], None]) – Contains data related to access patterns to be collected and made available to analyze the tradeoffs between different storage classes.

  • tag_filters (Union[IResolvable, Sequence[Union[IResolvable, TagFilterProperty, Dict[str, Any]]], None]) – The tags to use when evaluating an analytics filter. The analytics only includes objects that meet the filter’s criteria. If no filter is specified, all of the contents of the bucket are included in the analysis.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-analyticsconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

analytics_configuration_property = s3_mixins.CfnBucketPropsMixin.AnalyticsConfigurationProperty(
    id="id",
    prefix="prefix",
    storage_class_analysis=s3_mixins.CfnBucketPropsMixin.StorageClassAnalysisProperty(
        data_export=s3_mixins.CfnBucketPropsMixin.DataExportProperty(
            destination=s3_mixins.CfnBucketPropsMixin.DestinationProperty(
                bucket_account_id="bucketAccountId",
                bucket_arn="bucketArn",
                format="format",
                prefix="prefix"
            ),
            output_schema_version="outputSchemaVersion"
        )
    ),
    tag_filters=[s3_mixins.CfnBucketPropsMixin.TagFilterProperty(
        key="key",
        value="value"
    )]
)

Attributes

id

The ID that identifies the analytics configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-analyticsconfiguration.html#cfn-s3-bucket-analyticsconfiguration-id

prefix

The prefix that an object must have to be included in the analytics results.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-analyticsconfiguration.html#cfn-s3-bucket-analyticsconfiguration-prefix

storage_class_analysis

Contains data related to access patterns to be collected and made available to analyze the tradeoffs between different storage classes.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-analyticsconfiguration.html#cfn-s3-bucket-analyticsconfiguration-storageclassanalysis

tag_filters

The tags to use when evaluating an analytics filter.

The analytics only includes objects that meet the filter’s criteria. If no filter is specified, all of the contents of the bucket are included in the analysis.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-analyticsconfiguration.html#cfn-s3-bucket-analyticsconfiguration-tagfilters

BlockedEncryptionTypesProperty

class CfnBucketPropsMixin.BlockedEncryptionTypesProperty(*, encryption_type=None)

Bases: object

A bucket-level setting for Amazon S3 general purpose buckets used to prevent the upload of new objects encrypted with the specified server-side encryption type.

For example, blocking an encryption type will block PutObject , CopyObject , PostObject , multipart upload, and replication requests to the bucket for objects with the specified encryption type. However, you can continue to read and list any pre-existing objects already encrypted with the specified encryption type. For more information, see Blocking or unblocking SSE-C for a general purpose bucket .

This data type is used with the following actions:

You must have the s3:GetEncryptionConfiguration permission to view a bucket’s encryption type.

Parameters:

encryption_type (Optional[Sequence[str]]) – The object encryption type that you want to block or unblock for an Amazon S3 general purpose bucket. .. epigraph:: Currently, this parameter only supports blocking or unblocking server side encryption with customer-provided keys (SSE-C). For more information about SSE-C, see Using server-side encryption with customer-provided keys (SSE-C) .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-blockedencryptiontypes.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.mixins_preview.aws_s3 import mixins as s3_mixins

blocked_encryption_types_property = s3_mixins.CfnBucketPropsMixin.BlockedEncryptionTypesProperty(
    encryption_type=["encryptionType"]
)

Attributes

encryption_type

The object encryption type that you want to block or unblock for an Amazon S3 general purpose bucket.

Currently, this parameter only supports blocking or unblocking server side encryption with customer-provided keys (SSE-C). For more information about SSE-C, see Using server-side encryption with customer-provided keys (SSE-C) .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-blockedencryptiontypes.html#cfn-s3-bucket-blockedencryptiontypes-encryptiontype

BucketEncryptionProperty

class CfnBucketPropsMixin.BucketEncryptionProperty(*, server_side_encryption_configuration=None)

Bases: object

Specifies default encryption for a bucket using server-side encryption with Amazon S3-managed keys (SSE-S3), AWS KMS-managed keys (SSE-KMS), or dual-layer server-side encryption with KMS-managed keys (DSSE-KMS).

For information about the Amazon S3 default encryption feature, see Amazon S3 Default Encryption for S3 Buckets in the Amazon S3 User Guide .

Parameters:

server_side_encryption_configuration (Union[IResolvable, Sequence[Union[IResolvable, ServerSideEncryptionRuleProperty, Dict[str, Any]]], None]) – Specifies the default server-side-encryption configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-bucketencryption.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.mixins_preview.aws_s3 import mixins as s3_mixins

bucket_encryption_property = s3_mixins.CfnBucketPropsMixin.BucketEncryptionProperty(
    server_side_encryption_configuration=[s3_mixins.CfnBucketPropsMixin.ServerSideEncryptionRuleProperty(
        blocked_encryption_types=s3_mixins.CfnBucketPropsMixin.BlockedEncryptionTypesProperty(
            encryption_type=["encryptionType"]
        ),
        bucket_key_enabled=False,
        server_side_encryption_by_default=s3_mixins.CfnBucketPropsMixin.ServerSideEncryptionByDefaultProperty(
            kms_master_key_id="kmsMasterKeyId",
            sse_algorithm="sseAlgorithm"
        )
    )]
)

Attributes

server_side_encryption_configuration

Specifies the default server-side-encryption configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-bucketencryption.html#cfn-s3-bucket-bucketencryption-serversideencryptionconfiguration

CorsConfigurationProperty

class CfnBucketPropsMixin.CorsConfigurationProperty(*, cors_rules=None)

Bases: object

Describes the cross-origin access configuration for objects in an Amazon S3 bucket.

For more information, see Enabling Cross-Origin Resource Sharing in the Amazon S3 User Guide .

Parameters:

cors_rules (Union[IResolvable, Sequence[Union[IResolvable, CorsRuleProperty, Dict[str, Any]]], None]) – A set of origins and methods (cross-origin access that you want to allow). You can add up to 100 rules to the configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-corsconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

cors_configuration_property = s3_mixins.CfnBucketPropsMixin.CorsConfigurationProperty(
    cors_rules=[s3_mixins.CfnBucketPropsMixin.CorsRuleProperty(
        allowed_headers=["allowedHeaders"],
        allowed_methods=["allowedMethods"],
        allowed_origins=["allowedOrigins"],
        exposed_headers=["exposedHeaders"],
        id="id",
        max_age=123
    )]
)

Attributes

cors_rules

A set of origins and methods (cross-origin access that you want to allow).

You can add up to 100 rules to the configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-corsconfiguration.html#cfn-s3-bucket-corsconfiguration-corsrules

CorsRuleProperty

class CfnBucketPropsMixin.CorsRuleProperty(*, allowed_headers=None, allowed_methods=None, allowed_origins=None, exposed_headers=None, id=None, max_age=None)

Bases: object

Specifies a cross-origin access rule for an Amazon S3 bucket.

Parameters:
  • allowed_headers (Optional[Sequence[str]]) – Headers that are specified in the Access-Control-Request-Headers header. These headers are allowed in a preflight OPTIONS request. In response to any preflight OPTIONS request, Amazon S3 returns any requested headers that are allowed.

  • allowed_methods (Optional[Sequence[str]]) – An HTTP method that you allow the origin to run. Allowed values : GET | PUT | HEAD | POST | DELETE

  • allowed_origins (Optional[Sequence[str]]) – One or more origins you want customers to be able to access the bucket from.

  • exposed_headers (Optional[Sequence[str]]) – One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).

  • id (Optional[str]) – A unique identifier for this rule. The value must be no more than 255 characters.

  • max_age (Union[int, float, None]) – The time in seconds that your browser is to cache the preflight response for the specified resource.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-corsrule.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.mixins_preview.aws_s3 import mixins as s3_mixins

cors_rule_property = s3_mixins.CfnBucketPropsMixin.CorsRuleProperty(
    allowed_headers=["allowedHeaders"],
    allowed_methods=["allowedMethods"],
    allowed_origins=["allowedOrigins"],
    exposed_headers=["exposedHeaders"],
    id="id",
    max_age=123
)

Attributes

allowed_headers

Headers that are specified in the Access-Control-Request-Headers header.

These headers are allowed in a preflight OPTIONS request. In response to any preflight OPTIONS request, Amazon S3 returns any requested headers that are allowed.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-corsrule.html#cfn-s3-bucket-corsrule-allowedheaders

allowed_methods

An HTTP method that you allow the origin to run.

Allowed values : GET | PUT | HEAD | POST | DELETE

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-corsrule.html#cfn-s3-bucket-corsrule-allowedmethods

allowed_origins

One or more origins you want customers to be able to access the bucket from.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-corsrule.html#cfn-s3-bucket-corsrule-allowedorigins

exposed_headers

One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-corsrule.html#cfn-s3-bucket-corsrule-exposedheaders

id

A unique identifier for this rule.

The value must be no more than 255 characters.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-corsrule.html#cfn-s3-bucket-corsrule-id

max_age

The time in seconds that your browser is to cache the preflight response for the specified resource.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-corsrule.html#cfn-s3-bucket-corsrule-maxage

DataExportProperty

class CfnBucketPropsMixin.DataExportProperty(*, destination=None, output_schema_version=None)

Bases: object

Specifies how data related to the storage class analysis for an Amazon S3 bucket should be exported.

Parameters:
  • destination (Union[IResolvable, DestinationProperty, Dict[str, Any], None]) – The place to store the data for an analysis.

  • output_schema_version (Optional[str]) – The version of the output schema to use when exporting data. Must be V_1 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-dataexport.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.mixins_preview.aws_s3 import mixins as s3_mixins

data_export_property = s3_mixins.CfnBucketPropsMixin.DataExportProperty(
    destination=s3_mixins.CfnBucketPropsMixin.DestinationProperty(
        bucket_account_id="bucketAccountId",
        bucket_arn="bucketArn",
        format="format",
        prefix="prefix"
    ),
    output_schema_version="outputSchemaVersion"
)

Attributes

destination

The place to store the data for an analysis.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-dataexport.html#cfn-s3-bucket-dataexport-destination

output_schema_version

The version of the output schema to use when exporting data.

Must be V_1 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-dataexport.html#cfn-s3-bucket-dataexport-outputschemaversion

DefaultRetentionProperty

class CfnBucketPropsMixin.DefaultRetentionProperty(*, days=None, mode=None, years=None)

Bases: object

The container element for optionally specifying the default Object Lock retention settings for new objects placed in the specified bucket.

  • The DefaultRetention settings require both a mode and a period.

  • The DefaultRetention period can be either Days or Years but you must select one. You cannot specify Days and Years at the same time.

Parameters:
  • days (Union[int, float, None]) – The number of days that you want to specify for the default retention period. If Object Lock is turned on, you must specify Mode and specify either Days or Years .

  • mode (Optional[str]) – The default Object Lock retention mode you want to apply to new objects placed in the specified bucket. If Object Lock is turned on, you must specify Mode and specify either Days or Years .

  • years (Union[int, float, None]) – The number of years that you want to specify for the default retention period. If Object Lock is turned on, you must specify Mode and specify either Days or Years .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-defaultretention.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.mixins_preview.aws_s3 import mixins as s3_mixins

default_retention_property = s3_mixins.CfnBucketPropsMixin.DefaultRetentionProperty(
    days=123,
    mode="mode",
    years=123
)

Attributes

days

The number of days that you want to specify for the default retention period.

If Object Lock is turned on, you must specify Mode and specify either Days or Years .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-defaultretention.html#cfn-s3-bucket-defaultretention-days

mode

The default Object Lock retention mode you want to apply to new objects placed in the specified bucket.

If Object Lock is turned on, you must specify Mode and specify either Days or Years .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-defaultretention.html#cfn-s3-bucket-defaultretention-mode

years

The number of years that you want to specify for the default retention period.

If Object Lock is turned on, you must specify Mode and specify either Days or Years .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-defaultretention.html#cfn-s3-bucket-defaultretention-years

DeleteMarkerReplicationProperty

class CfnBucketPropsMixin.DeleteMarkerReplicationProperty(*, status=None)

Bases: object

Specifies whether Amazon S3 replicates delete markers.

If you specify a Filter in your replication configuration, you must also include a DeleteMarkerReplication element. If your Filter includes a Tag element, the DeleteMarkerReplication Status must be set to Disabled, because Amazon S3 does not support replicating delete markers for tag-based rules. For an example configuration, see Basic Rule Configuration .

For more information about delete marker replication, see Basic Rule Configuration . .. epigraph:

If you are using an earlier version of the replication configuration, Amazon S3 handles replication of delete markers differently. For more information, see `Backward Compatibility <https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations>`_ .
Parameters:

status (Optional[str]) – Indicates whether to replicate delete markers.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-deletemarkerreplication.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.mixins_preview.aws_s3 import mixins as s3_mixins

delete_marker_replication_property = s3_mixins.CfnBucketPropsMixin.DeleteMarkerReplicationProperty(
    status="status"
)

Attributes

status

Indicates whether to replicate delete markers.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-deletemarkerreplication.html#cfn-s3-bucket-deletemarkerreplication-status

DestinationProperty

class CfnBucketPropsMixin.DestinationProperty(*, bucket_account_id=None, bucket_arn=None, format=None, prefix=None)

Bases: object

Specifies information about where to publish analysis or configuration results for an Amazon S3 bucket.

Parameters:
  • bucket_account_id (Optional[str]) – The account ID that owns the destination S3 bucket. If no account ID is provided, the owner is not validated before exporting data. .. epigraph:: Although this value is optional, we strongly recommend that you set it to help prevent problems if the destination bucket ownership changes.

  • bucket_arn (Optional[str]) – The Amazon Resource Name (ARN) of the bucket to which data is exported.

  • format (Optional[str]) – Specifies the file format used when exporting data to Amazon S3. Allowed values : CSV | ORC | Parquet

  • prefix (Optional[str]) – The prefix to use when exporting data. The prefix is prepended to all results.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-destination.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.mixins_preview.aws_s3 import mixins as s3_mixins

destination_property = s3_mixins.CfnBucketPropsMixin.DestinationProperty(
    bucket_account_id="bucketAccountId",
    bucket_arn="bucketArn",
    format="format",
    prefix="prefix"
)

Attributes

bucket_account_id

The account ID that owns the destination S3 bucket.

If no account ID is provided, the owner is not validated before exporting data. .. epigraph:

Although this value is optional, we strongly recommend that you set it to help prevent problems if the destination bucket ownership changes.
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-destination.html#cfn-s3-bucket-destination-bucketaccountid

bucket_arn

The Amazon Resource Name (ARN) of the bucket to which data is exported.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-destination.html#cfn-s3-bucket-destination-bucketarn

format

Specifies the file format used when exporting data to Amazon S3.

Allowed values : CSV | ORC | Parquet

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-destination.html#cfn-s3-bucket-destination-format

prefix

The prefix to use when exporting data.

The prefix is prepended to all results.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-destination.html#cfn-s3-bucket-destination-prefix

EncryptionConfigurationProperty

class CfnBucketPropsMixin.EncryptionConfigurationProperty(*, replica_kms_key_id=None)

Bases: object

Specifies encryption-related information for an Amazon S3 bucket that is a destination for replicated objects.

If you’re specifying a customer managed KMS key, we recommend using a fully qualified KMS key ARN. If you use a KMS key alias instead, then AWS resolves the key within the requester’s account. This behavior can result in data that’s encrypted with a KMS key that belongs to the requester, and not the bucket owner.

Parameters:

replica_kms_key_id (Optional[str]) – Specifies the ID (Key ARN or Alias ARN) of the customer managed AWS KMS key stored in AWS Key Management Service (KMS) for the destination bucket. Amazon S3 uses this key to encrypt replica objects. Amazon S3 only supports symmetric encryption KMS keys. For more information, see Asymmetric keys in AWS KMS in the AWS Key Management Service Developer Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-encryptionconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

encryption_configuration_property = s3_mixins.CfnBucketPropsMixin.EncryptionConfigurationProperty(
    replica_kms_key_id="replicaKmsKeyId"
)

Attributes

replica_kms_key_id

Specifies the ID (Key ARN or Alias ARN) of the customer managed AWS KMS key stored in AWS Key Management Service (KMS) for the destination bucket.

Amazon S3 uses this key to encrypt replica objects. Amazon S3 only supports symmetric encryption KMS keys. For more information, see Asymmetric keys in AWS KMS in the AWS Key Management Service Developer Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-encryptionconfiguration.html#cfn-s3-bucket-encryptionconfiguration-replicakmskeyid

EventBridgeConfigurationProperty

class CfnBucketPropsMixin.EventBridgeConfigurationProperty(*, event_bridge_enabled=None)

Bases: object

Amazon S3 can send events to Amazon EventBridge whenever certain events happen in your bucket, see Using EventBridge in the Amazon S3 User Guide .

Unlike other destinations, delivery of events to EventBridge can be either enabled or disabled for a bucket. If enabled, all events will be sent to EventBridge and you can use EventBridge rules to route events to additional targets. For more information, see What Is Amazon EventBridge in the Amazon EventBridge User Guide

Parameters:

event_bridge_enabled (Union[bool, IResolvable, None]) – Enables delivery of events to Amazon EventBridge.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-eventbridgeconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

event_bridge_configuration_property = s3_mixins.CfnBucketPropsMixin.EventBridgeConfigurationProperty(
    event_bridge_enabled=False
)

Attributes

event_bridge_enabled

Enables delivery of events to Amazon EventBridge.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-eventbridgeconfiguration.html#cfn-s3-bucket-eventbridgeconfiguration-eventbridgeenabled

FilterRuleProperty

class CfnBucketPropsMixin.FilterRuleProperty(*, name=None, value=None)

Bases: object

Specifies the Amazon S3 object key name to filter on.

An object key name is the name assigned to an object in your Amazon S3 bucket. You specify whether to filter on the suffix or prefix of the object key name. A prefix is a specific string of characters at the beginning of an object key name, which you can use to organize objects. For example, you can start the key names of related objects with a prefix, such as 2023- or engineering/ . Then, you can use FilterRule to find objects in a bucket with key names that have the same prefix. A suffix is similar to a prefix, but it is at the end of the object key name instead of at the beginning.

Parameters:
  • name (Optional[str]) – The object key name prefix or suffix identifying one or more objects to which the filtering rule applies. The maximum length is 1,024 characters. Overlapping prefixes and suffixes are not supported. For more information, see Configuring Event Notifications in the Amazon S3 User Guide .

  • value (Optional[str]) – The value that the filter searches for in object key names.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-filterrule.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.mixins_preview.aws_s3 import mixins as s3_mixins

filter_rule_property = s3_mixins.CfnBucketPropsMixin.FilterRuleProperty(
    name="name",
    value="value"
)

Attributes

name

The object key name prefix or suffix identifying one or more objects to which the filtering rule applies.

The maximum length is 1,024 characters. Overlapping prefixes and suffixes are not supported. For more information, see Configuring Event Notifications in the Amazon S3 User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-filterrule.html#cfn-s3-bucket-filterrule-name

value

The value that the filter searches for in object key names.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-filterrule.html#cfn-s3-bucket-filterrule-value

IntelligentTieringConfigurationProperty

class CfnBucketPropsMixin.IntelligentTieringConfigurationProperty(*, id=None, prefix=None, status=None, tag_filters=None, tierings=None)

Bases: object

Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket.

For information about the S3 Intelligent-Tiering storage class, see Storage class for automatically optimizing frequently and infrequently accessed objects .

Parameters:
  • id (Optional[str]) – The ID used to identify the S3 Intelligent-Tiering configuration.

  • prefix (Optional[str]) – An object key name prefix that identifies the subset of objects to which the rule applies.

  • status (Optional[str]) – Specifies the status of the configuration.

  • tag_filters (Union[IResolvable, Sequence[Union[IResolvable, TagFilterProperty, Dict[str, Any]]], None]) – A container for a key-value pair.

  • tierings (Union[IResolvable, Sequence[Union[IResolvable, TieringProperty, Dict[str, Any]]], None]) – Specifies a list of S3 Intelligent-Tiering storage class tiers in the configuration. At least one tier must be defined in the list. At most, you can specify two tiers in the list, one for each available AccessTier: ARCHIVE_ACCESS and DEEP_ARCHIVE_ACCESS . .. epigraph:: You only need Intelligent Tiering Configuration enabled on a bucket if you want to automatically move objects stored in the Intelligent-Tiering storage class to Archive Access or Deep Archive Access tiers.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-intelligenttieringconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

intelligent_tiering_configuration_property = s3_mixins.CfnBucketPropsMixin.IntelligentTieringConfigurationProperty(
    id="id",
    prefix="prefix",
    status="status",
    tag_filters=[s3_mixins.CfnBucketPropsMixin.TagFilterProperty(
        key="key",
        value="value"
    )],
    tierings=[s3_mixins.CfnBucketPropsMixin.TieringProperty(
        access_tier="accessTier",
        days=123
    )]
)

Attributes

id

The ID used to identify the S3 Intelligent-Tiering configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-intelligenttieringconfiguration.html#cfn-s3-bucket-intelligenttieringconfiguration-id

prefix

An object key name prefix that identifies the subset of objects to which the rule applies.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-intelligenttieringconfiguration.html#cfn-s3-bucket-intelligenttieringconfiguration-prefix

status

Specifies the status of the configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-intelligenttieringconfiguration.html#cfn-s3-bucket-intelligenttieringconfiguration-status

tag_filters

A container for a key-value pair.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-intelligenttieringconfiguration.html#cfn-s3-bucket-intelligenttieringconfiguration-tagfilters

tierings

Specifies a list of S3 Intelligent-Tiering storage class tiers in the configuration.

At least one tier must be defined in the list. At most, you can specify two tiers in the list, one for each available AccessTier: ARCHIVE_ACCESS and DEEP_ARCHIVE_ACCESS . .. epigraph:

You only need Intelligent Tiering Configuration enabled on a bucket if you want to automatically move objects stored in the Intelligent-Tiering storage class to Archive Access or Deep Archive Access tiers.
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-intelligenttieringconfiguration.html#cfn-s3-bucket-intelligenttieringconfiguration-tierings

InventoryConfigurationProperty

class CfnBucketPropsMixin.InventoryConfigurationProperty(*, destination=None, enabled=None, id=None, included_object_versions=None, optional_fields=None, prefix=None, schedule_frequency=None)

Bases: object

Specifies the S3 Inventory configuration for an Amazon S3 bucket.

For more information, see GET Bucket inventory in the Amazon S3 API Reference .

Parameters:
  • destination (Union[IResolvable, DestinationProperty, Dict[str, Any], None]) – Contains information about where to publish the inventory results.

  • enabled (Union[bool, IResolvable, None]) – Specifies whether the inventory is enabled or disabled. If set to True , an inventory list is generated. If set to False , no inventory list is generated.

  • id (Optional[str]) – The ID used to identify the inventory configuration.

  • included_object_versions (Optional[str]) – Object versions to include in the inventory list. If set to All , the list includes all the object versions, which adds the version-related fields VersionId , IsLatest , and DeleteMarker to the list. If set to Current , the list does not contain these version-related fields.

  • optional_fields (Optional[Sequence[str]]) – Contains the optional fields that are included in the inventory results.

  • prefix (Optional[str]) – Specifies the inventory filter prefix.

  • schedule_frequency (Optional[str]) – Specifies the schedule for generating inventory results.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

inventory_configuration_property = s3_mixins.CfnBucketPropsMixin.InventoryConfigurationProperty(
    destination=s3_mixins.CfnBucketPropsMixin.DestinationProperty(
        bucket_account_id="bucketAccountId",
        bucket_arn="bucketArn",
        format="format",
        prefix="prefix"
    ),
    enabled=False,
    id="id",
    included_object_versions="includedObjectVersions",
    optional_fields=["optionalFields"],
    prefix="prefix",
    schedule_frequency="scheduleFrequency"
)

Attributes

destination

Contains information about where to publish the inventory results.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-destination

enabled

Specifies whether the inventory is enabled or disabled.

If set to True , an inventory list is generated. If set to False , no inventory list is generated.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-enabled

id

The ID used to identify the inventory configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-id

included_object_versions

Object versions to include in the inventory list.

If set to All , the list includes all the object versions, which adds the version-related fields VersionId , IsLatest , and DeleteMarker to the list. If set to Current , the list does not contain these version-related fields.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-includedobjectversions

optional_fields

Contains the optional fields that are included in the inventory results.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-optionalfields

prefix

Specifies the inventory filter prefix.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-prefix

schedule_frequency

Specifies the schedule for generating inventory results.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-schedulefrequency

InventoryTableConfigurationProperty

class CfnBucketPropsMixin.InventoryTableConfigurationProperty(*, configuration_state=None, encryption_configuration=None, table_arn=None, table_name=None)

Bases: object

The inventory table configuration for an S3 Metadata configuration.

Parameters:
  • configuration_state (Optional[str]) – The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.

  • encryption_configuration (Union[IResolvable, MetadataTableEncryptionConfigurationProperty, Dict[str, Any], None]) – The encryption configuration for the inventory table.

  • table_arn (Optional[str]) – The Amazon Resource Name (ARN) for the inventory table.

  • table_name (Optional[str]) – The name of the inventory table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventorytableconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

inventory_table_configuration_property = s3_mixins.CfnBucketPropsMixin.InventoryTableConfigurationProperty(
    configuration_state="configurationState",
    encryption_configuration=s3_mixins.CfnBucketPropsMixin.MetadataTableEncryptionConfigurationProperty(
        kms_key_arn="kmsKeyArn",
        sse_algorithm="sseAlgorithm"
    ),
    table_arn="tableArn",
    table_name="tableName"
)

Attributes

configuration_state

The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventorytableconfiguration.html#cfn-s3-bucket-inventorytableconfiguration-configurationstate

encryption_configuration

The encryption configuration for the inventory table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventorytableconfiguration.html#cfn-s3-bucket-inventorytableconfiguration-encryptionconfiguration

table_arn

The Amazon Resource Name (ARN) for the inventory table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventorytableconfiguration.html#cfn-s3-bucket-inventorytableconfiguration-tablearn

table_name

The name of the inventory table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventorytableconfiguration.html#cfn-s3-bucket-inventorytableconfiguration-tablename

JournalTableConfigurationProperty

class CfnBucketPropsMixin.JournalTableConfigurationProperty(*, encryption_configuration=None, record_expiration=None, table_arn=None, table_name=None)

Bases: object

The journal table configuration for an S3 Metadata configuration.

Parameters:
  • encryption_configuration (Union[IResolvable, MetadataTableEncryptionConfigurationProperty, Dict[str, Any], None]) – The encryption configuration for the journal table.

  • record_expiration (Union[IResolvable, RecordExpirationProperty, Dict[str, Any], None]) – The journal table record expiration settings for the journal table.

  • table_arn (Optional[str]) – The Amazon Resource Name (ARN) for the journal table.

  • table_name (Optional[str]) – The name of the journal table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-journaltableconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

journal_table_configuration_property = s3_mixins.CfnBucketPropsMixin.JournalTableConfigurationProperty(
    encryption_configuration=s3_mixins.CfnBucketPropsMixin.MetadataTableEncryptionConfigurationProperty(
        kms_key_arn="kmsKeyArn",
        sse_algorithm="sseAlgorithm"
    ),
    record_expiration=s3_mixins.CfnBucketPropsMixin.RecordExpirationProperty(
        days=123,
        expiration="expiration"
    ),
    table_arn="tableArn",
    table_name="tableName"
)

Attributes

encryption_configuration

The encryption configuration for the journal table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-journaltableconfiguration.html#cfn-s3-bucket-journaltableconfiguration-encryptionconfiguration

record_expiration

The journal table record expiration settings for the journal table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-journaltableconfiguration.html#cfn-s3-bucket-journaltableconfiguration-recordexpiration

table_arn

The Amazon Resource Name (ARN) for the journal table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-journaltableconfiguration.html#cfn-s3-bucket-journaltableconfiguration-tablearn

table_name

The name of the journal table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-journaltableconfiguration.html#cfn-s3-bucket-journaltableconfiguration-tablename

LambdaConfigurationProperty

class CfnBucketPropsMixin.LambdaConfigurationProperty(*, event=None, filter=None, function=None)

Bases: object

Describes the AWS Lambda functions to invoke and the events for which to invoke them.

Parameters:
  • event (Optional[str]) – The Amazon S3 bucket event for which to invoke the AWS Lambda function. For more information, see Supported Event Types in the Amazon S3 User Guide .

  • filter (Union[IResolvable, NotificationFilterProperty, Dict[str, Any], None]) – The filtering rules that determine which objects invoke the AWS Lambda function. For example, you can create a filter so that only image files with a .jpg extension invoke the function when they are added to the Amazon S3 bucket.

  • function (Optional[str]) – The Amazon Resource Name (ARN) of the AWS Lambda function that Amazon S3 invokes when the specified event type occurs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lambdaconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

lambda_configuration_property = s3_mixins.CfnBucketPropsMixin.LambdaConfigurationProperty(
    event="event",
    filter=s3_mixins.CfnBucketPropsMixin.NotificationFilterProperty(
        s3_key=s3_mixins.CfnBucketPropsMixin.S3KeyFilterProperty(
            rules=[s3_mixins.CfnBucketPropsMixin.FilterRuleProperty(
                name="name",
                value="value"
            )]
        )
    ),
    function="function"
)

Attributes

event

The Amazon S3 bucket event for which to invoke the AWS Lambda function.

For more information, see Supported Event Types in the Amazon S3 User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lambdaconfiguration.html#cfn-s3-bucket-lambdaconfiguration-event

filter

The filtering rules that determine which objects invoke the AWS Lambda function.

For example, you can create a filter so that only image files with a .jpg extension invoke the function when they are added to the Amazon S3 bucket.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lambdaconfiguration.html#cfn-s3-bucket-lambdaconfiguration-filter

function

The Amazon Resource Name (ARN) of the AWS Lambda function that Amazon S3 invokes when the specified event type occurs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lambdaconfiguration.html#cfn-s3-bucket-lambdaconfiguration-function

LifecycleConfigurationProperty

class CfnBucketPropsMixin.LifecycleConfigurationProperty(*, rules=None, transition_default_minimum_object_size=None)

Bases: object

Specifies the lifecycle configuration for objects in an Amazon S3 bucket.

For more information, see Object Lifecycle Management in the Amazon S3 User Guide .

Parameters:
  • rules (Union[IResolvable, Sequence[Union[IResolvable, RuleProperty, Dict[str, Any]]], None]) – A lifecycle rule for individual objects in an Amazon S3 bucket.

  • transition_default_minimum_object_size (Optional[str]) – Indicates which default minimum object size behavior is applied to the lifecycle configuration. .. epigraph:: This parameter applies to general purpose buckets only. It isn’t supported for directory bucket lifecycle configurations. - all_storage_classes_128K - Objects smaller than 128 KB will not transition to any storage class by default. - varies_by_storage_class - Objects smaller than 128 KB will transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By default, all other storage classes will prevent transitions smaller than 128 KB. To customize the minimum object size for any transition you can add a filter that specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in the body of your transition rule. Custom filters always take precedence over the default transition behavior.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

lifecycle_configuration_property = s3_mixins.CfnBucketPropsMixin.LifecycleConfigurationProperty(
    rules=[s3_mixins.CfnBucketPropsMixin.RuleProperty(
        abort_incomplete_multipart_upload=s3_mixins.CfnBucketPropsMixin.AbortIncompleteMultipartUploadProperty(
            days_after_initiation=123
        ),
        expiration_date=Date(),
        expiration_in_days=123,
        expired_object_delete_marker=False,
        id="id",
        noncurrent_version_expiration=s3_mixins.CfnBucketPropsMixin.NoncurrentVersionExpirationProperty(
            newer_noncurrent_versions=123,
            noncurrent_days=123
        ),
        noncurrent_version_expiration_in_days=123,
        noncurrent_version_transition=s3_mixins.CfnBucketPropsMixin.NoncurrentVersionTransitionProperty(
            newer_noncurrent_versions=123,
            storage_class="storageClass",
            transition_in_days=123
        ),
        noncurrent_version_transitions=[s3_mixins.CfnBucketPropsMixin.NoncurrentVersionTransitionProperty(
            newer_noncurrent_versions=123,
            storage_class="storageClass",
            transition_in_days=123
        )],
        object_size_greater_than=123,
        object_size_less_than=123,
        prefix="prefix",
        status="status",
        tag_filters=[s3_mixins.CfnBucketPropsMixin.TagFilterProperty(
            key="key",
            value="value"
        )],
        transition=s3_mixins.CfnBucketPropsMixin.TransitionProperty(
            storage_class="storageClass",
            transition_date=Date(),
            transition_in_days=123
        ),
        transitions=[s3_mixins.CfnBucketPropsMixin.TransitionProperty(
            storage_class="storageClass",
            transition_date=Date(),
            transition_in_days=123
        )]
    )],
    transition_default_minimum_object_size="transitionDefaultMinimumObjectSize"
)

Attributes

rules

A lifecycle rule for individual objects in an Amazon S3 bucket.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfiguration.html#cfn-s3-bucket-lifecycleconfiguration-rules

transition_default_minimum_object_size

Indicates which default minimum object size behavior is applied to the lifecycle configuration.

This parameter applies to general purpose buckets only. It isn’t supported for directory bucket lifecycle configurations.

  • all_storage_classes_128K - Objects smaller than 128 KB will not transition to any storage class by default.

  • varies_by_storage_class - Objects smaller than 128 KB will transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By default, all other storage classes will prevent transitions smaller than 128 KB.

To customize the minimum object size for any transition you can add a filter that specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in the body of your transition rule. Custom filters always take precedence over the default transition behavior.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfiguration.html#cfn-s3-bucket-lifecycleconfiguration-transitiondefaultminimumobjectsize

LoggingConfigurationProperty

class CfnBucketPropsMixin.LoggingConfigurationProperty(*, destination_bucket_name=None, log_file_prefix=None, target_object_key_format=None)

Bases: object

Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket.

For examples and more information, see PUT Bucket logging in the Amazon S3 API Reference . .. epigraph:

To successfully complete the ``AWS::S3::Bucket LoggingConfiguration`` request, you must have ``s3:PutObject`` and ``s3:PutObjectAcl`` in your IAM permissions.
Parameters:
  • destination_bucket_name (Optional[str]) – The name of the bucket where Amazon S3 should store server access log files. You can store log files in any bucket that you own. By default, logs are stored in the bucket where the LoggingConfiguration property is defined.

  • log_file_prefix (Optional[str]) – A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a single bucket, you can use a prefix to distinguish which log files came from which bucket.

  • target_object_key_format (Union[IResolvable, TargetObjectKeyFormatProperty, Dict[str, Any], None]) – Amazon S3 key format for log objects. Only one format, either PartitionedPrefix or SimplePrefix, is allowed.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-loggingconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

# simple_prefix: Any

logging_configuration_property = s3_mixins.CfnBucketPropsMixin.LoggingConfigurationProperty(
    destination_bucket_name="destinationBucketName",
    log_file_prefix="logFilePrefix",
    target_object_key_format=s3_mixins.CfnBucketPropsMixin.TargetObjectKeyFormatProperty(
        partitioned_prefix=s3_mixins.CfnBucketPropsMixin.PartitionedPrefixProperty(
            partition_date_source="partitionDateSource"
        ),
        simple_prefix=simple_prefix
    )
)

Attributes

destination_bucket_name

The name of the bucket where Amazon S3 should store server access log files.

You can store log files in any bucket that you own. By default, logs are stored in the bucket where the LoggingConfiguration property is defined.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-loggingconfiguration.html#cfn-s3-bucket-loggingconfiguration-destinationbucketname

log_file_prefix

A prefix for all log object keys.

If you store log files from multiple Amazon S3 buckets in a single bucket, you can use a prefix to distinguish which log files came from which bucket.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-loggingconfiguration.html#cfn-s3-bucket-loggingconfiguration-logfileprefix

target_object_key_format

Amazon S3 key format for log objects.

Only one format, either PartitionedPrefix or SimplePrefix, is allowed.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-loggingconfiguration.html#cfn-s3-bucket-loggingconfiguration-targetobjectkeyformat

MetadataConfigurationProperty

class CfnBucketPropsMixin.MetadataConfigurationProperty(*, destination=None, inventory_table_configuration=None, journal_table_configuration=None)

Bases: object

Creates a V2 Amazon S3 Metadata configuration of a general purpose bucket.

For more information, see Accelerating data discovery with S3 Metadata in the Amazon S3 User Guide .

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metadataconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

metadata_configuration_property = s3_mixins.CfnBucketPropsMixin.MetadataConfigurationProperty(
    destination=s3_mixins.CfnBucketPropsMixin.MetadataDestinationProperty(
        table_bucket_arn="tableBucketArn",
        table_bucket_type="tableBucketType",
        table_namespace="tableNamespace"
    ),
    inventory_table_configuration=s3_mixins.CfnBucketPropsMixin.InventoryTableConfigurationProperty(
        configuration_state="configurationState",
        encryption_configuration=s3_mixins.CfnBucketPropsMixin.MetadataTableEncryptionConfigurationProperty(
            kms_key_arn="kmsKeyArn",
            sse_algorithm="sseAlgorithm"
        ),
        table_arn="tableArn",
        table_name="tableName"
    ),
    journal_table_configuration=s3_mixins.CfnBucketPropsMixin.JournalTableConfigurationProperty(
        encryption_configuration=s3_mixins.CfnBucketPropsMixin.MetadataTableEncryptionConfigurationProperty(
            kms_key_arn="kmsKeyArn",
            sse_algorithm="sseAlgorithm"
        ),
        record_expiration=s3_mixins.CfnBucketPropsMixin.RecordExpirationProperty(
            days=123,
            expiration="expiration"
        ),
        table_arn="tableArn",
        table_name="tableName"
    )
)

Attributes

destination

The destination information for the S3 Metadata configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metadataconfiguration.html#cfn-s3-bucket-metadataconfiguration-destination

inventory_table_configuration

The inventory table configuration for a metadata configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metadataconfiguration.html#cfn-s3-bucket-metadataconfiguration-inventorytableconfiguration

journal_table_configuration

The journal table configuration for a metadata configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metadataconfiguration.html#cfn-s3-bucket-metadataconfiguration-journaltableconfiguration

MetadataDestinationProperty

class CfnBucketPropsMixin.MetadataDestinationProperty(*, table_bucket_arn=None, table_bucket_type=None, table_namespace=None)

Bases: object

The destination information for the S3 Metadata configuration.

Parameters:
  • table_bucket_arn (Optional[str]) – The Amazon Resource Name (ARN) of the table bucket where the metadata configuration is stored.

  • table_bucket_type (Optional[str]) – The type of the table bucket where the metadata configuration is stored. The aws value indicates an AWS managed table bucket, and the customer value indicates a customer-managed table bucket. V2 metadata configurations are stored in AWS managed table buckets, and V1 metadata configurations are stored in customer-managed table buckets.

  • table_namespace (Optional[str]) – The namespace in the table bucket where the metadata tables for a metadata configuration are stored.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metadatadestination.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.mixins_preview.aws_s3 import mixins as s3_mixins

metadata_destination_property = s3_mixins.CfnBucketPropsMixin.MetadataDestinationProperty(
    table_bucket_arn="tableBucketArn",
    table_bucket_type="tableBucketType",
    table_namespace="tableNamespace"
)

Attributes

table_bucket_arn

The Amazon Resource Name (ARN) of the table bucket where the metadata configuration is stored.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metadatadestination.html#cfn-s3-bucket-metadatadestination-tablebucketarn

table_bucket_type

The type of the table bucket where the metadata configuration is stored.

The aws value indicates an AWS managed table bucket, and the customer value indicates a customer-managed table bucket. V2 metadata configurations are stored in AWS managed table buckets, and V1 metadata configurations are stored in customer-managed table buckets.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metadatadestination.html#cfn-s3-bucket-metadatadestination-tablebuckettype

table_namespace

The namespace in the table bucket where the metadata tables for a metadata configuration are stored.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metadatadestination.html#cfn-s3-bucket-metadatadestination-tablenamespace

MetadataTableConfigurationProperty

class CfnBucketPropsMixin.MetadataTableConfigurationProperty(*, s3_tables_destination=None)

Bases: object

We recommend that you create your S3 Metadata configurations by using the V2 MetadataConfiguration resource type. We no longer recommend using the V1 MetadataTableConfiguration resource type. > > If you created your S3 Metadata configuration before July 15, 2025, we recommend that you delete and re-create your configuration by using the MetadataConfiguration resource type so that you can expire journal table records and create a live inventory table.

Creates a V1 S3 Metadata configuration for a general purpose bucket. For more information, see Accelerating data discovery with S3 Metadata in the Amazon S3 User Guide .

Attributes

s3_tables_destination

The destination information for the metadata table configuration.

The destination table bucket must be in the same Region and AWS account as the general purpose bucket. The specified metadata table name must be unique within the aws_s3_metadata namespace in the destination table bucket.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metadatatableconfiguration.html#cfn-s3-bucket-metadatatableconfiguration-s3tablesdestination

MetadataTableEncryptionConfigurationProperty

class CfnBucketPropsMixin.MetadataTableEncryptionConfigurationProperty(*, kms_key_arn=None, sse_algorithm=None)

Bases: object

The encryption settings for an S3 Metadata journal table or inventory table configuration.

Parameters:
  • kms_key_arn (Optional[str]) – If server-side encryption with AWS Key Management Service ( AWS ) keys (SSE-KMS) is specified, you must also specify the KMS key Amazon Resource Name (ARN). You must specify a customer-managed KMS key that’s located in the same Region as the general purpose bucket that corresponds to the metadata table configuration.

  • sse_algorithm (Optional[str]) – The encryption type specified for a metadata table. To specify server-side encryption with AWS Key Management Service ( AWS ) keys (SSE-KMS), use the aws:kms value. To specify server-side encryption with Amazon S3 managed keys (SSE-S3), use the AES256 value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metadatatableencryptionconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

metadata_table_encryption_configuration_property = s3_mixins.CfnBucketPropsMixin.MetadataTableEncryptionConfigurationProperty(
    kms_key_arn="kmsKeyArn",
    sse_algorithm="sseAlgorithm"
)

Attributes

kms_key_arn

If server-side encryption with AWS Key Management Service ( AWS ) keys (SSE-KMS) is specified, you must also specify the KMS key Amazon Resource Name (ARN).

You must specify a customer-managed KMS key that’s located in the same Region as the general purpose bucket that corresponds to the metadata table configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metadatatableencryptionconfiguration.html#cfn-s3-bucket-metadatatableencryptionconfiguration-kmskeyarn

sse_algorithm

The encryption type specified for a metadata table.

To specify server-side encryption with AWS Key Management Service ( AWS ) keys (SSE-KMS), use the aws:kms value. To specify server-side encryption with Amazon S3 managed keys (SSE-S3), use the AES256 value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metadatatableencryptionconfiguration.html#cfn-s3-bucket-metadatatableencryptionconfiguration-ssealgorithm

MetricsConfigurationProperty

class CfnBucketPropsMixin.MetricsConfigurationProperty(*, access_point_arn=None, id=None, prefix=None, tag_filters=None)

Bases: object

Specifies a metrics configuration for the CloudWatch request metrics (specified by the metrics configuration ID) from an Amazon S3 bucket.

If you’re updating an existing metrics configuration, note that this is a full replacement of the existing metrics configuration. If you don’t include the elements you want to keep, they are erased. For examples, see AWS::S3::Bucket . For more information, see PUT Bucket metrics in the Amazon S3 API Reference .

Parameters:
  • access_point_arn (Optional[str]) – The access point that was used while performing operations on the object. The metrics configuration only includes objects that meet the filter’s criteria.

  • id (Optional[str]) – The ID used to identify the metrics configuration. This can be any value you choose that helps you identify your metrics configuration.

  • prefix (Optional[str]) – The prefix that an object must have to be included in the metrics results.

  • tag_filters (Union[IResolvable, Sequence[Union[IResolvable, TagFilterProperty, Dict[str, Any]]], None]) – Specifies a list of tag filters to use as a metrics configuration filter. The metrics configuration includes only objects that meet the filter’s criteria.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metricsconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

metrics_configuration_property = s3_mixins.CfnBucketPropsMixin.MetricsConfigurationProperty(
    access_point_arn="accessPointArn",
    id="id",
    prefix="prefix",
    tag_filters=[s3_mixins.CfnBucketPropsMixin.TagFilterProperty(
        key="key",
        value="value"
    )]
)

Attributes

access_point_arn

The access point that was used while performing operations on the object.

The metrics configuration only includes objects that meet the filter’s criteria.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metricsconfiguration.html#cfn-s3-bucket-metricsconfiguration-accesspointarn

id

The ID used to identify the metrics configuration.

This can be any value you choose that helps you identify your metrics configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metricsconfiguration.html#cfn-s3-bucket-metricsconfiguration-id

prefix

The prefix that an object must have to be included in the metrics results.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metricsconfiguration.html#cfn-s3-bucket-metricsconfiguration-prefix

tag_filters

Specifies a list of tag filters to use as a metrics configuration filter.

The metrics configuration includes only objects that meet the filter’s criteria.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metricsconfiguration.html#cfn-s3-bucket-metricsconfiguration-tagfilters

MetricsProperty

class CfnBucketPropsMixin.MetricsProperty(*, event_threshold=None, status=None)

Bases: object

A container specifying replication metrics-related settings enabling replication metrics and events.

Parameters:
  • event_threshold (Union[IResolvable, ReplicationTimeValueProperty, Dict[str, Any], None]) – A container specifying the time threshold for emitting the s3:Replication:OperationMissedThreshold event.

  • status (Optional[str]) – Specifies whether the replication metrics are enabled.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metrics.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.mixins_preview.aws_s3 import mixins as s3_mixins

metrics_property = s3_mixins.CfnBucketPropsMixin.MetricsProperty(
    event_threshold=s3_mixins.CfnBucketPropsMixin.ReplicationTimeValueProperty(
        minutes=123
    ),
    status="status"
)

Attributes

event_threshold

A container specifying the time threshold for emitting the s3:Replication:OperationMissedThreshold event.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metrics.html#cfn-s3-bucket-metrics-eventthreshold

status

Specifies whether the replication metrics are enabled.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metrics.html#cfn-s3-bucket-metrics-status

NoncurrentVersionExpirationProperty

class CfnBucketPropsMixin.NoncurrentVersionExpirationProperty(*, newer_noncurrent_versions=None, noncurrent_days=None)

Bases: object

Specifies when noncurrent object versions expire.

Upon expiration, Amazon S3 permanently deletes the noncurrent object versions. You set this lifecycle configuration action on a bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent object versions at a specific period in the object’s lifetime. For more information about setting a lifecycle rule configuration, see AWS::S3::Bucket Rule .

Parameters:
  • newer_noncurrent_versions (Union[int, float, None]) – Specifies how many noncurrent versions Amazon S3 will retain. If there are this many more recent noncurrent versions, Amazon S3 will take the associated action. For more information about noncurrent versions, see Lifecycle configuration elements in the Amazon S3 User Guide .

  • noncurrent_days (Union[int, float, None]) – Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. For information about the noncurrent days calculations, see How Amazon S3 Calculates When an Object Became Noncurrent in the Amazon S3 User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-noncurrentversionexpiration.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.mixins_preview.aws_s3 import mixins as s3_mixins

noncurrent_version_expiration_property = s3_mixins.CfnBucketPropsMixin.NoncurrentVersionExpirationProperty(
    newer_noncurrent_versions=123,
    noncurrent_days=123
)

Attributes

newer_noncurrent_versions

Specifies how many noncurrent versions Amazon S3 will retain.

If there are this many more recent noncurrent versions, Amazon S3 will take the associated action. For more information about noncurrent versions, see Lifecycle configuration elements in the Amazon S3 User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-noncurrentversionexpiration.html#cfn-s3-bucket-noncurrentversionexpiration-newernoncurrentversions

noncurrent_days

Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action.

For information about the noncurrent days calculations, see How Amazon S3 Calculates When an Object Became Noncurrent in the Amazon S3 User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-noncurrentversionexpiration.html#cfn-s3-bucket-noncurrentversionexpiration-noncurrentdays

NoncurrentVersionTransitionProperty

class CfnBucketPropsMixin.NoncurrentVersionTransitionProperty(*, newer_noncurrent_versions=None, storage_class=None, transition_in_days=None)

Bases: object

Container for the transition rule that describes when noncurrent objects transition to the STANDARD_IA , ONEZONE_IA , INTELLIGENT_TIERING , GLACIER_IR , GLACIER , or DEEP_ARCHIVE storage class.

If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to the STANDARD_IA , ONEZONE_IA , INTELLIGENT_TIERING , GLACIER_IR , GLACIER , or DEEP_ARCHIVE storage class at a specific period in the object’s lifetime. If you specify this property, don’t specify the NoncurrentVersionTransitions property.

Parameters:
  • newer_noncurrent_versions (Union[int, float, None]) –

    Specifies how many noncurrent versions Amazon S3 will retain. If there are this many more recent noncurrent versions, Amazon S3 will take the associated action. For more information about noncurrent versions, see Lifecycle configuration elements in the Amazon S3 User Guide .

  • storage_class (Optional[str]) – The class of storage used to store the object.

  • transition_in_days (Union[int, float, None]) – Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. For information about the noncurrent days calculations, see How Amazon S3 Calculates How Long an Object Has Been Noncurrent in the Amazon S3 User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-noncurrentversiontransition.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.mixins_preview.aws_s3 import mixins as s3_mixins

noncurrent_version_transition_property = s3_mixins.CfnBucketPropsMixin.NoncurrentVersionTransitionProperty(
    newer_noncurrent_versions=123,
    storage_class="storageClass",
    transition_in_days=123
)

Attributes

newer_noncurrent_versions

Specifies how many noncurrent versions Amazon S3 will retain.

If there are this many more recent noncurrent versions, Amazon S3 will take the associated action. For more information about noncurrent versions, see Lifecycle configuration elements in the Amazon S3 User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-noncurrentversiontransition.html#cfn-s3-bucket-noncurrentversiontransition-newernoncurrentversions

storage_class

The class of storage used to store the object.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-noncurrentversiontransition.html#cfn-s3-bucket-noncurrentversiontransition-storageclass

transition_in_days

Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action.

For information about the noncurrent days calculations, see How Amazon S3 Calculates How Long an Object Has Been Noncurrent in the Amazon S3 User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-noncurrentversiontransition.html#cfn-s3-bucket-noncurrentversiontransition-transitionindays

NotificationConfigurationProperty

class CfnBucketPropsMixin.NotificationConfigurationProperty(*, event_bridge_configuration=None, lambda_configurations=None, queue_configurations=None, topic_configurations=None)

Bases: object

Describes the notification configuration for an Amazon S3 bucket.

If you create the target resource and related permissions in the same template, you might have a circular dependency.

For example, you might use the AWS::Lambda::Permission resource to grant the bucket permission to invoke an AWS Lambda function. However, AWS CloudFormation can’t create the bucket until the bucket has permission to invoke the function ( AWS CloudFormation checks whether the bucket can invoke the function). If you’re using Refs to pass the bucket name, this leads to a circular dependency.

To avoid this dependency, you can create all resources without specifying the notification configuration. Then, update the stack with a notification configuration.

For more information on permissions, see AWS::Lambda::Permission and Granting Permissions to Publish Event Notification Messages to a Destination .

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

notification_configuration_property = s3_mixins.CfnBucketPropsMixin.NotificationConfigurationProperty(
    event_bridge_configuration=s3_mixins.CfnBucketPropsMixin.EventBridgeConfigurationProperty(
        event_bridge_enabled=False
    ),
    lambda_configurations=[s3_mixins.CfnBucketPropsMixin.LambdaConfigurationProperty(
        event="event",
        filter=s3_mixins.CfnBucketPropsMixin.NotificationFilterProperty(
            s3_key=s3_mixins.CfnBucketPropsMixin.S3KeyFilterProperty(
                rules=[s3_mixins.CfnBucketPropsMixin.FilterRuleProperty(
                    name="name",
                    value="value"
                )]
            )
        ),
        function="function"
    )],
    queue_configurations=[s3_mixins.CfnBucketPropsMixin.QueueConfigurationProperty(
        event="event",
        filter=s3_mixins.CfnBucketPropsMixin.NotificationFilterProperty(
            s3_key=s3_mixins.CfnBucketPropsMixin.S3KeyFilterProperty(
                rules=[s3_mixins.CfnBucketPropsMixin.FilterRuleProperty(
                    name="name",
                    value="value"
                )]
            )
        ),
        queue="queue"
    )],
    topic_configurations=[s3_mixins.CfnBucketPropsMixin.TopicConfigurationProperty(
        event="event",
        filter=s3_mixins.CfnBucketPropsMixin.NotificationFilterProperty(
            s3_key=s3_mixins.CfnBucketPropsMixin.S3KeyFilterProperty(
                rules=[s3_mixins.CfnBucketPropsMixin.FilterRuleProperty(
                    name="name",
                    value="value"
                )]
            )
        ),
        topic="topic"
    )]
)

Attributes

event_bridge_configuration

Enables delivery of events to Amazon EventBridge.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration.html#cfn-s3-bucket-notificationconfiguration-eventbridgeconfiguration

lambda_configurations

Describes the AWS Lambda functions to invoke and the events for which to invoke them.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration.html#cfn-s3-bucket-notificationconfiguration-lambdaconfigurations

queue_configurations

The Amazon Simple Queue Service queues to publish messages to and the events for which to publish messages.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration.html#cfn-s3-bucket-notificationconfiguration-queueconfigurations

topic_configurations

The topic to which notifications are sent and the events for which notifications are generated.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration.html#cfn-s3-bucket-notificationconfiguration-topicconfigurations

NotificationFilterProperty

class CfnBucketPropsMixin.NotificationFilterProperty(*, s3_key=None)

Bases: object

Specifies object key name filtering rules.

For information about key name filtering, see Configuring event notifications using object key name filtering in the Amazon S3 User Guide .

Parameters:

s3_key (Union[IResolvable, S3KeyFilterProperty, Dict[str, Any], None]) – A container for object key name prefix and suffix filtering rules.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationfilter.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.mixins_preview.aws_s3 import mixins as s3_mixins

notification_filter_property = s3_mixins.CfnBucketPropsMixin.NotificationFilterProperty(
    s3_key=s3_mixins.CfnBucketPropsMixin.S3KeyFilterProperty(
        rules=[s3_mixins.CfnBucketPropsMixin.FilterRuleProperty(
            name="name",
            value="value"
        )]
    )
)

Attributes

s3_key

A container for object key name prefix and suffix filtering rules.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationfilter.html#cfn-s3-bucket-notificationfilter-s3key

ObjectLockConfigurationProperty

class CfnBucketPropsMixin.ObjectLockConfigurationProperty(*, object_lock_enabled=None, rule=None)

Bases: object

Places an Object Lock configuration on the specified bucket.

The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket. For more information, see Locking Objects .

Parameters:
  • object_lock_enabled (Optional[str]) – Indicates whether this bucket has an Object Lock configuration enabled. Enable ObjectLockEnabled when you apply ObjectLockConfiguration to a bucket.

  • rule (Union[IResolvable, ObjectLockRuleProperty, Dict[str, Any], None]) – Specifies the Object Lock rule for the specified object. Enable this rule when you apply ObjectLockConfiguration to a bucket. If Object Lock is turned on, bucket settings require both Mode and a period of either Days or Years . You cannot specify Days and Years at the same time. For more information, see ObjectLockRule and DefaultRetention .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-objectlockconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

object_lock_configuration_property = s3_mixins.CfnBucketPropsMixin.ObjectLockConfigurationProperty(
    object_lock_enabled="objectLockEnabled",
    rule=s3_mixins.CfnBucketPropsMixin.ObjectLockRuleProperty(
        default_retention=s3_mixins.CfnBucketPropsMixin.DefaultRetentionProperty(
            days=123,
            mode="mode",
            years=123
        )
    )
)

Attributes

object_lock_enabled

Indicates whether this bucket has an Object Lock configuration enabled.

Enable ObjectLockEnabled when you apply ObjectLockConfiguration to a bucket.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-objectlockconfiguration.html#cfn-s3-bucket-objectlockconfiguration-objectlockenabled

rule

Specifies the Object Lock rule for the specified object.

Enable this rule when you apply ObjectLockConfiguration to a bucket. If Object Lock is turned on, bucket settings require both Mode and a period of either Days or Years . You cannot specify Days and Years at the same time. For more information, see ObjectLockRule and DefaultRetention .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-objectlockconfiguration.html#cfn-s3-bucket-objectlockconfiguration-rule

ObjectLockRuleProperty

class CfnBucketPropsMixin.ObjectLockRuleProperty(*, default_retention=None)

Bases: object

Specifies the Object Lock rule for the specified object.

Enable the this rule when you apply ObjectLockConfiguration to a bucket.

Parameters:

default_retention (Union[IResolvable, DefaultRetentionProperty, Dict[str, Any], None]) –

The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket. If Object Lock is turned on, bucket settings require both Mode and a period of either Days or Years . You cannot specify Days and Years at the same time. For more information about allowable values for mode and period, see DefaultRetention .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-objectlockrule.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.mixins_preview.aws_s3 import mixins as s3_mixins

object_lock_rule_property = s3_mixins.CfnBucketPropsMixin.ObjectLockRuleProperty(
    default_retention=s3_mixins.CfnBucketPropsMixin.DefaultRetentionProperty(
        days=123,
        mode="mode",
        years=123
    )
)

Attributes

default_retention

The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket.

If Object Lock is turned on, bucket settings require both Mode and a period of either Days or Years . You cannot specify Days and Years at the same time. For more information about allowable values for mode and period, see DefaultRetention .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-objectlockrule.html#cfn-s3-bucket-objectlockrule-defaultretention

OwnershipControlsProperty

class CfnBucketPropsMixin.OwnershipControlsProperty(*, rules=None)

Bases: object

Specifies the container element for Object Ownership rules.

S3 Object Ownership is an Amazon S3 bucket-level setting that you can use to disable access control lists (ACLs) and take ownership of every object in your bucket, simplifying access management for data stored in Amazon S3. For more information, see Controlling ownership of objects and disabling ACLs in the Amazon S3 User Guide .

Parameters:

rules (Union[IResolvable, Sequence[Union[IResolvable, OwnershipControlsRuleProperty, Dict[str, Any]]], None]) – Specifies the container element for Object Ownership rules.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-ownershipcontrols.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.mixins_preview.aws_s3 import mixins as s3_mixins

ownership_controls_property = s3_mixins.CfnBucketPropsMixin.OwnershipControlsProperty(
    rules=[s3_mixins.CfnBucketPropsMixin.OwnershipControlsRuleProperty(
        object_ownership="objectOwnership"
    )]
)

Attributes

rules

Specifies the container element for Object Ownership rules.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-ownershipcontrols.html#cfn-s3-bucket-ownershipcontrols-rules

OwnershipControlsRuleProperty

class CfnBucketPropsMixin.OwnershipControlsRuleProperty(*, object_ownership=None)

Bases: object

Specifies an Object Ownership rule.

S3 Object Ownership is an Amazon S3 bucket-level setting that you can use to disable access control lists (ACLs) and take ownership of every object in your bucket, simplifying access management for data stored in Amazon S3. For more information, see Controlling ownership of objects and disabling ACLs in the Amazon S3 User Guide .

Parameters:

object_ownership (Optional[str]) – Specifies an object ownership rule.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-ownershipcontrolsrule.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.mixins_preview.aws_s3 import mixins as s3_mixins

ownership_controls_rule_property = s3_mixins.CfnBucketPropsMixin.OwnershipControlsRuleProperty(
    object_ownership="objectOwnership"
)

Attributes

object_ownership

Specifies an object ownership rule.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-ownershipcontrolsrule.html#cfn-s3-bucket-ownershipcontrolsrule-objectownership

PartitionedPrefixProperty

class CfnBucketPropsMixin.PartitionedPrefixProperty(*, partition_date_source=None)

Bases: object

Amazon S3 keys for log objects are partitioned in the following format:.

[DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString]

PartitionedPrefix defaults to EventTime delivery when server access logs are delivered.

Parameters:

partition_date_source (Optional[str]) – Specifies the partition date source for the partitioned prefix. PartitionDateSource can be EventTime or DeliveryTime . For DeliveryTime , the time in the log file names corresponds to the delivery time for the log files. For EventTime , The logs delivered are for a specific day only. The year, month, and day correspond to the day on which the event occurred, and the hour, minutes and seconds are set to 00 in the key.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-partitionedprefix.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.mixins_preview.aws_s3 import mixins as s3_mixins

partitioned_prefix_property = s3_mixins.CfnBucketPropsMixin.PartitionedPrefixProperty(
    partition_date_source="partitionDateSource"
)

Attributes

partition_date_source

Specifies the partition date source for the partitioned prefix. PartitionDateSource can be EventTime or DeliveryTime .

For DeliveryTime , the time in the log file names corresponds to the delivery time for the log files.

For EventTime , The logs delivered are for a specific day only. The year, month, and day correspond to the day on which the event occurred, and the hour, minutes and seconds are set to 00 in the key.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-partitionedprefix.html#cfn-s3-bucket-partitionedprefix-partitiondatesource

PublicAccessBlockConfigurationProperty

class CfnBucketPropsMixin.PublicAccessBlockConfigurationProperty(*, block_public_acls=None, block_public_policy=None, ignore_public_acls=None, restrict_public_buckets=None)

Bases: object

The PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket.

You can enable the configuration options in any combination. Bucket-level settings work alongside account-level settings (which may inherit from organization-level policies). For more information about when Amazon S3 considers a bucket or object public, see The Meaning of “Public” in the Amazon S3 User Guide .

Parameters:
  • block_public_acls (Union[bool, IResolvable, None]) – Specifies whether Amazon S3 should block public access control lists (ACLs) for this bucket and objects in this bucket. Setting this element to TRUE causes the following behavior: - PUT Bucket ACL and PUT Object ACL calls fail if the specified ACL is public. - PUT Object calls fail if the request includes a public ACL. - PUT Bucket calls fail if the request includes a public ACL. Enabling this setting doesn’t affect existing policies or ACLs.

  • block_public_policy (Union[bool, IResolvable, None]) – Specifies whether Amazon S3 should block public bucket policies for this bucket. Setting this element to TRUE causes Amazon S3 to reject calls to PUT Bucket policy if the specified bucket policy allows public access. Enabling this setting doesn’t affect existing bucket policies.

  • ignore_public_acls (Union[bool, IResolvable, None]) – Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket. Setting this element to TRUE causes Amazon S3 to ignore all public ACLs on this bucket and objects in this bucket. Enabling this setting doesn’t affect the persistence of any existing ACLs and doesn’t prevent new public ACLs from being set.

  • restrict_public_buckets (Union[bool, IResolvable, None]) – Specifies whether Amazon S3 should restrict public bucket policies for this bucket. Setting this element to TRUE restricts access to this bucket to only AWS service principals and authorized users within this account if the bucket has a public policy. Enabling this setting doesn’t affect previously stored bucket policies, except that public and cross-account access within any public bucket policy, including non-public delegation to specific accounts, is blocked.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-publicaccessblockconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

public_access_block_configuration_property = s3_mixins.CfnBucketPropsMixin.PublicAccessBlockConfigurationProperty(
    block_public_acls=False,
    block_public_policy=False,
    ignore_public_acls=False,
    restrict_public_buckets=False
)

Attributes

block_public_acls

Specifies whether Amazon S3 should block public access control lists (ACLs) for this bucket and objects in this bucket.

Setting this element to TRUE causes the following behavior:

  • PUT Bucket ACL and PUT Object ACL calls fail if the specified ACL is public.

  • PUT Object calls fail if the request includes a public ACL.

  • PUT Bucket calls fail if the request includes a public ACL.

Enabling this setting doesn’t affect existing policies or ACLs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-publicaccessblockconfiguration.html#cfn-s3-bucket-publicaccessblockconfiguration-blockpublicacls

block_public_policy

Specifies whether Amazon S3 should block public bucket policies for this bucket.

Setting this element to TRUE causes Amazon S3 to reject calls to PUT Bucket policy if the specified bucket policy allows public access.

Enabling this setting doesn’t affect existing bucket policies.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-publicaccessblockconfiguration.html#cfn-s3-bucket-publicaccessblockconfiguration-blockpublicpolicy

ignore_public_acls

Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket.

Setting this element to TRUE causes Amazon S3 to ignore all public ACLs on this bucket and objects in this bucket.

Enabling this setting doesn’t affect the persistence of any existing ACLs and doesn’t prevent new public ACLs from being set.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-publicaccessblockconfiguration.html#cfn-s3-bucket-publicaccessblockconfiguration-ignorepublicacls

restrict_public_buckets

Specifies whether Amazon S3 should restrict public bucket policies for this bucket.

Setting this element to TRUE restricts access to this bucket to only AWS service principals and authorized users within this account if the bucket has a public policy.

Enabling this setting doesn’t affect previously stored bucket policies, except that public and cross-account access within any public bucket policy, including non-public delegation to specific accounts, is blocked.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-publicaccessblockconfiguration.html#cfn-s3-bucket-publicaccessblockconfiguration-restrictpublicbuckets

QueueConfigurationProperty

class CfnBucketPropsMixin.QueueConfigurationProperty(*, event=None, filter=None, queue=None)

Bases: object

Specifies the configuration for publishing messages to an Amazon Simple Queue Service (Amazon SQS) queue when Amazon S3 detects specified events.

Parameters:
  • event (Optional[str]) –

    The Amazon S3 bucket event about which you want to publish messages to Amazon SQS. For more information, see Supported Event Types in the Amazon S3 User Guide .

  • filter (Union[IResolvable, NotificationFilterProperty, Dict[str, Any], None]) –

    The filtering rules that determine which objects trigger notifications. For example, you can create a filter so that Amazon S3 sends notifications only when image files with a .jpg extension are added to the bucket. For more information, see Configuring event notifications using object key name filtering in the Amazon S3 User Guide .

  • queue (Optional[str]) – The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 publishes a message when it detects events of the specified type. FIFO queues are not allowed when enabling an SQS queue as the event notification destination.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-queueconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

queue_configuration_property = s3_mixins.CfnBucketPropsMixin.QueueConfigurationProperty(
    event="event",
    filter=s3_mixins.CfnBucketPropsMixin.NotificationFilterProperty(
        s3_key=s3_mixins.CfnBucketPropsMixin.S3KeyFilterProperty(
            rules=[s3_mixins.CfnBucketPropsMixin.FilterRuleProperty(
                name="name",
                value="value"
            )]
        )
    ),
    queue="queue"
)

Attributes

event

The Amazon S3 bucket event about which you want to publish messages to Amazon SQS.

For more information, see Supported Event Types in the Amazon S3 User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-queueconfiguration.html#cfn-s3-bucket-queueconfiguration-event

filter

The filtering rules that determine which objects trigger notifications.

For example, you can create a filter so that Amazon S3 sends notifications only when image files with a .jpg extension are added to the bucket. For more information, see Configuring event notifications using object key name filtering in the Amazon S3 User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-queueconfiguration.html#cfn-s3-bucket-queueconfiguration-filter

queue

The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 publishes a message when it detects events of the specified type.

FIFO queues are not allowed when enabling an SQS queue as the event notification destination.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-queueconfiguration.html#cfn-s3-bucket-queueconfiguration-queue

RecordExpirationProperty

class CfnBucketPropsMixin.RecordExpirationProperty(*, days=None, expiration=None)

Bases: object

The journal table record expiration settings for a journal table in an S3 Metadata configuration.

Parameters:
  • days (Union[int, float, None]) – If you enable journal table record expiration, you can set the number of days to retain your journal table records. Journal table records must be retained for a minimum of 7 days. To set this value, specify any whole number from 7 to 2147483647 . For example, to retain your journal table records for one year, set this value to 365 .

  • expiration (Optional[str]) – Specifies whether journal table record expiration is enabled or disabled.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-recordexpiration.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.mixins_preview.aws_s3 import mixins as s3_mixins

record_expiration_property = s3_mixins.CfnBucketPropsMixin.RecordExpirationProperty(
    days=123,
    expiration="expiration"
)

Attributes

days

If you enable journal table record expiration, you can set the number of days to retain your journal table records.

Journal table records must be retained for a minimum of 7 days. To set this value, specify any whole number from 7 to 2147483647 . For example, to retain your journal table records for one year, set this value to 365 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-recordexpiration.html#cfn-s3-bucket-recordexpiration-days

expiration

Specifies whether journal table record expiration is enabled or disabled.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-recordexpiration.html#cfn-s3-bucket-recordexpiration-expiration

RedirectAllRequestsToProperty

class CfnBucketPropsMixin.RedirectAllRequestsToProperty(*, host_name=None, protocol=None)

Bases: object

Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 bucket.

Parameters:
  • host_name (Optional[str]) – Name of the host where requests are redirected.

  • protocol (Optional[str]) – Protocol to use when redirecting requests. The default is the protocol that is used in the original request.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-redirectallrequeststo.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.mixins_preview.aws_s3 import mixins as s3_mixins

redirect_all_requests_to_property = s3_mixins.CfnBucketPropsMixin.RedirectAllRequestsToProperty(
    host_name="hostName",
    protocol="protocol"
)

Attributes

host_name

Name of the host where requests are redirected.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-redirectallrequeststo.html#cfn-s3-bucket-redirectallrequeststo-hostname

protocol

Protocol to use when redirecting requests.

The default is the protocol that is used in the original request.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-redirectallrequeststo.html#cfn-s3-bucket-redirectallrequeststo-protocol

RedirectRuleProperty

class CfnBucketPropsMixin.RedirectRuleProperty(*, host_name=None, http_redirect_code=None, protocol=None, replace_key_prefix_with=None, replace_key_with=None)

Bases: object

Specifies how requests are redirected.

In the event of an error, you can specify a different error code to return.

Parameters:
  • host_name (Optional[str]) – The host name to use in the redirect request.

  • http_redirect_code (Optional[str]) – The HTTP redirect code to use on the response. Not required if one of the siblings is present.

  • protocol (Optional[str]) – Protocol to use when redirecting requests. The default is the protocol that is used in the original request.

  • replace_key_prefix_with (Optional[str]) – The object key prefix to use in the redirect request. For example, to redirect requests for all pages with prefix docs/ (objects in the docs/ folder) to documents/ , you can set a condition block with KeyPrefixEquals set to docs/ and in the Redirect set ReplaceKeyPrefixWith to /documents . Not required if one of the siblings is present. Can be present only if ReplaceKeyWith is not provided. .. epigraph:: Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints .

  • replace_key_with (Optional[str]) –

    The specific object key to use in the redirect request. For example, redirect request to error.html . Not required if one of the siblings is present. Can be present only if ReplaceKeyPrefixWith is not provided. .. epigraph:: Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-redirectrule.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.mixins_preview.aws_s3 import mixins as s3_mixins

redirect_rule_property = s3_mixins.CfnBucketPropsMixin.RedirectRuleProperty(
    host_name="hostName",
    http_redirect_code="httpRedirectCode",
    protocol="protocol",
    replace_key_prefix_with="replaceKeyPrefixWith",
    replace_key_with="replaceKeyWith"
)

Attributes

host_name

The host name to use in the redirect request.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-redirectrule.html#cfn-s3-bucket-redirectrule-hostname

http_redirect_code

The HTTP redirect code to use on the response.

Not required if one of the siblings is present.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-redirectrule.html#cfn-s3-bucket-redirectrule-httpredirectcode

protocol

Protocol to use when redirecting requests.

The default is the protocol that is used in the original request.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-redirectrule.html#cfn-s3-bucket-redirectrule-protocol

replace_key_prefix_with

The object key prefix to use in the redirect request.

For example, to redirect requests for all pages with prefix docs/ (objects in the docs/ folder) to documents/ , you can set a condition block with KeyPrefixEquals set to docs/ and in the Redirect set ReplaceKeyPrefixWith to /documents . Not required if one of the siblings is present. Can be present only if ReplaceKeyWith is not provided. .. epigraph:

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see `XML related object key constraints <https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints>`_ .
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-redirectrule.html#cfn-s3-bucket-redirectrule-replacekeyprefixwith

replace_key_with

The specific object key to use in the redirect request.

For example, redirect request to error.html . Not required if one of the siblings is present. Can be present only if ReplaceKeyPrefixWith is not provided. .. epigraph:

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see `XML related object key constraints <https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints>`_ .
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-redirectrule.html#cfn-s3-bucket-redirectrule-replacekeywith

ReplicaModificationsProperty

class CfnBucketPropsMixin.ReplicaModificationsProperty(*, status=None)

Bases: object

A filter that you can specify for selection for modifications on replicas.

Parameters:

status (Optional[str]) – Specifies whether Amazon S3 replicates modifications on replicas. Allowed values : Enabled | Disabled

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicamodifications.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.mixins_preview.aws_s3 import mixins as s3_mixins

replica_modifications_property = s3_mixins.CfnBucketPropsMixin.ReplicaModificationsProperty(
    status="status"
)

Attributes

status

Specifies whether Amazon S3 replicates modifications on replicas.

Allowed values : Enabled | Disabled

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicamodifications.html#cfn-s3-bucket-replicamodifications-status

ReplicationConfigurationProperty

class CfnBucketPropsMixin.ReplicationConfigurationProperty(*, role=None, rules=None)

Bases: object

A container for replication rules.

You can add up to 1,000 rules. The maximum size of a replication configuration is 2 MB. The latest version of the replication configuration XML is V2. For more information about XML V2 replication configurations, see Replication configuration in the Amazon S3 User Guide .

Parameters:
  • role (Optional[str]) – The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that Amazon S3 assumes when replicating objects. For more information, see How to Set Up Replication in the Amazon S3 User Guide .

  • rules (Union[IResolvable, Sequence[Union[IResolvable, ReplicationRuleProperty, Dict[str, Any]]], None]) – A container for one or more replication rules. A replication configuration must have at least one rule and can contain a maximum of 1,000 rules.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

replication_configuration_property = s3_mixins.CfnBucketPropsMixin.ReplicationConfigurationProperty(
    role="role",
    rules=[s3_mixins.CfnBucketPropsMixin.ReplicationRuleProperty(
        delete_marker_replication=s3_mixins.CfnBucketPropsMixin.DeleteMarkerReplicationProperty(
            status="status"
        ),
        destination=s3_mixins.CfnBucketPropsMixin.ReplicationDestinationProperty(
            access_control_translation=s3_mixins.CfnBucketPropsMixin.AccessControlTranslationProperty(
                owner="owner"
            ),
            account="account",
            bucket="bucket",
            encryption_configuration=s3_mixins.CfnBucketPropsMixin.EncryptionConfigurationProperty(
                replica_kms_key_id="replicaKmsKeyId"
            ),
            metrics=s3_mixins.CfnBucketPropsMixin.MetricsProperty(
                event_threshold=s3_mixins.CfnBucketPropsMixin.ReplicationTimeValueProperty(
                    minutes=123
                ),
                status="status"
            ),
            replication_time=s3_mixins.CfnBucketPropsMixin.ReplicationTimeProperty(
                status="status",
                time=s3_mixins.CfnBucketPropsMixin.ReplicationTimeValueProperty(
                    minutes=123
                )
            ),
            storage_class="storageClass"
        ),
        filter=s3_mixins.CfnBucketPropsMixin.ReplicationRuleFilterProperty(
            and=s3_mixins.CfnBucketPropsMixin.ReplicationRuleAndOperatorProperty(
                prefix="prefix",
                tag_filters=[s3_mixins.CfnBucketPropsMixin.TagFilterProperty(
                    key="key",
                    value="value"
                )]
            ),
            prefix="prefix",
            tag_filter=s3_mixins.CfnBucketPropsMixin.TagFilterProperty(
                key="key",
                value="value"
            )
        ),
        id="id",
        prefix="prefix",
        priority=123,
        source_selection_criteria=s3_mixins.CfnBucketPropsMixin.SourceSelectionCriteriaProperty(
            replica_modifications=s3_mixins.CfnBucketPropsMixin.ReplicaModificationsProperty(
                status="status"
            ),
            sse_kms_encrypted_objects=s3_mixins.CfnBucketPropsMixin.SseKmsEncryptedObjectsProperty(
                status="status"
            )
        ),
        status="status"
    )]
)

Attributes

role

The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that Amazon S3 assumes when replicating objects.

For more information, see How to Set Up Replication in the Amazon S3 User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration.html#cfn-s3-bucket-replicationconfiguration-role

rules

A container for one or more replication rules.

A replication configuration must have at least one rule and can contain a maximum of 1,000 rules.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration.html#cfn-s3-bucket-replicationconfiguration-rules

ReplicationDestinationProperty

class CfnBucketPropsMixin.ReplicationDestinationProperty(*, access_control_translation=None, account=None, bucket=None, encryption_configuration=None, metrics=None, replication_time=None, storage_class=None)

Bases: object

A container for information about the replication destination and its configurations including enabling the S3 Replication Time Control (S3 RTC).

Parameters:
  • access_control_translation (Union[IResolvable, AccessControlTranslationProperty, Dict[str, Any], None]) – Specify this only in a cross-account scenario (where source and destination bucket owners are not the same), and you want to change replica ownership to the AWS account that owns the destination bucket. If this is not specified in the replication configuration, the replicas are owned by same AWS account that owns the source object.

  • account (Optional[str]) – Destination bucket owner account ID. In a cross-account scenario, if you direct Amazon S3 to change replica ownership to the AWS account that owns the destination bucket by specifying the AccessControlTranslation property, this is the account ID of the destination bucket owner. For more information, see Cross-Region Replication Additional Configuration: Change Replica Owner in the Amazon S3 User Guide . If you specify the AccessControlTranslation property, the Account property is required.

  • bucket (Optional[str]) – The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store the results.

  • encryption_configuration (Union[IResolvable, EncryptionConfigurationProperty, Dict[str, Any], None]) – Specifies encryption-related information.

  • metrics (Union[IResolvable, MetricsProperty, Dict[str, Any], None]) – A container specifying replication metrics-related settings enabling replication metrics and events.

  • replication_time (Union[IResolvable, ReplicationTimeProperty, Dict[str, Any], None]) – A container specifying S3 Replication Time Control (S3 RTC), including whether S3 RTC is enabled and the time when all objects and operations on objects must be replicated. Must be specified together with a Metrics block.

  • storage_class (Optional[str]) –

    The storage class to use when replicating objects, such as S3 Standard or reduced redundancy. By default, Amazon S3 uses the storage class of the source object to create the object replica. For valid values, see the StorageClass element of the PUT Bucket replication action in the Amazon S3 API Reference . FSX_OPENZFS is not an accepted value when replicating objects.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationdestination.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.mixins_preview.aws_s3 import mixins as s3_mixins

replication_destination_property = s3_mixins.CfnBucketPropsMixin.ReplicationDestinationProperty(
    access_control_translation=s3_mixins.CfnBucketPropsMixin.AccessControlTranslationProperty(
        owner="owner"
    ),
    account="account",
    bucket="bucket",
    encryption_configuration=s3_mixins.CfnBucketPropsMixin.EncryptionConfigurationProperty(
        replica_kms_key_id="replicaKmsKeyId"
    ),
    metrics=s3_mixins.CfnBucketPropsMixin.MetricsProperty(
        event_threshold=s3_mixins.CfnBucketPropsMixin.ReplicationTimeValueProperty(
            minutes=123
        ),
        status="status"
    ),
    replication_time=s3_mixins.CfnBucketPropsMixin.ReplicationTimeProperty(
        status="status",
        time=s3_mixins.CfnBucketPropsMixin.ReplicationTimeValueProperty(
            minutes=123
        )
    ),
    storage_class="storageClass"
)

Attributes

access_control_translation

Specify this only in a cross-account scenario (where source and destination bucket owners are not the same), and you want to change replica ownership to the AWS account that owns the destination bucket.

If this is not specified in the replication configuration, the replicas are owned by same AWS account that owns the source object.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationdestination.html#cfn-s3-bucket-replicationdestination-accesscontroltranslation

account

Destination bucket owner account ID.

In a cross-account scenario, if you direct Amazon S3 to change replica ownership to the AWS account that owns the destination bucket by specifying the AccessControlTranslation property, this is the account ID of the destination bucket owner. For more information, see Cross-Region Replication Additional Configuration: Change Replica Owner in the Amazon S3 User Guide .

If you specify the AccessControlTranslation property, the Account property is required.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationdestination.html#cfn-s3-bucket-replicationdestination-account

bucket

The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store the results.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationdestination.html#cfn-s3-bucket-replicationdestination-bucket

encryption_configuration

Specifies encryption-related information.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationdestination.html#cfn-s3-bucket-replicationdestination-encryptionconfiguration

metrics

A container specifying replication metrics-related settings enabling replication metrics and events.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationdestination.html#cfn-s3-bucket-replicationdestination-metrics

replication_time

A container specifying S3 Replication Time Control (S3 RTC), including whether S3 RTC is enabled and the time when all objects and operations on objects must be replicated.

Must be specified together with a Metrics block.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationdestination.html#cfn-s3-bucket-replicationdestination-replicationtime

storage_class

The storage class to use when replicating objects, such as S3 Standard or reduced redundancy.

By default, Amazon S3 uses the storage class of the source object to create the object replica.

For valid values, see the StorageClass element of the PUT Bucket replication action in the Amazon S3 API Reference .

FSX_OPENZFS is not an accepted value when replicating objects.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationdestination.html#cfn-s3-bucket-replicationdestination-storageclass

ReplicationRuleAndOperatorProperty

class CfnBucketPropsMixin.ReplicationRuleAndOperatorProperty(*, prefix=None, tag_filters=None)

Bases: object

A container for specifying rule filters.

The filters determine the subset of objects to which the rule applies. This element is required only if you specify more than one filter.

For example:

  • If you specify both a Prefix and a TagFilter , wrap these filters in an And tag.

  • If you specify a filter based on multiple tags, wrap the TagFilter elements in an And tag

Parameters:
  • prefix (Optional[str]) – An object key name prefix that identifies the subset of objects to which the rule applies.

  • tag_filters (Union[IResolvable, Sequence[Union[IResolvable, TagFilterProperty, Dict[str, Any]]], None]) – An array of tags containing key and value pairs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationruleandoperator.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.mixins_preview.aws_s3 import mixins as s3_mixins

replication_rule_and_operator_property = s3_mixins.CfnBucketPropsMixin.ReplicationRuleAndOperatorProperty(
    prefix="prefix",
    tag_filters=[s3_mixins.CfnBucketPropsMixin.TagFilterProperty(
        key="key",
        value="value"
    )]
)

Attributes

prefix

An object key name prefix that identifies the subset of objects to which the rule applies.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationruleandoperator.html#cfn-s3-bucket-replicationruleandoperator-prefix

tag_filters

An array of tags containing key and value pairs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationruleandoperator.html#cfn-s3-bucket-replicationruleandoperator-tagfilters

ReplicationRuleFilterProperty

class CfnBucketPropsMixin.ReplicationRuleFilterProperty(*, and_=None, prefix=None, tag_filter=None)

Bases: object

A filter that identifies the subset of objects to which the replication rule applies.

A Filter must specify exactly one Prefix , TagFilter , or an And child element.

Parameters:
  • and – A container for specifying rule filters. The filters determine the subset of objects to which the rule applies. This element is required only if you specify more than one filter. For example: - If you specify both a Prefix and a TagFilter , wrap these filters in an And tag. - If you specify a filter based on multiple tags, wrap the TagFilter elements in an And tag.

  • prefix (Optional[str]) –

    An object key name prefix that identifies the subset of objects to which the rule applies. .. epigraph:: Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints .

  • tag_filter (Union[IResolvable, TagFilterProperty, Dict[str, Any], None]) – A container for specifying a tag key and value. The rule applies only to objects that have the tag in their tag set.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationrulefilter.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.mixins_preview.aws_s3 import mixins as s3_mixins

replication_rule_filter_property = s3_mixins.CfnBucketPropsMixin.ReplicationRuleFilterProperty(
    and=s3_mixins.CfnBucketPropsMixin.ReplicationRuleAndOperatorProperty(
        prefix="prefix",
        tag_filters=[s3_mixins.CfnBucketPropsMixin.TagFilterProperty(
            key="key",
            value="value"
        )]
    ),
    prefix="prefix",
    tag_filter=s3_mixins.CfnBucketPropsMixin.TagFilterProperty(
        key="key",
        value="value"
    )
)

Attributes

and_

A container for specifying rule filters.

The filters determine the subset of objects to which the rule applies. This element is required only if you specify more than one filter. For example:

  • If you specify both a Prefix and a TagFilter , wrap these filters in an And tag.

  • If you specify a filter based on multiple tags, wrap the TagFilter elements in an And tag.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationrulefilter.html#cfn-s3-bucket-replicationrulefilter-and

prefix

An object key name prefix that identifies the subset of objects to which the rule applies.

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationrulefilter.html#cfn-s3-bucket-replicationrulefilter-prefix

tag_filter

A container for specifying a tag key and value.

The rule applies only to objects that have the tag in their tag set.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationrulefilter.html#cfn-s3-bucket-replicationrulefilter-tagfilter

ReplicationRuleProperty

class CfnBucketPropsMixin.ReplicationRuleProperty(*, delete_marker_replication=None, destination=None, filter=None, id=None, prefix=None, priority=None, source_selection_criteria=None, status=None)

Bases: object

Specifies which Amazon S3 objects to replicate and where to store the replicas.

Parameters:
  • delete_marker_replication (Union[IResolvable, DeleteMarkerReplicationProperty, Dict[str, Any], None]) –

    Specifies whether Amazon S3 replicates delete markers. If you specify a Filter in your replication configuration, you must also include a DeleteMarkerReplication element. If your Filter includes a Tag element, the DeleteMarkerReplication Status must be set to Disabled, because Amazon S3 does not support replicating delete markers for tag-based rules. For an example configuration, see Basic Rule Configuration . For more information about delete marker replication, see Basic Rule Configuration . .. epigraph:: If you are using an earlier version of the replication configuration, Amazon S3 handles replication of delete markers differently. For more information, see Backward Compatibility .

  • destination (Union[IResolvable, ReplicationDestinationProperty, Dict[str, Any], None]) – A container for information about the replication destination and its configurations including enabling the S3 Replication Time Control (S3 RTC).

  • filter (Union[IResolvable, ReplicationRuleFilterProperty, Dict[str, Any], None]) – A filter that identifies the subset of objects to which the replication rule applies. A Filter must specify exactly one Prefix , TagFilter , or an And child element. The use of the filter field indicates that this is a V2 replication configuration. This field isn’t supported in a V1 replication configuration. .. epigraph:: V1 replication configuration only supports filtering by key prefix. To filter using a V1 replication configuration, add the Prefix directly as a child element of the Rule element.

  • id (Optional[str]) – A unique identifier for the rule. The maximum value is 255 characters. If you don’t specify a value, AWS CloudFormation generates a random ID. When using a V2 replication configuration this property is capitalized as “ID”.

  • prefix (Optional[str]) –

    An object key name prefix that identifies the object or objects to which the rule applies. The maximum prefix length is 1,024 characters. To include all objects in a bucket, specify an empty string. To filter using a V1 replication configuration, add the Prefix directly as a child element of the Rule element. .. epigraph:: Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints .

  • priority (Union[int, float, None]) – The priority indicates which rule has precedence whenever two or more replication rules conflict. Amazon S3 will attempt to replicate objects according to all replication rules. However, if there are two or more rules with the same destination bucket, then objects will be replicated according to the rule with the highest priority. The higher the number, the higher the priority. For more information, see Replication in the Amazon S3 User Guide .

  • source_selection_criteria (Union[IResolvable, SourceSelectionCriteriaProperty, Dict[str, Any], None]) – A container that describes additional filters for identifying the source objects that you want to replicate. You can choose to enable or disable the replication of these objects.

  • status (Optional[str]) – Specifies whether the rule is enabled.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationrule.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.mixins_preview.aws_s3 import mixins as s3_mixins

replication_rule_property = s3_mixins.CfnBucketPropsMixin.ReplicationRuleProperty(
    delete_marker_replication=s3_mixins.CfnBucketPropsMixin.DeleteMarkerReplicationProperty(
        status="status"
    ),
    destination=s3_mixins.CfnBucketPropsMixin.ReplicationDestinationProperty(
        access_control_translation=s3_mixins.CfnBucketPropsMixin.AccessControlTranslationProperty(
            owner="owner"
        ),
        account="account",
        bucket="bucket",
        encryption_configuration=s3_mixins.CfnBucketPropsMixin.EncryptionConfigurationProperty(
            replica_kms_key_id="replicaKmsKeyId"
        ),
        metrics=s3_mixins.CfnBucketPropsMixin.MetricsProperty(
            event_threshold=s3_mixins.CfnBucketPropsMixin.ReplicationTimeValueProperty(
                minutes=123
            ),
            status="status"
        ),
        replication_time=s3_mixins.CfnBucketPropsMixin.ReplicationTimeProperty(
            status="status",
            time=s3_mixins.CfnBucketPropsMixin.ReplicationTimeValueProperty(
                minutes=123
            )
        ),
        storage_class="storageClass"
    ),
    filter=s3_mixins.CfnBucketPropsMixin.ReplicationRuleFilterProperty(
        and=s3_mixins.CfnBucketPropsMixin.ReplicationRuleAndOperatorProperty(
            prefix="prefix",
            tag_filters=[s3_mixins.CfnBucketPropsMixin.TagFilterProperty(
                key="key",
                value="value"
            )]
        ),
        prefix="prefix",
        tag_filter=s3_mixins.CfnBucketPropsMixin.TagFilterProperty(
            key="key",
            value="value"
        )
    ),
    id="id",
    prefix="prefix",
    priority=123,
    source_selection_criteria=s3_mixins.CfnBucketPropsMixin.SourceSelectionCriteriaProperty(
        replica_modifications=s3_mixins.CfnBucketPropsMixin.ReplicaModificationsProperty(
            status="status"
        ),
        sse_kms_encrypted_objects=s3_mixins.CfnBucketPropsMixin.SseKmsEncryptedObjectsProperty(
            status="status"
        )
    ),
    status="status"
)

Attributes

delete_marker_replication

Specifies whether Amazon S3 replicates delete markers.

If you specify a Filter in your replication configuration, you must also include a DeleteMarkerReplication element. If your Filter includes a Tag element, the DeleteMarkerReplication Status must be set to Disabled, because Amazon S3 does not support replicating delete markers for tag-based rules. For an example configuration, see Basic Rule Configuration .

For more information about delete marker replication, see Basic Rule Configuration . .. epigraph:

If you are using an earlier version of the replication configuration, Amazon S3 handles replication of delete markers differently. For more information, see `Backward Compatibility <https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations>`_ .
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationrule.html#cfn-s3-bucket-replicationrule-deletemarkerreplication

destination

A container for information about the replication destination and its configurations including enabling the S3 Replication Time Control (S3 RTC).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationrule.html#cfn-s3-bucket-replicationrule-destination

filter

A filter that identifies the subset of objects to which the replication rule applies.

A Filter must specify exactly one Prefix , TagFilter , or an And child element. The use of the filter field indicates that this is a V2 replication configuration. This field isn’t supported in a V1 replication configuration. .. epigraph:

V1 replication configuration only supports filtering by key prefix. To filter using a V1 replication configuration, add the ``Prefix`` directly as a child element of the ``Rule`` element.
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationrule.html#cfn-s3-bucket-replicationrule-filter

id

A unique identifier for the rule.

The maximum value is 255 characters. If you don’t specify a value, AWS CloudFormation generates a random ID. When using a V2 replication configuration this property is capitalized as “ID”.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationrule.html#cfn-s3-bucket-replicationrule-id

prefix

An object key name prefix that identifies the object or objects to which the rule applies.

The maximum prefix length is 1,024 characters. To include all objects in a bucket, specify an empty string. To filter using a V1 replication configuration, add the Prefix directly as a child element of the Rule element. .. epigraph:

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see `XML related object key constraints <https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints>`_ .
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationrule.html#cfn-s3-bucket-replicationrule-prefix

priority

The priority indicates which rule has precedence whenever two or more replication rules conflict.

Amazon S3 will attempt to replicate objects according to all replication rules. However, if there are two or more rules with the same destination bucket, then objects will be replicated according to the rule with the highest priority. The higher the number, the higher the priority.

For more information, see Replication in the Amazon S3 User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationrule.html#cfn-s3-bucket-replicationrule-priority

source_selection_criteria

A container that describes additional filters for identifying the source objects that you want to replicate.

You can choose to enable or disable the replication of these objects.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationrule.html#cfn-s3-bucket-replicationrule-sourceselectioncriteria

status

Specifies whether the rule is enabled.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationrule.html#cfn-s3-bucket-replicationrule-status

ReplicationTimeProperty

class CfnBucketPropsMixin.ReplicationTimeProperty(*, status=None, time=None)

Bases: object

A container specifying S3 Replication Time Control (S3 RTC) related information, including whether S3 RTC is enabled and the time when all objects and operations on objects must be replicated.

Must be specified together with a Metrics block.

Parameters:
  • status (Optional[str]) – Specifies whether the replication time is enabled.

  • time (Union[IResolvable, ReplicationTimeValueProperty, Dict[str, Any], None]) – A container specifying the time by which replication should be complete for all objects and operations on objects.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationtime.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.mixins_preview.aws_s3 import mixins as s3_mixins

replication_time_property = s3_mixins.CfnBucketPropsMixin.ReplicationTimeProperty(
    status="status",
    time=s3_mixins.CfnBucketPropsMixin.ReplicationTimeValueProperty(
        minutes=123
    )
)

Attributes

status

Specifies whether the replication time is enabled.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationtime.html#cfn-s3-bucket-replicationtime-status

time

A container specifying the time by which replication should be complete for all objects and operations on objects.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationtime.html#cfn-s3-bucket-replicationtime-time

ReplicationTimeValueProperty

class CfnBucketPropsMixin.ReplicationTimeValueProperty(*, minutes=None)

Bases: object

A container specifying the time value for S3 Replication Time Control (S3 RTC) and replication metrics EventThreshold .

Parameters:

minutes (Union[int, float, None]) – Contains an integer specifying time in minutes. Valid value: 15

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationtimevalue.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.mixins_preview.aws_s3 import mixins as s3_mixins

replication_time_value_property = s3_mixins.CfnBucketPropsMixin.ReplicationTimeValueProperty(
    minutes=123
)

Attributes

minutes

Contains an integer specifying time in minutes.

Valid value: 15

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationtimevalue.html#cfn-s3-bucket-replicationtimevalue-minutes

RoutingRuleConditionProperty

class CfnBucketPropsMixin.RoutingRuleConditionProperty(*, http_error_code_returned_equals=None, key_prefix_equals=None)

Bases: object

A container for describing a condition that must be met for the specified redirect to apply.

For example, 1. If request is for pages in the /docs folder, redirect to the /documents folder. 2. If request results in HTTP error 4xx, redirect request to another host where you might process the error.

Parameters:
  • http_error_code_returned_equals (Optional[str]) – The HTTP error code when the redirect is applied. In the event of an error, if the error code equals this value, then the specified redirect is applied. Required when parent element Condition is specified and sibling KeyPrefixEquals is not specified. If both are specified, then both must be true for the redirect to be applied.

  • key_prefix_equals (Optional[str]) – The object key name prefix when the redirect is applied. For example, to redirect requests for ExamplePage.html , the key prefix will be ExamplePage.html . To redirect request for all pages with the prefix docs/ , the key prefix will be docs/ , which identifies all objects in the docs/ folder. Required when the parent element Condition is specified and sibling HttpErrorCodeReturnedEquals is not specified. If both conditions are specified, both must be true for the redirect to be applied.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-routingrulecondition.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.mixins_preview.aws_s3 import mixins as s3_mixins

routing_rule_condition_property = s3_mixins.CfnBucketPropsMixin.RoutingRuleConditionProperty(
    http_error_code_returned_equals="httpErrorCodeReturnedEquals",
    key_prefix_equals="keyPrefixEquals"
)

Attributes

http_error_code_returned_equals

The HTTP error code when the redirect is applied.

In the event of an error, if the error code equals this value, then the specified redirect is applied.

Required when parent element Condition is specified and sibling KeyPrefixEquals is not specified. If both are specified, then both must be true for the redirect to be applied.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-routingrulecondition.html#cfn-s3-bucket-routingrulecondition-httperrorcodereturnedequals

key_prefix_equals

The object key name prefix when the redirect is applied.

For example, to redirect requests for ExamplePage.html , the key prefix will be ExamplePage.html . To redirect request for all pages with the prefix docs/ , the key prefix will be docs/ , which identifies all objects in the docs/ folder.

Required when the parent element Condition is specified and sibling HttpErrorCodeReturnedEquals is not specified. If both conditions are specified, both must be true for the redirect to be applied.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-routingrulecondition.html#cfn-s3-bucket-routingrulecondition-keyprefixequals

RoutingRuleProperty

class CfnBucketPropsMixin.RoutingRuleProperty(*, redirect_rule=None, routing_rule_condition=None)

Bases: object

Specifies the redirect behavior and when a redirect is applied.

For more information about routing rules, see Configuring advanced conditional redirects in the Amazon S3 User Guide .

Parameters:
  • redirect_rule (Union[IResolvable, RedirectRuleProperty, Dict[str, Any], None]) – Container for redirect information. You can redirect requests to another host, to another page, or with another protocol. In the event of an error, you can specify a different error code to return.

  • routing_rule_condition (Union[IResolvable, RoutingRuleConditionProperty, Dict[str, Any], None]) – A container for describing a condition that must be met for the specified redirect to apply. For example, 1. If request is for pages in the /docs folder, redirect to the /documents folder. 2. If request results in HTTP error 4xx, redirect request to another host where you might process the error.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-routingrule.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.mixins_preview.aws_s3 import mixins as s3_mixins

routing_rule_property = s3_mixins.CfnBucketPropsMixin.RoutingRuleProperty(
    redirect_rule=s3_mixins.CfnBucketPropsMixin.RedirectRuleProperty(
        host_name="hostName",
        http_redirect_code="httpRedirectCode",
        protocol="protocol",
        replace_key_prefix_with="replaceKeyPrefixWith",
        replace_key_with="replaceKeyWith"
    ),
    routing_rule_condition=s3_mixins.CfnBucketPropsMixin.RoutingRuleConditionProperty(
        http_error_code_returned_equals="httpErrorCodeReturnedEquals",
        key_prefix_equals="keyPrefixEquals"
    )
)

Attributes

redirect_rule

Container for redirect information.

You can redirect requests to another host, to another page, or with another protocol. In the event of an error, you can specify a different error code to return.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-routingrule.html#cfn-s3-bucket-routingrule-redirectrule

routing_rule_condition

A container for describing a condition that must be met for the specified redirect to apply.

For example, 1. If request is for pages in the /docs folder, redirect to the /documents folder. 2. If request results in HTTP error 4xx, redirect request to another host where you might process the error.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-routingrule.html#cfn-s3-bucket-routingrule-routingrulecondition

RuleProperty

class CfnBucketPropsMixin.RuleProperty(*, abort_incomplete_multipart_upload=None, expiration_date=None, expiration_in_days=None, expired_object_delete_marker=None, id=None, noncurrent_version_expiration=None, noncurrent_version_expiration_in_days=None, noncurrent_version_transition=None, noncurrent_version_transitions=None, object_size_greater_than=None, object_size_less_than=None, prefix=None, status=None, tag_filters=None, transition=None, transitions=None)

Bases: object

Specifies lifecycle rules for an Amazon S3 bucket.

For more information, see Put Bucket Lifecycle Configuration in the Amazon S3 API Reference .

You must specify at least one of the following properties: AbortIncompleteMultipartUpload , ExpirationDate , ExpirationInDays , NoncurrentVersionExpirationInDays , NoncurrentVersionTransition , NoncurrentVersionTransitions , Transition , or Transitions .

Parameters:
  • abort_incomplete_multipart_upload (Union[IResolvable, AbortIncompleteMultipartUploadProperty, Dict[str, Any], None]) – Specifies a lifecycle rule that stops incomplete multipart uploads to an Amazon S3 bucket.

  • expiration_date (Union[datetime, IResolvable, None]) – Indicates when objects are deleted from Amazon S3 and Amazon S3 Glacier. The date value must be in ISO 8601 format. The time is always midnight UTC. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time.

  • expiration_in_days (Union[int, float, None]) – Indicates the number of days after creation when objects are deleted from Amazon S3 and Amazon S3 Glacier. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time.

  • expired_object_delete_marker (Union[bool, IResolvable, None]) – Indicates whether Amazon S3 will remove a delete marker without any noncurrent versions. If set to true, the delete marker will be removed if there are no noncurrent versions. This cannot be specified with ExpirationInDays , ExpirationDate , or TagFilters .

  • id (Optional[str]) – Unique identifier for the rule. The value can’t be longer than 255 characters.

  • noncurrent_version_expiration (Union[IResolvable, NoncurrentVersionExpirationProperty, Dict[str, Any], None]) – Specifies when noncurrent object versions expire. Upon expiration, Amazon S3 permanently deletes the noncurrent object versions. You set this lifecycle configuration action on a bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent object versions at a specific period in the object’s lifetime.

  • noncurrent_version_expiration_in_days (Union[int, float, None]) – (Deprecated.) For buckets with versioning enabled (or suspended), specifies the time, in days, between when a new version of the object is uploaded to the bucket and when old versions of the object expire. When object versions expire, Amazon S3 permanently deletes them. If you specify a transition and expiration time, the expiration time must be later than the transition time.

  • noncurrent_version_transition (Union[IResolvable, NoncurrentVersionTransitionProperty, Dict[str, Any], None]) – (Deprecated.) For buckets with versioning enabled (or suspended), specifies when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don’t specify the NoncurrentVersionTransitions property.

  • noncurrent_version_transitions (Union[IResolvable, Sequence[Union[IResolvable, NoncurrentVersionTransitionProperty, Dict[str, Any]]], None]) – For buckets with versioning enabled (or suspended), one or more transition rules that specify when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don’t specify the NoncurrentVersionTransition property.

  • object_size_greater_than (Union[int, float, None]) – Specifies the minimum object size in bytes for this rule to apply to. Objects must be larger than this value in bytes. For more information about size based rules, see Lifecycle configuration using size-based rules in the Amazon S3 User Guide .

  • object_size_less_than (Union[int, float, None]) –

    Specifies the maximum object size in bytes for this rule to apply to. Objects must be smaller than this value in bytes. For more information about sized based rules, see Lifecycle configuration using size-based rules in the Amazon S3 User Guide .

  • prefix (Optional[str]) –

    Object key prefix that identifies one or more objects to which this rule applies. .. epigraph:: Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints .

  • status (Optional[str]) – If Enabled , the rule is currently being applied. If Disabled , the rule is not currently being applied.

  • tag_filters (Union[IResolvable, Sequence[Union[IResolvable, TagFilterProperty, Dict[str, Any]]], None]) – Tags to use to identify a subset of objects to which the lifecycle rule applies.

  • transition (Union[IResolvable, TransitionProperty, Dict[str, Any], None]) – (Deprecated.) Specifies when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don’t specify the Transitions property.

  • transitions (Union[IResolvable, Sequence[Union[IResolvable, TransitionProperty, Dict[str, Any]]], None]) – One or more transition rules that specify when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don’t specify the Transition property.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.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.mixins_preview.aws_s3 import mixins as s3_mixins

rule_property = s3_mixins.CfnBucketPropsMixin.RuleProperty(
    abort_incomplete_multipart_upload=s3_mixins.CfnBucketPropsMixin.AbortIncompleteMultipartUploadProperty(
        days_after_initiation=123
    ),
    expiration_date=Date(),
    expiration_in_days=123,
    expired_object_delete_marker=False,
    id="id",
    noncurrent_version_expiration=s3_mixins.CfnBucketPropsMixin.NoncurrentVersionExpirationProperty(
        newer_noncurrent_versions=123,
        noncurrent_days=123
    ),
    noncurrent_version_expiration_in_days=123,
    noncurrent_version_transition=s3_mixins.CfnBucketPropsMixin.NoncurrentVersionTransitionProperty(
        newer_noncurrent_versions=123,
        storage_class="storageClass",
        transition_in_days=123
    ),
    noncurrent_version_transitions=[s3_mixins.CfnBucketPropsMixin.NoncurrentVersionTransitionProperty(
        newer_noncurrent_versions=123,
        storage_class="storageClass",
        transition_in_days=123
    )],
    object_size_greater_than=123,
    object_size_less_than=123,
    prefix="prefix",
    status="status",
    tag_filters=[s3_mixins.CfnBucketPropsMixin.TagFilterProperty(
        key="key",
        value="value"
    )],
    transition=s3_mixins.CfnBucketPropsMixin.TransitionProperty(
        storage_class="storageClass",
        transition_date=Date(),
        transition_in_days=123
    ),
    transitions=[s3_mixins.CfnBucketPropsMixin.TransitionProperty(
        storage_class="storageClass",
        transition_date=Date(),
        transition_in_days=123
    )]
)

Attributes

abort_incomplete_multipart_upload

Specifies a lifecycle rule that stops incomplete multipart uploads to an Amazon S3 bucket.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.html#cfn-s3-bucket-rule-abortincompletemultipartupload

expiration_date

Indicates when objects are deleted from Amazon S3 and Amazon S3 Glacier.

The date value must be in ISO 8601 format. The time is always midnight UTC. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.html#cfn-s3-bucket-rule-expirationdate

expiration_in_days

Indicates the number of days after creation when objects are deleted from Amazon S3 and Amazon S3 Glacier.

If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.html#cfn-s3-bucket-rule-expirationindays

expired_object_delete_marker

Indicates whether Amazon S3 will remove a delete marker without any noncurrent versions.

If set to true, the delete marker will be removed if there are no noncurrent versions. This cannot be specified with ExpirationInDays , ExpirationDate , or TagFilters .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.html#cfn-s3-bucket-rule-expiredobjectdeletemarker

id

Unique identifier for the rule.

The value can’t be longer than 255 characters.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.html#cfn-s3-bucket-rule-id

noncurrent_version_expiration

Specifies when noncurrent object versions expire.

Upon expiration, Amazon S3 permanently deletes the noncurrent object versions. You set this lifecycle configuration action on a bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent object versions at a specific period in the object’s lifetime.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.html#cfn-s3-bucket-rule-noncurrentversionexpiration

noncurrent_version_expiration_in_days

(Deprecated.) For buckets with versioning enabled (or suspended), specifies the time, in days, between when a new version of the object is uploaded to the bucket and when old versions of the object expire. When object versions expire, Amazon S3 permanently deletes them. If you specify a transition and expiration time, the expiration time must be later than the transition time.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.html#cfn-s3-bucket-rule-noncurrentversionexpirationindays

noncurrent_version_transition

(Deprecated.) For buckets with versioning enabled (or suspended), specifies when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don’t specify the NoncurrentVersionTransitions property.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.html#cfn-s3-bucket-rule-noncurrentversiontransition

noncurrent_version_transitions

For buckets with versioning enabled (or suspended), one or more transition rules that specify when non-current objects transition to a specified storage class.

If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don’t specify the NoncurrentVersionTransition property.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.html#cfn-s3-bucket-rule-noncurrentversiontransitions

object_size_greater_than

Specifies the minimum object size in bytes for this rule to apply to.

Objects must be larger than this value in bytes. For more information about size based rules, see Lifecycle configuration using size-based rules in the Amazon S3 User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.html#cfn-s3-bucket-rule-objectsizegreaterthan

object_size_less_than

Specifies the maximum object size in bytes for this rule to apply to.

Objects must be smaller than this value in bytes. For more information about sized based rules, see Lifecycle configuration using size-based rules in the Amazon S3 User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.html#cfn-s3-bucket-rule-objectsizelessthan

prefix

Object key prefix that identifies one or more objects to which this rule applies.

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.html#cfn-s3-bucket-rule-prefix

status

If Enabled , the rule is currently being applied.

If Disabled , the rule is not currently being applied.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.html#cfn-s3-bucket-rule-status

tag_filters

Tags to use to identify a subset of objects to which the lifecycle rule applies.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.html#cfn-s3-bucket-rule-tagfilters

transition

(Deprecated.) Specifies when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don’t specify the Transitions property.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.html#cfn-s3-bucket-rule-transition

transitions

One or more transition rules that specify when an object transitions to a specified storage class.

If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don’t specify the Transition property.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.html#cfn-s3-bucket-rule-transitions

S3KeyFilterProperty

class CfnBucketPropsMixin.S3KeyFilterProperty(*, rules=None)

Bases: object

A container for object key name prefix and suffix filtering rules.

For more information about object key name filtering, see Configuring event notifications using object key name filtering in the Amazon S3 User Guide . .. epigraph:

The same type of filter rule cannot be used more than once. For example, you cannot specify two prefix rules.
Parameters:

rules (Union[IResolvable, Sequence[Union[IResolvable, FilterRuleProperty, Dict[str, Any]]], None]) – A list of containers for the key-value pair that defines the criteria for the filter rule.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-s3keyfilter.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.mixins_preview.aws_s3 import mixins as s3_mixins

s3_key_filter_property = s3_mixins.CfnBucketPropsMixin.S3KeyFilterProperty(
    rules=[s3_mixins.CfnBucketPropsMixin.FilterRuleProperty(
        name="name",
        value="value"
    )]
)

Attributes

rules

A list of containers for the key-value pair that defines the criteria for the filter rule.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-s3keyfilter.html#cfn-s3-bucket-s3keyfilter-rules

S3TablesDestinationProperty

class CfnBucketPropsMixin.S3TablesDestinationProperty(*, table_arn=None, table_bucket_arn=None, table_name=None, table_namespace=None)

Bases: object

The destination information for a V1 S3 Metadata configuration.

The destination table bucket must be in the same Region and AWS account as the general purpose bucket. The specified metadata table name must be unique within the aws_s3_metadata namespace in the destination table bucket.

Parameters:
  • table_arn (Optional[str]) – The Amazon Resource Name (ARN) for the metadata table in the metadata table configuration. The specified metadata table name must be unique within the aws_s3_metadata namespace in the destination table bucket.

  • table_bucket_arn (Optional[str]) – The Amazon Resource Name (ARN) for the table bucket that’s specified as the destination in the metadata table configuration. The destination table bucket must be in the same Region and AWS account as the general purpose bucket.

  • table_name (Optional[str]) – The name for the metadata table in your metadata table configuration. The specified metadata table name must be unique within the aws_s3_metadata namespace in the destination table bucket.

  • table_namespace (Optional[str]) – The table bucket namespace for the metadata table in your metadata table configuration. This value is always aws_s3_metadata .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-s3tablesdestination.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.mixins_preview.aws_s3 import mixins as s3_mixins

s3_tables_destination_property = s3_mixins.CfnBucketPropsMixin.S3TablesDestinationProperty(
    table_arn="tableArn",
    table_bucket_arn="tableBucketArn",
    table_name="tableName",
    table_namespace="tableNamespace"
)

Attributes

table_arn

The Amazon Resource Name (ARN) for the metadata table in the metadata table configuration.

The specified metadata table name must be unique within the aws_s3_metadata namespace in the destination table bucket.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-s3tablesdestination.html#cfn-s3-bucket-s3tablesdestination-tablearn

table_bucket_arn

The Amazon Resource Name (ARN) for the table bucket that’s specified as the destination in the metadata table configuration.

The destination table bucket must be in the same Region and AWS account as the general purpose bucket.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-s3tablesdestination.html#cfn-s3-bucket-s3tablesdestination-tablebucketarn

table_name

The name for the metadata table in your metadata table configuration.

The specified metadata table name must be unique within the aws_s3_metadata namespace in the destination table bucket.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-s3tablesdestination.html#cfn-s3-bucket-s3tablesdestination-tablename

table_namespace

The table bucket namespace for the metadata table in your metadata table configuration.

This value is always aws_s3_metadata .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-s3tablesdestination.html#cfn-s3-bucket-s3tablesdestination-tablenamespace

ServerSideEncryptionByDefaultProperty

class CfnBucketPropsMixin.ServerSideEncryptionByDefaultProperty(*, kms_master_key_id=None, sse_algorithm=None)

Bases: object

Describes the default server-side encryption to apply to new objects in the bucket.

If a PUT Object request doesn’t specify any server-side encryption, this default encryption will be applied. For more information, see PutBucketEncryption . .. epigraph:

- *General purpose buckets* - If you don't specify a customer managed key at configuration, Amazon S3 automatically creates an AWS KMS key ( ``aws/s3`` ) in your AWS account the first time that you add an object encrypted with SSE-KMS to a bucket. By default, Amazon S3 uses this KMS key for SSE-KMS.
- *Directory buckets* - Your SSE-KMS configuration can only support 1 `customer managed key <https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk>`_ per directory bucket's lifetime. The `AWS managed key <https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk>`_ ( ``aws/s3`` ) isn't supported.
- *Directory buckets* - For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS.
Parameters:
  • kms_master_key_id (Optional[str]) –

    AWS Key Management Service (KMS) customer managed key ID to use for the default encryption. .. epigraph:: - General purpose buckets - This parameter is allowed if and only if SSEAlgorithm is set to aws:kms or aws:kms:dsse . - Directory buckets - This parameter is allowed if and only if SSEAlgorithm is set to aws:kms . You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the KMS key. - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - Key Alias: alias/alias-name If you are using encryption with cross-account or AWS service operations, you must use a fully qualified KMS key ARN. For more information, see Using encryption for cross-account operations . .. epigraph:: - General purpose buckets - If you’re specifying a customer managed KMS key, we recommend using a fully qualified KMS key ARN. If you use a KMS key alias instead, then AWS resolves the key within the requester’s account. This behavior can result in data that’s encrypted with a KMS key that belongs to the requester, and not the bucket owner. Also, if you use a key ID, you can run into a LogDestination undeliverable error when creating a VPC flow log. - Directory buckets - When you specify an AWS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn’t supported. > Amazon S3 only supports symmetric encryption KMS keys. For more information, see Asymmetric keys in AWS KMS in the AWS Key Management Service Developer Guide .

  • sse_algorithm (Optional[str]) – Server-side encryption algorithm to use for the default encryption. .. epigraph:: For directory buckets, there are only two supported values for server-side encryption: AES256 and aws:kms .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-serversideencryptionbydefault.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.mixins_preview.aws_s3 import mixins as s3_mixins

server_side_encryption_by_default_property = s3_mixins.CfnBucketPropsMixin.ServerSideEncryptionByDefaultProperty(
    kms_master_key_id="kmsMasterKeyId",
    sse_algorithm="sseAlgorithm"
)

Attributes

kms_master_key_id

AWS Key Management Service (KMS) customer managed key ID to use for the default encryption.

  • General purpose buckets - This parameter is allowed if and only if SSEAlgorithm is set to aws:kms or aws:kms:dsse .

  • Directory buckets - This parameter is allowed if and only if SSEAlgorithm is set to aws:kms .

You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the KMS key.

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

  • Key Alias: alias/alias-name

If you are using encryption with cross-account or AWS service operations, you must use a fully qualified KMS key ARN. For more information, see Using encryption for cross-account operations . .. epigraph:

- *General purpose buckets* - If you're specifying a customer managed KMS key, we recommend using a fully qualified KMS key ARN. If you use a KMS key alias instead, then AWS  resolves the key within the requester’s account. This behavior can result in data that's encrypted with a KMS key that belongs to the requester, and not the bucket owner. Also, if you use a key ID, you can run into a LogDestination undeliverable error when creating a VPC flow log.
- *Directory buckets* - When you specify an `AWS  customer managed key <https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk>`_ for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported. > Amazon S3 only supports symmetric encryption KMS keys. For more information, see `Asymmetric keys in AWS KMS <https://docs.aws.amazon.com//kms/latest/developerguide/symmetric-asymmetric.html>`_ in the *AWS Key Management Service Developer Guide* .
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-serversideencryptionbydefault.html#cfn-s3-bucket-serversideencryptionbydefault-kmsmasterkeyid

sse_algorithm

Server-side encryption algorithm to use for the default encryption.

For directory buckets, there are only two supported values for server-side encryption: AES256 and aws:kms .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-serversideencryptionbydefault.html#cfn-s3-bucket-serversideencryptionbydefault-ssealgorithm

ServerSideEncryptionRuleProperty

class CfnBucketPropsMixin.ServerSideEncryptionRuleProperty(*, blocked_encryption_types=None, bucket_key_enabled=None, server_side_encryption_by_default=None)

Bases: object

Specifies the default server-side encryption configuration.

  • General purpose buckets - If you’re specifying a customer managed KMS key, we recommend using a fully qualified KMS key ARN. If you use a KMS key alias instead, then AWS resolves the key within the requester’s account. This behavior can result in data that’s encrypted with a KMS key that belongs to the requester, and not the bucket owner.

  • Directory buckets - When you specify an AWS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn’t supported.

Parameters:
  • blocked_encryption_types (Union[IResolvable, BlockedEncryptionTypesProperty, Dict[str, Any], None]) –

    A bucket-level setting for Amazon S3 general purpose buckets used to prevent the upload of new objects encrypted with the specified server-side encryption type. For example, blocking an encryption type will block PutObject , CopyObject , PostObject , multipart upload, and replication requests to the bucket for objects with the specified encryption type. However, you can continue to read and list any pre-existing objects already encrypted with the specified encryption type. For more information, see Blocking or unblocking SSE-C for a general purpose bucket . .. epigraph:: Currently, this parameter only supports blocking or unblocking server-side encryption with customer-provided keys (SSE-C). For more information about SSE-C, see Using server-side encryption with customer-provided keys (SSE-C) .

  • bucket_key_enabled (Union[bool, IResolvable, None]) – Specifies whether Amazon S3 should use an S3 Bucket Key with server-side encryption using KMS (SSE-KMS) for new objects in the bucket. Existing objects are not affected. Setting the BucketKeyEnabled element to true causes Amazon S3 to use an S3 Bucket Key. By default, S3 Bucket Key is not enabled. For more information, see Amazon S3 Bucket Keys in the Amazon S3 User Guide .

  • server_side_encryption_by_default (Union[IResolvable, ServerSideEncryptionByDefaultProperty, Dict[str, Any], None]) – Specifies the default server-side encryption to apply to new objects in the bucket. If a PUT Object request doesn’t specify any server-side encryption, this default encryption will be applied.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-serversideencryptionrule.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.mixins_preview.aws_s3 import mixins as s3_mixins

server_side_encryption_rule_property = s3_mixins.CfnBucketPropsMixin.ServerSideEncryptionRuleProperty(
    blocked_encryption_types=s3_mixins.CfnBucketPropsMixin.BlockedEncryptionTypesProperty(
        encryption_type=["encryptionType"]
    ),
    bucket_key_enabled=False,
    server_side_encryption_by_default=s3_mixins.CfnBucketPropsMixin.ServerSideEncryptionByDefaultProperty(
        kms_master_key_id="kmsMasterKeyId",
        sse_algorithm="sseAlgorithm"
    )
)

Attributes

blocked_encryption_types

A bucket-level setting for Amazon S3 general purpose buckets used to prevent the upload of new objects encrypted with the specified server-side encryption type.

For example, blocking an encryption type will block PutObject , CopyObject , PostObject , multipart upload, and replication requests to the bucket for objects with the specified encryption type. However, you can continue to read and list any pre-existing objects already encrypted with the specified encryption type. For more information, see Blocking or unblocking SSE-C for a general purpose bucket . .. epigraph:

Currently, this parameter only supports blocking or unblocking server-side encryption with customer-provided keys (SSE-C). For more information about SSE-C, see `Using server-side encryption with customer-provided keys (SSE-C) <https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html>`_ .
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-serversideencryptionrule.html#cfn-s3-bucket-serversideencryptionrule-blockedencryptiontypes

bucket_key_enabled

Specifies whether Amazon S3 should use an S3 Bucket Key with server-side encryption using KMS (SSE-KMS) for new objects in the bucket.

Existing objects are not affected. Setting the BucketKeyEnabled element to true causes Amazon S3 to use an S3 Bucket Key. By default, S3 Bucket Key is not enabled.

For more information, see Amazon S3 Bucket Keys in the Amazon S3 User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-serversideencryptionrule.html#cfn-s3-bucket-serversideencryptionrule-bucketkeyenabled

server_side_encryption_by_default

Specifies the default server-side encryption to apply to new objects in the bucket.

If a PUT Object request doesn’t specify any server-side encryption, this default encryption will be applied.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-serversideencryptionrule.html#cfn-s3-bucket-serversideencryptionrule-serversideencryptionbydefault

SourceSelectionCriteriaProperty

class CfnBucketPropsMixin.SourceSelectionCriteriaProperty(*, replica_modifications=None, sse_kms_encrypted_objects=None)

Bases: object

A container that describes additional filters for identifying the source objects that you want to replicate.

You can choose to enable or disable the replication of these objects.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-sourceselectioncriteria.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.mixins_preview.aws_s3 import mixins as s3_mixins

source_selection_criteria_property = s3_mixins.CfnBucketPropsMixin.SourceSelectionCriteriaProperty(
    replica_modifications=s3_mixins.CfnBucketPropsMixin.ReplicaModificationsProperty(
        status="status"
    ),
    sse_kms_encrypted_objects=s3_mixins.CfnBucketPropsMixin.SseKmsEncryptedObjectsProperty(
        status="status"
    )
)

Attributes

replica_modifications

A filter that you can specify for selection for modifications on replicas.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-sourceselectioncriteria.html#cfn-s3-bucket-sourceselectioncriteria-replicamodifications

sse_kms_encrypted_objects

A container for filter information for the selection of Amazon S3 objects encrypted with AWS KMS.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-sourceselectioncriteria.html#cfn-s3-bucket-sourceselectioncriteria-ssekmsencryptedobjects

SseKmsEncryptedObjectsProperty

class CfnBucketPropsMixin.SseKmsEncryptedObjectsProperty(*, status=None)

Bases: object

A container for filter information for the selection of S3 objects encrypted with AWS KMS.

Parameters:

status (Optional[str]) – Specifies whether Amazon S3 replicates objects created with server-side encryption using an AWS KMS key stored in AWS Key Management Service.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-ssekmsencryptedobjects.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.mixins_preview.aws_s3 import mixins as s3_mixins

sse_kms_encrypted_objects_property = s3_mixins.CfnBucketPropsMixin.SseKmsEncryptedObjectsProperty(
    status="status"
)

Attributes

status

Specifies whether Amazon S3 replicates objects created with server-side encryption using an AWS KMS key stored in AWS Key Management Service.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-ssekmsencryptedobjects.html#cfn-s3-bucket-ssekmsencryptedobjects-status

StorageClassAnalysisProperty

class CfnBucketPropsMixin.StorageClassAnalysisProperty(*, data_export=None)

Bases: object

Specifies data related to access patterns to be collected and made available to analyze the tradeoffs between different storage classes for an Amazon S3 bucket.

Parameters:

data_export (Union[IResolvable, DataExportProperty, Dict[str, Any], None]) – Specifies how data related to the storage class analysis for an Amazon S3 bucket should be exported.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-storageclassanalysis.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.mixins_preview.aws_s3 import mixins as s3_mixins

storage_class_analysis_property = s3_mixins.CfnBucketPropsMixin.StorageClassAnalysisProperty(
    data_export=s3_mixins.CfnBucketPropsMixin.DataExportProperty(
        destination=s3_mixins.CfnBucketPropsMixin.DestinationProperty(
            bucket_account_id="bucketAccountId",
            bucket_arn="bucketArn",
            format="format",
            prefix="prefix"
        ),
        output_schema_version="outputSchemaVersion"
    )
)

Attributes

data_export

Specifies how data related to the storage class analysis for an Amazon S3 bucket should be exported.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-storageclassanalysis.html#cfn-s3-bucket-storageclassanalysis-dataexport

TagFilterProperty

class CfnBucketPropsMixin.TagFilterProperty(*, key=None, value=None)

Bases: object

Specifies tags to use to identify a subset of objects for an Amazon S3 bucket.

For more information, see Categorizing your storage using tags in the Amazon Simple Storage Service User Guide .

Parameters:
  • key (Optional[str]) – The tag key.

  • value (Optional[str]) – The tag value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-tagfilter.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.mixins_preview.aws_s3 import mixins as s3_mixins

tag_filter_property = s3_mixins.CfnBucketPropsMixin.TagFilterProperty(
    key="key",
    value="value"
)

Attributes

key

The tag key.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-tagfilter.html#cfn-s3-bucket-tagfilter-key

value

The tag value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-tagfilter.html#cfn-s3-bucket-tagfilter-value

TargetObjectKeyFormatProperty

class CfnBucketPropsMixin.TargetObjectKeyFormatProperty(*, partitioned_prefix=None, simple_prefix=None)

Bases: object

Amazon S3 key format for log objects.

Only one format, PartitionedPrefix or SimplePrefix, is allowed.

Parameters:
  • partitioned_prefix (Union[IResolvable, PartitionedPrefixProperty, Dict[str, Any], None]) – Partitioned S3 key for log objects.

  • simple_prefix (Any) – To use the simple format for S3 keys for log objects. To specify SimplePrefix format, set SimplePrefix to {}.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-targetobjectkeyformat.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.mixins_preview.aws_s3 import mixins as s3_mixins

# simple_prefix: Any

target_object_key_format_property = s3_mixins.CfnBucketPropsMixin.TargetObjectKeyFormatProperty(
    partitioned_prefix=s3_mixins.CfnBucketPropsMixin.PartitionedPrefixProperty(
        partition_date_source="partitionDateSource"
    ),
    simple_prefix=simple_prefix
)

Attributes

partitioned_prefix

Partitioned S3 key for log objects.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-targetobjectkeyformat.html#cfn-s3-bucket-targetobjectkeyformat-partitionedprefix

simple_prefix

To use the simple format for S3 keys for log objects.

To specify SimplePrefix format, set SimplePrefix to {}.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-targetobjectkeyformat.html#cfn-s3-bucket-targetobjectkeyformat-simpleprefix

TieringProperty

class CfnBucketPropsMixin.TieringProperty(*, access_tier=None, days=None)

Bases: object

The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without additional operational overhead.

Parameters:
  • access_tier (Optional[str]) –

    S3 Intelligent-Tiering access tier. See Storage class for automatically optimizing frequently and infrequently accessed objects for a list of access tiers in the S3 Intelligent-Tiering storage class.

  • days (Union[int, float, None]) – The number of consecutive days of no access after which an object will be eligible to be transitioned to the corresponding tier. The minimum number of days specified for Archive Access tier must be at least 90 days and Deep Archive Access tier must be at least 180 days. The maximum can be up to 2 years (730 days).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-tiering.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.mixins_preview.aws_s3 import mixins as s3_mixins

tiering_property = s3_mixins.CfnBucketPropsMixin.TieringProperty(
    access_tier="accessTier",
    days=123
)

Attributes

access_tier

S3 Intelligent-Tiering access tier.

See Storage class for automatically optimizing frequently and infrequently accessed objects for a list of access tiers in the S3 Intelligent-Tiering storage class.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-tiering.html#cfn-s3-bucket-tiering-accesstier

days

The number of consecutive days of no access after which an object will be eligible to be transitioned to the corresponding tier.

The minimum number of days specified for Archive Access tier must be at least 90 days and Deep Archive Access tier must be at least 180 days. The maximum can be up to 2 years (730 days).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-tiering.html#cfn-s3-bucket-tiering-days

TopicConfigurationProperty

class CfnBucketPropsMixin.TopicConfigurationProperty(*, event=None, filter=None, topic=None)

Bases: object

A container for specifying the configuration for publication of messages to an Amazon Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events.

Parameters:
  • event (Optional[str]) –

    The Amazon S3 bucket event about which to send notifications. For more information, see Supported Event Types in the Amazon S3 User Guide .

  • filter (Union[IResolvable, NotificationFilterProperty, Dict[str, Any], None]) – The filtering rules that determine for which objects to send notifications. For example, you can create a filter so that Amazon S3 sends notifications only when image files with a .jpg extension are added to the bucket.

  • topic (Optional[str]) – The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message when it detects events of the specified type.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-topicconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

topic_configuration_property = s3_mixins.CfnBucketPropsMixin.TopicConfigurationProperty(
    event="event",
    filter=s3_mixins.CfnBucketPropsMixin.NotificationFilterProperty(
        s3_key=s3_mixins.CfnBucketPropsMixin.S3KeyFilterProperty(
            rules=[s3_mixins.CfnBucketPropsMixin.FilterRuleProperty(
                name="name",
                value="value"
            )]
        )
    ),
    topic="topic"
)

Attributes

event

The Amazon S3 bucket event about which to send notifications.

For more information, see Supported Event Types in the Amazon S3 User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-topicconfiguration.html#cfn-s3-bucket-topicconfiguration-event

filter

The filtering rules that determine for which objects to send notifications.

For example, you can create a filter so that Amazon S3 sends notifications only when image files with a .jpg extension are added to the bucket.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-topicconfiguration.html#cfn-s3-bucket-topicconfiguration-filter

topic

The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message when it detects events of the specified type.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-topicconfiguration.html#cfn-s3-bucket-topicconfiguration-topic

TransitionProperty

class CfnBucketPropsMixin.TransitionProperty(*, storage_class=None, transition_date=None, transition_in_days=None)

Bases: object

Specifies when an object transitions to a specified storage class.

For more information about Amazon S3 lifecycle configuration rules, see Transitioning Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide .

Parameters:
  • storage_class (Optional[str]) – The storage class to which you want the object to transition.

  • transition_date (Union[datetime, IResolvable, None]) – Indicates when objects are transitioned to the specified storage class. The date value must be in ISO 8601 format. The time is always midnight UTC.

  • transition_in_days (Union[int, float, None]) – Indicates the number of days after creation when objects are transitioned to the specified storage class. If the specified storage class is INTELLIGENT_TIERING , GLACIER_IR , GLACIER , or DEEP_ARCHIVE , valid values are 0 or positive integers. If the specified storage class is STANDARD_IA or ONEZONE_IA , valid values are positive integers greater than 30 . Be aware that some storage classes have a minimum storage duration and that you’re charged for transitioning objects before their minimum storage duration. For more information, see Constraints and considerations for transitions in the Amazon S3 User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-transition.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.mixins_preview.aws_s3 import mixins as s3_mixins

transition_property = s3_mixins.CfnBucketPropsMixin.TransitionProperty(
    storage_class="storageClass",
    transition_date=Date(),
    transition_in_days=123
)

Attributes

storage_class

The storage class to which you want the object to transition.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-transition.html#cfn-s3-bucket-transition-storageclass

transition_date

Indicates when objects are transitioned to the specified storage class.

The date value must be in ISO 8601 format. The time is always midnight UTC.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-transition.html#cfn-s3-bucket-transition-transitiondate

transition_in_days

Indicates the number of days after creation when objects are transitioned to the specified storage class.

If the specified storage class is INTELLIGENT_TIERING , GLACIER_IR , GLACIER , or DEEP_ARCHIVE , valid values are 0 or positive integers. If the specified storage class is STANDARD_IA or ONEZONE_IA , valid values are positive integers greater than 30 . Be aware that some storage classes have a minimum storage duration and that you’re charged for transitioning objects before their minimum storage duration. For more information, see Constraints and considerations for transitions in the Amazon S3 User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-transition.html#cfn-s3-bucket-transition-transitionindays

VersioningConfigurationProperty

class CfnBucketPropsMixin.VersioningConfigurationProperty(*, status=None)

Bases: object

Describes the versioning state of an Amazon S3 bucket.

For more information, see PUT Bucket versioning in the Amazon S3 API Reference .

Keep the following timing in mind when enabling, suspending, or transitioning between versioning states:

  • Enabling versioning - Changes may take up to 15 minutes to propagate across all AWS regions for full consistency.

  • Suspending versioning - Takes effect immediately with no propagation delay.

  • Transitioning between states - Any change from Suspended to Enabled has a 15-minute delay.

Parameters:

status (Optional[str]) – The versioning state of the bucket. Default: - “Suspended”

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-versioningconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

versioning_configuration_property = s3_mixins.CfnBucketPropsMixin.VersioningConfigurationProperty(
    status="status"
)

Attributes

status

The versioning state of the bucket.

Default:
  • “Suspended”

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-versioningconfiguration.html#cfn-s3-bucket-versioningconfiguration-status

WebsiteConfigurationProperty

class CfnBucketPropsMixin.WebsiteConfigurationProperty(*, error_document=None, index_document=None, redirect_all_requests_to=None, routing_rules=None)

Bases: object

Specifies website configuration parameters for an Amazon S3 bucket.

Parameters:
  • error_document (Optional[str]) – The name of the error document for the website.

  • index_document (Optional[str]) – The name of the index document for the website.

  • redirect_all_requests_to (Union[IResolvable, RedirectAllRequestsToProperty, Dict[str, Any], None]) – The redirect behavior for every request to this bucket’s website endpoint. .. epigraph:: If you specify this property, you can’t specify any other property.

  • routing_rules (Union[IResolvable, Sequence[Union[IResolvable, RoutingRuleProperty, Dict[str, Any]]], None]) – Rules that define when a redirect is applied and the redirect behavior.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-websiteconfiguration.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.mixins_preview.aws_s3 import mixins as s3_mixins

website_configuration_property = s3_mixins.CfnBucketPropsMixin.WebsiteConfigurationProperty(
    error_document="errorDocument",
    index_document="indexDocument",
    redirect_all_requests_to=s3_mixins.CfnBucketPropsMixin.RedirectAllRequestsToProperty(
        host_name="hostName",
        protocol="protocol"
    ),
    routing_rules=[s3_mixins.CfnBucketPropsMixin.RoutingRuleProperty(
        redirect_rule=s3_mixins.CfnBucketPropsMixin.RedirectRuleProperty(
            host_name="hostName",
            http_redirect_code="httpRedirectCode",
            protocol="protocol",
            replace_key_prefix_with="replaceKeyPrefixWith",
            replace_key_with="replaceKeyWith"
        ),
        routing_rule_condition=s3_mixins.CfnBucketPropsMixin.RoutingRuleConditionProperty(
            http_error_code_returned_equals="httpErrorCodeReturnedEquals",
            key_prefix_equals="keyPrefixEquals"
        )
    )]
)

Attributes

error_document

The name of the error document for the website.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-websiteconfiguration.html#cfn-s3-bucket-websiteconfiguration-errordocument

index_document

The name of the index document for the website.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-websiteconfiguration.html#cfn-s3-bucket-websiteconfiguration-indexdocument

redirect_all_requests_to

The redirect behavior for every request to this bucket’s website endpoint.

If you specify this property, you can’t specify any other property.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-websiteconfiguration.html#cfn-s3-bucket-websiteconfiguration-redirectallrequeststo

routing_rules

Rules that define when a redirect is applied and the redirect behavior.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-websiteconfiguration.html#cfn-s3-bucket-websiteconfiguration-routingrules