CfnBucket

class aws_cdk.aws_s3.CfnBucket(scope, id, *, accelerate_configuration=None, access_control=None, analytics_configurations=None, bucket_encryption=None, bucket_name=None, cors_configuration=None, intelligent_tiering_configurations=None, inventory_configurations=None, lifecycle_configuration=None, logging_configuration=None, metrics_configurations=None, notification_configuration=None, object_lock_configuration=None, object_lock_enabled=None, ownership_controls=None, public_access_block_configuration=None, replication_configuration=None, tags=None, versioning_configuration=None, website_configuration=None)

Bases: CfnResource

A CloudFormation AWS::S3::Bucket.

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.
CloudformationResource:

AWS::S3::Bucket

Link:

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

ExampleMetadata:

infused

Example:

# cfn_template: cfn_inc.CfnInclude

cfn_bucket = cfn_template.get_resource("Bucket")

role = iam.Role(self, "Role",
    assumed_by=iam.AnyPrincipal()
)
role.add_to_policy(iam.PolicyStatement(
    actions=["s3:*"],
    resources=[cfn_bucket.attr_arn]
))

Create a new AWS::S3::Bucket.

Parameters:
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • accelerate_configuration (Union[IResolvable, AccelerateConfigurationProperty, Dict[str, Any], None]) – Configures the transfer acceleration state for an Amazon S3 bucket. For more information, see Amazon S3 Transfer Acceleration in the Amazon S3 User Guide .

  • access_control (Optional[str]) – A canned access control list (ACL) that grants predefined permissions to the bucket. For more information about canned ACLs, see Canned ACL in the Amazon S3 User Guide . Be aware that the syntax for this property differs from the information provided in the Amazon S3 User Guide . The AccessControl property is case-sensitive and must be one of the following values: Private, PublicRead, PublicReadWrite, AuthenticatedRead, LogDeliveryWrite, BucketOwnerRead, BucketOwnerFullControl, or AwsExecRead.

  • analytics_configurations (Union[IResolvable, Sequence[Union[IResolvable, AnalyticsConfigurationProperty, Dict[str, Any]]], None]) – Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket.

  • bucket_encryption (Union[IResolvable, BucketEncryptionProperty, Dict[str, Any], None]) – Specifies default encryption for a bucket using server-side encryption with Amazon S3-managed keys (SSE-S3) or AWS KMS-managed keys (SSE-KMS) bucket. For information about the Amazon S3 default encryption feature, see Amazon S3 Default Encryption for S3 Buckets in the Amazon S3 User Guide .

  • bucket_name (Optional[str]) – A name for the bucket. If you don’t specify a name, AWS CloudFormation generates a unique ID and uses that ID for the bucket name. The bucket name must contain only lowercase letters, numbers, periods (.), and dashes (-) and must follow Amazon S3 bucket restrictions and limitations . For more information, see Rules for naming Amazon S3 buckets in the Amazon S3 User Guide . .. epigraph:: If you specify a name, you can’t perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you need to replace the resource, specify a new name.

  • cors_configuration (Union[IResolvable, CorsConfigurationProperty, Dict[str, Any], None]) – 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 .

  • intelligent_tiering_configurations (Union[IResolvable, Sequence[Union[IResolvable, IntelligentTieringConfigurationProperty, Dict[str, Any]]], None]) – Defines how Amazon S3 handles Intelligent-Tiering storage.

  • inventory_configurations (Union[IResolvable, Sequence[Union[IResolvable, InventoryConfigurationProperty, Dict[str, Any]]], None]) – Specifies the inventory configuration for an Amazon S3 bucket. For more information, see GET Bucket inventory in the Amazon S3 API Reference .

  • lifecycle_configuration (Union[IResolvable, LifecycleConfigurationProperty, Dict[str, Any], None]) – Specifies the lifecycle configuration for objects in an Amazon S3 bucket. For more information, see Object Lifecycle Management in the Amazon S3 User Guide .

  • logging_configuration (Union[IResolvable, LoggingConfigurationProperty, Dict[str, Any], None]) – Settings that define where logs are stored.

  • metrics_configurations (Union[IResolvable, Sequence[Union[IResolvable, MetricsConfigurationProperty, Dict[str, Any]]], None]) – 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 more information, see PutBucketMetricsConfiguration .

  • notification_configuration (Union[IResolvable, NotificationConfigurationProperty, Dict[str, Any], None]) – Configuration that defines how Amazon S3 handles bucket notifications.

  • object_lock_configuration (Union[IResolvable, ObjectLockConfigurationProperty, Dict[str, Any], None]) – 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 . .. epigraph:: - 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. - You can only enable Object Lock for new buckets. If you want to turn on Object Lock for an existing bucket, contact AWS Support.

  • object_lock_enabled (Union[bool, IResolvable, None]) – Indicates whether this bucket has an Object Lock configuration enabled. Enable ObjectLockEnabled when you apply ObjectLockConfiguration to a bucket.

  • ownership_controls (Union[IResolvable, OwnershipControlsProperty, Dict[str, Any], None]) – Configuration that defines how Amazon S3 handles Object Ownership rules.

  • public_access_block_configuration (Union[IResolvable, PublicAccessBlockConfigurationProperty, Dict[str, Any], None]) – Configuration that defines how Amazon S3 handles public access.

  • replication_configuration (Union[IResolvable, ReplicationConfigurationProperty, Dict[str, Any], None]) – Configuration for replicating objects in an S3 bucket. To enable replication, you must also enable versioning by using the VersioningConfiguration property. Amazon S3 can store replicated objects in a single destination bucket or multiple destination buckets. The destination bucket or buckets must already exist.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – An arbitrary set of tags (key-value pairs) for this S3 bucket.

  • versioning_configuration (Union[IResolvable, VersioningConfigurationProperty, Dict[str, Any], None]) – Enables multiple versions of all objects in this bucket. You might enable versioning to prevent objects from being deleted or overwritten by mistake or to archive objects so that you can retrieve previous versions of them.

  • website_configuration (Union[IResolvable, WebsiteConfigurationProperty, Dict[str, Any], None]) – Information used to configure the bucket as a static website. For more information, see Hosting Websites on Amazon S3 .

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_depends_on(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

Return type:

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:

attribute_name (str) – The name of the attribute.

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type:

None

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::S3::Bucket'
accelerate_configuration

Configures the transfer acceleration state for an Amazon S3 bucket.

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

Link:

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

access_control

A canned access control list (ACL) that grants predefined permissions to the bucket.

For more information about canned ACLs, see Canned ACL in the Amazon S3 User Guide .

Be aware that the syntax for this property differs from the information provided in the Amazon S3 User Guide . The AccessControl property is case-sensitive and must be one of the following values: Private, PublicRead, PublicReadWrite, AuthenticatedRead, LogDeliveryWrite, BucketOwnerRead, BucketOwnerFullControl, or AwsExecRead.

Link:

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

analytics_configurations

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

Link:

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

attr_arn

Returns the Amazon Resource Name (ARN) of the specified bucket.

Example: arn:aws:s3:::DOC-EXAMPLE-BUCKET

CloudformationAttribute:

Arn

attr_domain_name

Returns the IPv4 DNS name of the specified bucket.

Example: DOC-EXAMPLE-BUCKET.s3.amazonaws.com

CloudformationAttribute:

DomainName

attr_dual_stack_domain_name

Returns the IPv6 DNS name of the specified bucket.

Example: DOC-EXAMPLE-BUCKET.s3.dualstack.us-east-2.amazonaws.com

For more information about dual-stack endpoints, see Using Amazon S3 Dual-Stack Endpoints .

CloudformationAttribute:

DualStackDomainName

attr_regional_domain_name

Returns the regional domain name of the specified bucket.

Example: DOC-EXAMPLE-BUCKET.s3.us-east-2.amazonaws.com

CloudformationAttribute:

RegionalDomainName

attr_website_url

Returns the Amazon S3 website endpoint for the specified bucket.

Example (IPv4): http://DOC-EXAMPLE-BUCKET.s3-website.us-east-2.amazonaws.com

Example (IPv6): http://DOC-EXAMPLE-BUCKET.s3.dualstack.us-east-2.amazonaws.com

CloudformationAttribute:

WebsiteURL

bucket_encryption

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

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

Link:

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

bucket_name

A name for the bucket.

If you don’t specify a name, AWS CloudFormation generates a unique ID and uses that ID for the bucket name. The bucket name must contain only lowercase letters, numbers, periods (.), and dashes (-) and must follow Amazon S3 bucket restrictions and limitations . For more information, see Rules for naming Amazon S3 buckets in the Amazon S3 User Guide . .. epigraph:

If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you need to replace the resource, specify a new name.
Link:

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

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

cors_configuration

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 .

Link:

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

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

intelligent_tiering_configurations

Defines how Amazon S3 handles Intelligent-Tiering storage.

Link:

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

inventory_configurations

Specifies the inventory configuration for an Amazon S3 bucket.

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

Link:

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

lifecycle_configuration

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

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

Link:

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

logging_configuration

Settings that define where logs are stored.

Link:

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

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

metrics_configurations

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 more information, see PutBucketMetricsConfiguration .

Link:

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

node

The construct tree node associated with this construct.

notification_configuration

Configuration that defines how Amazon S3 handles bucket notifications.

Link:

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

object_lock_configuration

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 . .. epigraph:

- 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.
- You can only enable Object Lock for new buckets. If you want to turn on Object Lock for an existing bucket, contact AWS Support.
Link:

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

object_lock_enabled

Indicates whether this bucket has an Object Lock configuration enabled.

Enable ObjectLockEnabled when you apply ObjectLockConfiguration to a bucket.

Link:

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

ownership_controls

Configuration that defines how Amazon S3 handles Object Ownership rules.

Link:

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

public_access_block_configuration

Configuration that defines how Amazon S3 handles public access.

Link:

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

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

replication_configuration

Configuration for replicating objects in an S3 bucket.

To enable replication, you must also enable versioning by using the VersioningConfiguration property.

Amazon S3 can store replicated objects in a single destination bucket or multiple destination buckets. The destination bucket or buckets must already exist.

Link:

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

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

tags

An arbitrary set of tags (key-value pairs) for this S3 bucket.

Link:

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

versioning_configuration

Enables multiple versions of all objects in this bucket.

You might enable versioning to prevent objects from being deleted or overwritten by mistake or to archive objects so that you can retrieve previous versions of them.

Link:

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

website_configuration

Information used to configure the bucket as a static website.

For more information, see Hosting Websites on Amazon S3 .

Link:

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

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters:

construct (IConstruct) –

Return type:

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters:

x (Any) –

Return type:

bool

AbortIncompleteMultipartUploadProperty

class CfnBucket.AbortIncompleteMultipartUploadProperty(*, days_after_initiation)

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]) – Specifies the number of days after which Amazon S3 stops an incomplete multipart upload.

Link:

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.
import aws_cdk.aws_s3 as s3

abort_incomplete_multipart_upload_property = s3.CfnBucket.AbortIncompleteMultipartUploadProperty(
    days_after_initiation=123
)

Attributes

days_after_initiation

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

Link:

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

AccelerateConfigurationProperty

class CfnBucket.AccelerateConfigurationProperty(*, acceleration_status)

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 (str) – Specifies the transfer acceleration status of the bucket.

Link:

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.
import aws_cdk.aws_s3 as s3

accelerate_configuration_property = s3.CfnBucket.AccelerateConfigurationProperty(
    acceleration_status="accelerationStatus"
)

Attributes

acceleration_status

Specifies the transfer acceleration status of the bucket.

Link:

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

AccessControlTranslationProperty

class CfnBucket.AccessControlTranslationProperty(*, owner)

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 (str) – Specifies the replica ownership. For default and valid values, see PUT bucket replication in the Amazon S3 API Reference .

Link:

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.
import aws_cdk.aws_s3 as s3

access_control_translation_property = s3.CfnBucket.AccessControlTranslationProperty(
    owner="owner"
)

Attributes

owner

Specifies the replica ownership.

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

Link:

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

AnalyticsConfigurationProperty

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

Bases: object

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

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

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

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

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

Link:

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.
import aws_cdk.aws_s3 as s3

analytics_configuration_property = s3.CfnBucket.AnalyticsConfigurationProperty(
    id="id",
    storage_class_analysis=s3.CfnBucket.StorageClassAnalysisProperty(
        data_export=s3.CfnBucket.DataExportProperty(
            destination=s3.CfnBucket.DestinationProperty(
                bucket_arn="bucketArn",
                format="format",

                # the properties below are optional
                bucket_account_id="bucketAccountId",
                prefix="prefix"
            ),
            output_schema_version="outputSchemaVersion"
        )
    ),

    # the properties below are optional
    prefix="prefix",
    tag_filters=[s3.CfnBucket.TagFilterProperty(
        key="key",
        value="value"
    )]
)

Attributes

id

The ID that identifies the analytics configuration.

Link:

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.

Link:

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.

Link:

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.

Link:

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

BucketEncryptionProperty

class CfnBucket.BucketEncryptionProperty(*, server_side_encryption_configuration)

Bases: object

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

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]]]]) – Specifies the default server-side-encryption configuration.

Link:

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.
import aws_cdk.aws_s3 as s3

bucket_encryption_property = s3.CfnBucket.BucketEncryptionProperty(
    server_side_encryption_configuration=[s3.CfnBucket.ServerSideEncryptionRuleProperty(
        bucket_key_enabled=False,
        server_side_encryption_by_default=s3.CfnBucket.ServerSideEncryptionByDefaultProperty(
            sse_algorithm="sseAlgorithm",

            # the properties below are optional
            kms_master_key_id="kmsMasterKeyId"
        )
    )]
)

Attributes

server_side_encryption_configuration

Specifies the default server-side-encryption configuration.

Link:

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

CorsConfigurationProperty

class CfnBucket.CorsConfigurationProperty(*, cors_rules)

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]]]]) – A set of origins and methods (cross-origin access that you want to allow). You can add up to 100 rules to the configuration.

Link:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

cors_configuration_property = s3.CfnBucket.CorsConfigurationProperty(
    cors_rules=[s3.CfnBucket.CorsRuleProperty(
        allowed_methods=["allowedMethods"],
        allowed_origins=["allowedOrigins"],

        # the properties below are optional
        allowed_headers=["allowedHeaders"],
        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.

Link:

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

CorsRuleProperty

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

Bases: object

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

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

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

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

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

Link:

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

cors_rule_property = s3.CfnBucket.CorsRuleProperty(
    allowed_methods=["allowedMethods"],
    allowed_origins=["allowedOrigins"],

    # the properties below are optional
    allowed_headers=["allowedHeaders"],
    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.

Link:

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

allowed_methods

An HTTP method that you allow the origin to run.

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

Link:

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

allowed_origins

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

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-cors-corsrule.html#cfn-s3-bucket-cors-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).

Link:

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

id

A unique identifier for this rule.

The value must be no more than 255 characters.

Link:

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

max_age

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

Link:

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

DataExportProperty

class CfnBucket.DataExportProperty(*, destination, output_schema_version)

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]]) – The place to store the data for an analysis.

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

Link:

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.
import aws_cdk.aws_s3 as s3

data_export_property = s3.CfnBucket.DataExportProperty(
    destination=s3.CfnBucket.DestinationProperty(
        bucket_arn="bucketArn",
        format="format",

        # the properties below are optional
        bucket_account_id="bucketAccountId",
        prefix="prefix"
    ),
    output_schema_version="outputSchemaVersion"
)

Attributes

destination

The place to store the data for an analysis.

Link:

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 .

Link:

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

DefaultRetentionProperty

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

Bases: object

The container element for 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 .

Link:

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.
import aws_cdk.aws_s3 as s3

default_retention_property = s3.CfnBucket.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 .

Link:

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 .

Link:

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 .

Link:

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

DeleteMarkerReplicationProperty

class CfnBucket.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. Disabled by default.

Link:

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.
import aws_cdk.aws_s3 as s3

delete_marker_replication_property = s3.CfnBucket.DeleteMarkerReplicationProperty(
    status="status"
)

Attributes

status

Indicates whether to replicate delete markers.

Disabled by default.

Link:

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

DestinationProperty

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

Bases: object

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

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

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

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

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

Link:

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.
import aws_cdk.aws_s3 as s3

destination_property = s3.CfnBucket.DestinationProperty(
    bucket_arn="bucketArn",
    format="format",

    # the properties below are optional
    bucket_account_id="bucketAccountId",
    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.
Link:

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.

Link:

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

Link:

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.

Link:

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

EncryptionConfigurationProperty

class CfnBucket.EncryptionConfigurationProperty(*, replica_kms_key_id)

Bases: object

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

Parameters:

replica_kms_key_id (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 .

Link:

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.
import aws_cdk.aws_s3 as s3

encryption_configuration_property = s3.CfnBucket.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 .

Link:

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

EventBridgeConfigurationProperty

class CfnBucket.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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-eventbridgeconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

event_bridge_configuration_property = s3.CfnBucket.EventBridgeConfigurationProperty(
    event_bridge_enabled=False
)

Attributes

event_bridge_enabled

Enables delivery of events to Amazon EventBridge.

Link:

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

FilterRuleProperty

class CfnBucket.FilterRuleProperty(*, name, value)

Bases: object

Specifies the Amazon S3 object key name to filter on and whether to filter on the suffix or prefix of the key name.

Parameters:
  • name (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 (str) – The value that the filter searches for in object key names.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter-s3key-rules.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

filter_rule_property = s3.CfnBucket.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 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter-s3key-rules.html#cfn-s3-bucket-notificationconfiguraiton-config-filter-s3key-rules-name

value

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

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter-s3key-rules.html#cfn-s3-bucket-notificationconfiguraiton-config-filter-s3key-rules-value

IntelligentTieringConfigurationProperty

class CfnBucket.IntelligentTieringConfigurationProperty(*, id, status, tierings, prefix=None, tag_filters=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 (str) – The ID used to identify the S3 Intelligent-Tiering configuration.

  • status (str) – Specifies the status of the configuration.

  • tierings (Union[IResolvable, Sequence[Union[IResolvable, TieringProperty, Dict[str, Any]]]]) – 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.

  • 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]) – A container for a key-value pair.

Link:

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.
import aws_cdk.aws_s3 as s3

intelligent_tiering_configuration_property = s3.CfnBucket.IntelligentTieringConfigurationProperty(
    id="id",
    status="status",
    tierings=[s3.CfnBucket.TieringProperty(
        access_tier="accessTier",
        days=123
    )],

    # the properties below are optional
    prefix="prefix",
    tag_filters=[s3.CfnBucket.TagFilterProperty(
        key="key",
        value="value"
    )]
)

Attributes

id

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

Link:

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.

Link:

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.

Link:

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.

Link:

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.
Link:

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

InventoryConfigurationProperty

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

Bases: object

Specifies the 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]]) – Contains information about where to publish the inventory results.

  • enabled (Union[bool, IResolvable]) – 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 (str) – The ID used to identify the inventory configuration.

  • included_object_versions (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.

  • schedule_frequency (str) – Specifies the schedule for generating inventory results. Allowed values : Daily | Weekly

  • optional_fields (Optional[Sequence[str]]) – Contains the optional fields that are included in the inventory results. Valid values : Size | LastModifiedDate | StorageClass | ETag | IsMultipartUploaded | ReplicationStatus | EncryptionStatus | ObjectLockRetainUntilDate | ObjectLockMode | ObjectLockLegalHoldStatus | IntelligentTieringAccessTier | BucketKeyStatus

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

Link:

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.
import aws_cdk.aws_s3 as s3

inventory_configuration_property = s3.CfnBucket.InventoryConfigurationProperty(
    destination=s3.CfnBucket.DestinationProperty(
        bucket_arn="bucketArn",
        format="format",

        # the properties below are optional
        bucket_account_id="bucketAccountId",
        prefix="prefix"
    ),
    enabled=False,
    id="id",
    included_object_versions="includedObjectVersions",
    schedule_frequency="scheduleFrequency",

    # the properties below are optional
    optional_fields=["optionalFields"],
    prefix="prefix"
)

Attributes

destination

Contains information about where to publish the inventory results.

Link:

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.

Link:

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.

Link:

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.

Link:

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.

Valid values : Size | LastModifiedDate | StorageClass | ETag | IsMultipartUploaded | ReplicationStatus | EncryptionStatus | ObjectLockRetainUntilDate | ObjectLockMode | ObjectLockLegalHoldStatus | IntelligentTieringAccessTier | BucketKeyStatus

Link:

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.

Link:

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.

Allowed values : Daily | Weekly

Link:

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

LambdaConfigurationProperty

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

Bases: object

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

Parameters:
  • event (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 .

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

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

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-lambdaconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

lambda_configuration_property = s3.CfnBucket.LambdaConfigurationProperty(
    event="event",
    function="function",

    # the properties below are optional
    filter=s3.CfnBucket.NotificationFilterProperty(
        s3_key=s3.CfnBucket.S3KeyFilterProperty(
            rules=[s3.CfnBucket.FilterRuleProperty(
                name="name",
                value="value"
            )]
        )
    )
)

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 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-lambdaconfig.html#cfn-s3-bucket-notificationconfig-lambdaconfig-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.

Link:

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

function

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

Link:

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

LifecycleConfigurationProperty

class CfnBucket.LifecycleConfigurationProperty(*, rules)

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]]]]) – A lifecycle rule for individual objects in an Amazon S3 bucket.

Link:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

lifecycle_configuration_property = s3.CfnBucket.LifecycleConfigurationProperty(
    rules=[s3.CfnBucket.RuleProperty(
        status="status",

        # the properties below are optional
        abort_incomplete_multipart_upload=s3.CfnBucket.AbortIncompleteMultipartUploadProperty(
            days_after_initiation=123
        ),
        expiration_date=Date(),
        expiration_in_days=123,
        expired_object_delete_marker=False,
        id="id",
        noncurrent_version_expiration=s3.CfnBucket.NoncurrentVersionExpirationProperty(
            noncurrent_days=123,

            # the properties below are optional
            newer_noncurrent_versions=123
        ),
        noncurrent_version_expiration_in_days=123,
        noncurrent_version_transition=s3.CfnBucket.NoncurrentVersionTransitionProperty(
            storage_class="storageClass",
            transition_in_days=123,

            # the properties below are optional
            newer_noncurrent_versions=123
        ),
        noncurrent_version_transitions=[s3.CfnBucket.NoncurrentVersionTransitionProperty(
            storage_class="storageClass",
            transition_in_days=123,

            # the properties below are optional
            newer_noncurrent_versions=123
        )],
        object_size_greater_than=123,
        object_size_less_than=123,
        prefix="prefix",
        tag_filters=[s3.CfnBucket.TagFilterProperty(
            key="key",
            value="value"
        )],
        transition=s3.CfnBucket.TransitionProperty(
            storage_class="storageClass",

            # the properties below are optional
            transition_date=Date(),
            transition_in_days=123
        ),
        transitions=[s3.CfnBucket.TransitionProperty(
            storage_class="storageClass",

            # the properties below are optional
            transition_date=Date(),
            transition_in_days=123
        )]
    )]
)

Attributes

rules

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

Link:

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

LoggingConfigurationProperty

class CfnBucket.LoggingConfigurationProperty(*, destination_bucket_name=None, log_file_prefix=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.

Link:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

logging_configuration_property = s3.CfnBucket.LoggingConfigurationProperty(
    destination_bucket_name="destinationBucketName",
    log_file_prefix="logFilePrefix"
)

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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-loggingconfig.html#cfn-s3-bucket-loggingconfig-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.

Link:

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

MetricsConfigurationProperty

class CfnBucket.MetricsConfigurationProperty(*, id, access_point_arn=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:
  • id (str) – The ID used to identify the metrics configuration. This can be any value you choose that helps you identify your metrics configuration.

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

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

Link:

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.
import aws_cdk.aws_s3 as s3

metrics_configuration_property = s3.CfnBucket.MetricsConfigurationProperty(
    id="id",

    # the properties below are optional
    access_point_arn="accessPointArn",
    prefix="prefix",
    tag_filters=[s3.CfnBucket.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.

Link:

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.

Link:

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.

Link:

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.

Link:

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

MetricsProperty

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

Bases: object

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

Parameters:
  • status (str) – Specifies whether the replication metrics are enabled.

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

Link:

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.
import aws_cdk.aws_s3 as s3

metrics_property = s3.CfnBucket.MetricsProperty(
    status="status",

    # the properties below are optional
    event_threshold=s3.CfnBucket.ReplicationTimeValueProperty(
        minutes=123
    )
)

Attributes

event_threshold

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

Link:

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.

Link:

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

NoncurrentVersionExpirationProperty

class CfnBucket.NoncurrentVersionExpirationProperty(*, noncurrent_days, newer_noncurrent_versions=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.

Parameters:
  • noncurrent_days (Union[int, float]) – 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 .

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

Link:

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

noncurrent_version_expiration_property = s3.CfnBucket.NoncurrentVersionExpirationProperty(
    noncurrent_days=123,

    # the properties below are optional
    newer_noncurrent_versions=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 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-noncurrentversionexpiration.html#cfn-s3-bucket-lifecycleconfig-rule-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 .

Link:

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

NoncurrentVersionTransitionProperty

class CfnBucket.NoncurrentVersionTransitionProperty(*, storage_class, transition_in_days, newer_noncurrent_versions=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:
  • storage_class (str) – The class of storage used to store the object.

  • transition_in_days (Union[int, float]) – 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 .

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

Link:

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

noncurrent_version_transition_property = s3.CfnBucket.NoncurrentVersionTransitionProperty(
    storage_class="storageClass",
    transition_in_days=123,

    # the properties below are optional
    newer_noncurrent_versions=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 .

Link:

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

storage_class

The class of storage used to store the object.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-noncurrentversiontransition.html#cfn-s3-bucket-lifecycleconfig-rule-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 .

Link:

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

NotificationConfigurationProperty

class CfnBucket.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:
Link:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

notification_configuration_property = s3.CfnBucket.NotificationConfigurationProperty(
    event_bridge_configuration=s3.CfnBucket.EventBridgeConfigurationProperty(
        event_bridge_enabled=False
    ),
    lambda_configurations=[s3.CfnBucket.LambdaConfigurationProperty(
        event="event",
        function="function",

        # the properties below are optional
        filter=s3.CfnBucket.NotificationFilterProperty(
            s3_key=s3.CfnBucket.S3KeyFilterProperty(
                rules=[s3.CfnBucket.FilterRuleProperty(
                    name="name",
                    value="value"
                )]
            )
        )
    )],
    queue_configurations=[s3.CfnBucket.QueueConfigurationProperty(
        event="event",
        queue="queue",

        # the properties below are optional
        filter=s3.CfnBucket.NotificationFilterProperty(
            s3_key=s3.CfnBucket.S3KeyFilterProperty(
                rules=[s3.CfnBucket.FilterRuleProperty(
                    name="name",
                    value="value"
                )]
            )
        )
    )],
    topic_configurations=[s3.CfnBucket.TopicConfigurationProperty(
        event="event",
        topic="topic",

        # the properties below are optional
        filter=s3.CfnBucket.NotificationFilterProperty(
            s3_key=s3.CfnBucket.S3KeyFilterProperty(
                rules=[s3.CfnBucket.FilterRuleProperty(
                    name="name",
                    value="value"
                )]
            )
        )
    )]
)

Attributes

event_bridge_configuration

Enables delivery of events to Amazon EventBridge.

Link:

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

lambda_configurations

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

Link:

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

queue_configurations

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

Link:

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

topic_configurations

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

Link:

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

NotificationFilterProperty

class CfnBucket.NotificationFilterProperty(*, s3_key)

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]]) – A container for object key name prefix and suffix filtering rules.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

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

Attributes

s3_key

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

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter.html#cfn-s3-bucket-notificationconfiguraiton-config-filter-s3key

ObjectLockConfigurationProperty

class CfnBucket.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 .

Link:

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.
import aws_cdk.aws_s3 as s3

object_lock_configuration_property = s3.CfnBucket.ObjectLockConfigurationProperty(
    object_lock_enabled="objectLockEnabled",
    rule=s3.CfnBucket.ObjectLockRuleProperty(
        default_retention=s3.CfnBucket.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.

Link:

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 .

Link:

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

ObjectLockRuleProperty

class CfnBucket.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 .

Link:

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.
import aws_cdk.aws_s3 as s3

object_lock_rule_property = s3.CfnBucket.ObjectLockRuleProperty(
    default_retention=s3.CfnBucket.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 .

Link:

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

OwnershipControlsProperty

class CfnBucket.OwnershipControlsProperty(*, rules)

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]]]]) – Specifies the container element for Object Ownership rules.

Link:

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.
import aws_cdk.aws_s3 as s3

ownership_controls_property = s3.CfnBucket.OwnershipControlsProperty(
    rules=[s3.CfnBucket.OwnershipControlsRuleProperty(
        object_ownership="objectOwnership"
    )]
)

Attributes

rules

Specifies the container element for Object Ownership rules.

Link:

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

OwnershipControlsRuleProperty

class CfnBucket.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. Allowed values : BucketOwnerEnforced | ObjectWriter | BucketOwnerPreferred

Link:

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.
import aws_cdk.aws_s3 as s3

ownership_controls_rule_property = s3.CfnBucket.OwnershipControlsRuleProperty(
    object_ownership="objectOwnership"
)

Attributes

object_ownership

Specifies an Object Ownership rule.

Allowed values : BucketOwnerEnforced | ObjectWriter | BucketOwnerPreferred

Link:

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

PublicAccessBlockConfigurationProperty

class CfnBucket.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. 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.

Link:

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.
import aws_cdk.aws_s3 as s3

public_access_block_configuration_property = s3.CfnBucket.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.

Link:

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.

Link:

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.

Link:

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.

Link:

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

QueueConfigurationProperty

class CfnBucket.QueueConfigurationProperty(*, event, queue, filter=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 (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 .

  • queue (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.

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

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-queueconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

queue_configuration_property = s3.CfnBucket.QueueConfigurationProperty(
    event="event",
    queue="queue",

    # the properties below are optional
    filter=s3.CfnBucket.NotificationFilterProperty(
        s3_key=s3.CfnBucket.S3KeyFilterProperty(
            rules=[s3.CfnBucket.FilterRuleProperty(
                name="name",
                value="value"
            )]
        )
    )
)

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 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-queueconfig.html#cfn-s3-bucket-notificationconfig-queueconfig-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 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-queueconfig.html#cfn-s3-bucket-notificationconfig-queueconfig-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.

Link:

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

RedirectAllRequestsToProperty

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

Bases: object

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

Parameters:
  • host_name (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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-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.
import aws_cdk.aws_s3 as s3

redirect_all_requests_to_property = s3.CfnBucket.RedirectAllRequestsToProperty(
    host_name="hostName",

    # the properties below are optional
    protocol="protocol"
)

Attributes

host_name

Name of the host where requests are redirected.

Link:

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

protocol

Protocol to use when redirecting requests.

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

Link:

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

RedirectRuleProperty

class CfnBucket.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 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-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.
import aws_cdk.aws_s3 as s3

redirect_rule_property = s3.CfnBucket.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.

Link:

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

http_redirect_code

The HTTP redirect code to use on the response.

Not required if one of the siblings is present.

Link:

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

protocol

Protocol to use when redirecting requests.

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

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-redirectrule.html#cfn-s3-websiteconfiguration-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>`_ .
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-redirectrule.html#cfn-s3-websiteconfiguration-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>`_ .
Link:

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

ReplicaModificationsProperty

class CfnBucket.ReplicaModificationsProperty(*, status)

Bases: object

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

Parameters:

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

Link:

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.
import aws_cdk.aws_s3 as s3

replica_modifications_property = s3.CfnBucket.ReplicaModificationsProperty(
    status="status"
)

Attributes

status

Specifies whether Amazon S3 replicates modifications on replicas.

Allowed values : Enabled | Disabled

Link:

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

ReplicationConfigurationProperty

class CfnBucket.ReplicationConfigurationProperty(*, role, rules)

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.

Parameters:
  • role (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]]]]) – 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.

Link:

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.
import aws_cdk.aws_s3 as s3

replication_configuration_property = s3.CfnBucket.ReplicationConfigurationProperty(
    role="role",
    rules=[s3.CfnBucket.ReplicationRuleProperty(
        destination=s3.CfnBucket.ReplicationDestinationProperty(
            bucket="bucket",

            # the properties below are optional
            access_control_translation=s3.CfnBucket.AccessControlTranslationProperty(
                owner="owner"
            ),
            account="account",
            encryption_configuration=s3.CfnBucket.EncryptionConfigurationProperty(
                replica_kms_key_id="replicaKmsKeyId"
            ),
            metrics=s3.CfnBucket.MetricsProperty(
                status="status",

                # the properties below are optional
                event_threshold=s3.CfnBucket.ReplicationTimeValueProperty(
                    minutes=123
                )
            ),
            replication_time=s3.CfnBucket.ReplicationTimeProperty(
                status="status",
                time=s3.CfnBucket.ReplicationTimeValueProperty(
                    minutes=123
                )
            ),
            storage_class="storageClass"
        ),
        status="status",

        # the properties below are optional
        delete_marker_replication=s3.CfnBucket.DeleteMarkerReplicationProperty(
            status="status"
        ),
        filter=s3.CfnBucket.ReplicationRuleFilterProperty(
            and=s3.CfnBucket.ReplicationRuleAndOperatorProperty(
                prefix="prefix",
                tag_filters=[s3.CfnBucket.TagFilterProperty(
                    key="key",
                    value="value"
                )]
            ),
            prefix="prefix",
            tag_filter=s3.CfnBucket.TagFilterProperty(
                key="key",
                value="value"
            )
        ),
        id="id",
        prefix="prefix",
        priority=123,
        source_selection_criteria=s3.CfnBucket.SourceSelectionCriteriaProperty(
            replica_modifications=s3.CfnBucket.ReplicaModificationsProperty(
                status="status"
            ),
            sse_kms_encrypted_objects=s3.CfnBucket.SseKmsEncryptedObjectsProperty(
                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 .

Link:

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.

Link:

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

ReplicationDestinationProperty

class CfnBucket.ReplicationDestinationProperty(*, bucket, access_control_translation=None, account=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:
  • bucket (str) – The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store the results.

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

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

Link:

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

replication_destination_property = s3.CfnBucket.ReplicationDestinationProperty(
    bucket="bucket",

    # the properties below are optional
    access_control_translation=s3.CfnBucket.AccessControlTranslationProperty(
        owner="owner"
    ),
    account="account",
    encryption_configuration=s3.CfnBucket.EncryptionConfigurationProperty(
        replica_kms_key_id="replicaKmsKeyId"
    ),
    metrics=s3.CfnBucket.MetricsProperty(
        status="status",

        # the properties below are optional
        event_threshold=s3.CfnBucket.ReplicationTimeValueProperty(
            minutes=123
        )
    ),
    replication_time=s3.CfnBucket.ReplicationTimeProperty(
        status="status",
        time=s3.CfnBucket.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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules-destination.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.

Link:

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

bucket

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

Link:

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

encryption_configuration

Specifies encryption-related information.

Link:

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

metrics

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

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules-destination.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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules-destination.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 .

Link:

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

ReplicationRuleAndOperatorProperty

class CfnBucket.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.

Link:

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.
import aws_cdk.aws_s3 as s3

replication_rule_and_operator_property = s3.CfnBucket.ReplicationRuleAndOperatorProperty(
    prefix="prefix",
    tag_filters=[s3.CfnBucket.TagFilterProperty(
        key="key",
        value="value"
    )]
)

Attributes

prefix

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

Link:

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.

Link:

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

ReplicationRuleFilterProperty

class CfnBucket.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.

Link:

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.
import aws_cdk.aws_s3 as s3

replication_rule_filter_property = s3.CfnBucket.ReplicationRuleFilterProperty(
    and=s3.CfnBucket.ReplicationRuleAndOperatorProperty(
        prefix="prefix",
        tag_filters=[s3.CfnBucket.TagFilterProperty(
            key="key",
            value="value"
        )]
    ),
    prefix="prefix",
    tag_filter=s3.CfnBucket.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.

Link:

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 .

Link:

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.

Link:

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

ReplicationRuleProperty

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

Bases: object

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

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

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

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

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

Link:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

replication_rule_property = s3.CfnBucket.ReplicationRuleProperty(
    destination=s3.CfnBucket.ReplicationDestinationProperty(
        bucket="bucket",

        # the properties below are optional
        access_control_translation=s3.CfnBucket.AccessControlTranslationProperty(
            owner="owner"
        ),
        account="account",
        encryption_configuration=s3.CfnBucket.EncryptionConfigurationProperty(
            replica_kms_key_id="replicaKmsKeyId"
        ),
        metrics=s3.CfnBucket.MetricsProperty(
            status="status",

            # the properties below are optional
            event_threshold=s3.CfnBucket.ReplicationTimeValueProperty(
                minutes=123
            )
        ),
        replication_time=s3.CfnBucket.ReplicationTimeProperty(
            status="status",
            time=s3.CfnBucket.ReplicationTimeValueProperty(
                minutes=123
            )
        ),
        storage_class="storageClass"
    ),
    status="status",

    # the properties below are optional
    delete_marker_replication=s3.CfnBucket.DeleteMarkerReplicationProperty(
        status="status"
    ),
    filter=s3.CfnBucket.ReplicationRuleFilterProperty(
        and=s3.CfnBucket.ReplicationRuleAndOperatorProperty(
            prefix="prefix",
            tag_filters=[s3.CfnBucket.TagFilterProperty(
                key="key",
                value="value"
            )]
        ),
        prefix="prefix",
        tag_filter=s3.CfnBucket.TagFilterProperty(
            key="key",
            value="value"
        )
    ),
    id="id",
    prefix="prefix",
    priority=123,
    source_selection_criteria=s3.CfnBucket.SourceSelectionCriteriaProperty(
        replica_modifications=s3.CfnBucket.ReplicaModificationsProperty(
            status="status"
        ),
        sse_kms_encrypted_objects=s3.CfnBucket.SseKmsEncryptedObjectsProperty(
            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>`_ .
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules.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).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules.html#cfn-s3-bucket-replicationconfiguration-rules-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.
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules.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”.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules.html#cfn-s3-bucket-replicationconfiguration-rules-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>`_ .
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules.html#cfn-s3-bucket-replicationconfiguration-rules-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 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules.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.

Link:

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

status

Specifies whether the rule is enabled.

Link:

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

ReplicationTimeProperty

class CfnBucket.ReplicationTimeProperty(*, status, time)

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 (str) – Specifies whether the replication time is enabled.

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

Link:

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.
import aws_cdk.aws_s3 as s3

replication_time_property = s3.CfnBucket.ReplicationTimeProperty(
    status="status",
    time=s3.CfnBucket.ReplicationTimeValueProperty(
        minutes=123
    )
)

Attributes

status

Specifies whether the replication time is enabled.

Link:

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.

Link:

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

ReplicationTimeValueProperty

class CfnBucket.ReplicationTimeValueProperty(*, minutes)

Bases: object

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

Parameters:

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

Link:

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.
import aws_cdk.aws_s3 as s3

replication_time_value_property = s3.CfnBucket.ReplicationTimeValueProperty(
    minutes=123
)

Attributes

minutes

Contains an integer specifying time in minutes.

Valid value: 15

Link:

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

RoutingRuleConditionProperty

class CfnBucket.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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-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.
import aws_cdk.aws_s3 as s3

routing_rule_condition_property = s3.CfnBucket.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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-routingrulecondition.html#cfn-s3-websiteconfiguration-routingrules-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.

Link:

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

RoutingRuleProperty

class CfnBucket.RoutingRuleProperty(*, redirect_rule, 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]]) – 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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

routing_rule_property = s3.CfnBucket.RoutingRuleProperty(
    redirect_rule=s3.CfnBucket.RedirectRuleProperty(
        host_name="hostName",
        http_redirect_code="httpRedirectCode",
        protocol="protocol",
        replace_key_prefix_with="replaceKeyPrefixWith",
        replace_key_with="replaceKeyWith"
    ),

    # the properties below are optional
    routing_rule_condition=s3.CfnBucket.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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html#cfn-s3-websiteconfiguration-routingrules-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.

Link:

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

RuleProperty

class CfnBucket.RuleProperty(*, status, 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, 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:
  • status (str) – If Enabled , the rule is currently being applied. If Disabled , the rule is not currently being applied.

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

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

Link:

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

rule_property = s3.CfnBucket.RuleProperty(
    status="status",

    # the properties below are optional
    abort_incomplete_multipart_upload=s3.CfnBucket.AbortIncompleteMultipartUploadProperty(
        days_after_initiation=123
    ),
    expiration_date=Date(),
    expiration_in_days=123,
    expired_object_delete_marker=False,
    id="id",
    noncurrent_version_expiration=s3.CfnBucket.NoncurrentVersionExpirationProperty(
        noncurrent_days=123,

        # the properties below are optional
        newer_noncurrent_versions=123
    ),
    noncurrent_version_expiration_in_days=123,
    noncurrent_version_transition=s3.CfnBucket.NoncurrentVersionTransitionProperty(
        storage_class="storageClass",
        transition_in_days=123,

        # the properties below are optional
        newer_noncurrent_versions=123
    ),
    noncurrent_version_transitions=[s3.CfnBucket.NoncurrentVersionTransitionProperty(
        storage_class="storageClass",
        transition_in_days=123,

        # the properties below are optional
        newer_noncurrent_versions=123
    )],
    object_size_greater_than=123,
    object_size_less_than=123,
    prefix="prefix",
    tag_filters=[s3.CfnBucket.TagFilterProperty(
        key="key",
        value="value"
    )],
    transition=s3.CfnBucket.TransitionProperty(
        storage_class="storageClass",

        # the properties below are optional
        transition_date=Date(),
        transition_in_days=123
    ),
    transitions=[s3.CfnBucket.TransitionProperty(
        storage_class="storageClass",

        # the properties below are optional
        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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-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 .

Link:

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

id

Unique identifier for the rule.

The value can’t be longer than 255 characters.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-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 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-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 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-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 .

Link:

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

status

If Enabled , the rule is currently being applied.

If Disabled , the rule is not currently being applied.

Link:

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

tag_filters

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

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-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.

Link:

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

S3KeyFilterProperty

class CfnBucket.S3KeyFilterProperty(*, rules)

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]]]]) – A list of containers for the key-value pair that defines the criteria for the filter rule.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter-s3key.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

s3_key_filter_property = s3.CfnBucket.S3KeyFilterProperty(
    rules=[s3.CfnBucket.FilterRuleProperty(
        name="name",
        value="value"
    )]
)

Attributes

rules

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

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter-s3key.html#cfn-s3-bucket-notificationconfiguraiton-config-filter-s3key-rules

ServerSideEncryptionByDefaultProperty

class CfnBucket.ServerSideEncryptionByDefaultProperty(*, sse_algorithm, kms_master_key_id=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. If you don’t specify a customer managed key at configuration, Amazon S3 automatically creates an AWS KMS key 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. For more information, see PUT Bucket encryption in the Amazon S3 API Reference .

Parameters:
  • sse_algorithm (str) – Server-side encryption algorithm to use for the default encryption.

  • kms_master_key_id (Optional[str]) – KMS key ID to use for the default encryption. This parameter is allowed if SSEAlgorithm is aws:kms. You can specify the key ID or the Amazon Resource Name (ARN) of the CMK. However, if you are using encryption with cross-account operations, you must use a fully qualified CMK ARN. For more information, see Using encryption for cross-account operations . For example: - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab .. epigraph:: Amazon S3 only supports symmetric KMS keys and not asymmetric KMS keys. For more information, see Using Symmetric and Asymmetric Keys in the AWS Key Management Service Developer Guide .

Link:

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.
import aws_cdk.aws_s3 as s3

server_side_encryption_by_default_property = s3.CfnBucket.ServerSideEncryptionByDefaultProperty(
    sse_algorithm="sseAlgorithm",

    # the properties below are optional
    kms_master_key_id="kmsMasterKeyId"
)

Attributes

kms_master_key_id

kms.

You can specify the key ID or the Amazon Resource Name (ARN) of the CMK. However, if you are using encryption with cross-account operations, you must use a fully qualified CMK ARN. For more information, see Using encryption for cross-account operations .

For example:

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

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

Amazon S3 only supports symmetric KMS keys and not asymmetric KMS keys. For more information, see Using Symmetric and Asymmetric Keys in the AWS Key Management Service Developer Guide .

Link:

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

Type:

KMS key ID to use for the default encryption. This parameter is allowed if SSEAlgorithm is aws

sse_algorithm

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

Link:

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

ServerSideEncryptionRuleProperty

class CfnBucket.ServerSideEncryptionRuleProperty(*, bucket_key_enabled=None, server_side_encryption_by_default=None)

Bases: object

Specifies the default server-side encryption configuration.

Parameters:
  • 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.

Link:

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.
import aws_cdk.aws_s3 as s3

server_side_encryption_rule_property = s3.CfnBucket.ServerSideEncryptionRuleProperty(
    bucket_key_enabled=False,
    server_side_encryption_by_default=s3.CfnBucket.ServerSideEncryptionByDefaultProperty(
        sse_algorithm="sseAlgorithm",

        # the properties below are optional
        kms_master_key_id="kmsMasterKeyId"
    )
)

Attributes

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 .

Link:

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.

Link:

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

SourceSelectionCriteriaProperty

class CfnBucket.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:
Link:

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.
import aws_cdk.aws_s3 as s3

source_selection_criteria_property = s3.CfnBucket.SourceSelectionCriteriaProperty(
    replica_modifications=s3.CfnBucket.ReplicaModificationsProperty(
        status="status"
    ),
    sse_kms_encrypted_objects=s3.CfnBucket.SseKmsEncryptedObjectsProperty(
        status="status"
    )
)

Attributes

replica_modifications

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

Link:

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.

Link:

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

SseKmsEncryptedObjectsProperty

class CfnBucket.SseKmsEncryptedObjectsProperty(*, status)

Bases: object

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

Parameters:

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

Link:

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.
import aws_cdk.aws_s3 as s3

sse_kms_encrypted_objects_property = s3.CfnBucket.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.

Link:

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

StorageClassAnalysisProperty

class CfnBucket.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.

Link:

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.
import aws_cdk.aws_s3 as s3

storage_class_analysis_property = s3.CfnBucket.StorageClassAnalysisProperty(
    data_export=s3.CfnBucket.DataExportProperty(
        destination=s3.CfnBucket.DestinationProperty(
            bucket_arn="bucketArn",
            format="format",

            # the properties below are optional
            bucket_account_id="bucketAccountId",
            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.

Link:

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

TagFilterProperty

class CfnBucket.TagFilterProperty(*, key, value)

Bases: object

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

Parameters:
  • key (str) – The tag key.

  • value (str) – The tag value.

Link:

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.
import aws_cdk.aws_s3 as s3

tag_filter_property = s3.CfnBucket.TagFilterProperty(
    key="key",
    value="value"
)

Attributes

key

The tag key.

Link:

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

value

The tag value.

Link:

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

TieringProperty

class CfnBucket.TieringProperty(*, access_tier, days)

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 (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]) – 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).

Link:

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.
import aws_cdk.aws_s3 as s3

tiering_property = s3.CfnBucket.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.

Link:

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).

Link:

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

TopicConfigurationProperty

class CfnBucket.TopicConfigurationProperty(*, event, topic, filter=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 (str) –

    The Amazon S3 bucket event about which to send notifications. For more information, see Supported Event Types in the Amazon S3 User Guide .

  • topic (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.

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

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-topicconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

topic_configuration_property = s3.CfnBucket.TopicConfigurationProperty(
    event="event",
    topic="topic",

    # the properties below are optional
    filter=s3.CfnBucket.NotificationFilterProperty(
        s3_key=s3.CfnBucket.S3KeyFilterProperty(
            rules=[s3.CfnBucket.FilterRuleProperty(
                name="name",
                value="value"
            )]
        )
    )
)

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 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-topicconfig.html#cfn-s3-bucket-notificationconfig-topicconfig-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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-topicconfig.html#cfn-s3-bucket-notificationconfig-topicconfig-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.

Link:

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

TransitionProperty

class CfnBucket.TransitionProperty(*, storage_class, 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 (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. The value must be a positive integer.

Link:

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

transition_property = s3.CfnBucket.TransitionProperty(
    storage_class="storageClass",

    # the properties below are optional
    transition_date=Date(),
    transition_in_days=123
)

Attributes

storage_class

The storage class to which you want the object to transition.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-transition.html#cfn-s3-bucket-lifecycleconfig-rule-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.

Link:

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

transition_in_days

Indicates the number of days after creation when objects are transitioned to the specified storage class.

The value must be a positive integer.

Link:

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

VersioningConfigurationProperty

class CfnBucket.VersioningConfigurationProperty(*, status)

Bases: object

Describes the versioning state of an Amazon S3 bucket.

For more information, see PUT Bucket versioning in the Amazon S3 API Reference .

Parameters:

status (str) – The versioning state of the bucket.

Link:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

versioning_configuration_property = s3.CfnBucket.VersioningConfigurationProperty(
    status="status"
)

Attributes

status

The versioning state of the bucket.

Link:

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

WebsiteConfigurationProperty

class CfnBucket.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.

Link:

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

website_configuration_property = s3.CfnBucket.WebsiteConfigurationProperty(
    error_document="errorDocument",
    index_document="indexDocument",
    redirect_all_requests_to=s3.CfnBucket.RedirectAllRequestsToProperty(
        host_name="hostName",

        # the properties below are optional
        protocol="protocol"
    ),
    routing_rules=[s3.CfnBucket.RoutingRuleProperty(
        redirect_rule=s3.CfnBucket.RedirectRuleProperty(
            host_name="hostName",
            http_redirect_code="httpRedirectCode",
            protocol="protocol",
            replace_key_prefix_with="replaceKeyPrefixWith",
            replace_key_with="replaceKeyWith"
        ),

        # the properties below are optional
        routing_rule_condition=s3.CfnBucket.RoutingRuleConditionProperty(
            http_error_code_returned_equals="httpErrorCodeReturnedEquals",
            key_prefix_equals="keyPrefixEquals"
        )
    )]
)

Attributes

error_document

The name of the error document for the website.

Link:

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

index_document

The name of the index document for the website.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration.html#cfn-s3-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.

Link:

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

routing_rules

Rules that define when a redirect is applied and the redirect behavior.

Link:

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