CfnBucketPropsMixin
- class aws_cdk.mixins_preview.aws_s3.mixins.CfnBucketPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::S3::Bucketresource creates an Amazon S3 bucket in the same AWS Region where you create the AWS CloudFormation stack.To control how AWS CloudFormation handles the bucket when the stack is deleted, you can set a deletion policy for your bucket. You can choose to retain the bucket or to delete the bucket. For more information, see DeletionPolicy Attribute . .. epigraph:
You can only delete empty buckets. Deletion fails for buckets that have contents.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-bucket.html
- CloudformationResource:
AWS::S3::Bucket
- Mixin:
true
- ExampleMetadata:
infused
Example:
from aws_cdk.mixins_preview.with import bucket = s3.Bucket(scope, "Bucket").with(CfnBucketPropsMixin( versioning_configuration=CfnBucketPropsMixin.VersioningConfigurationProperty(status="Enabled"), public_access_block_configuration=CfnBucketPropsMixin.PublicAccessBlockConfigurationProperty( block_public_acls=True, block_public_policy=True ) ))
Create a mixin to apply properties to
AWS::S3::Bucket.- Parameters:
props (
Union[CfnBucketMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['abacStatus', 'accelerateConfiguration', 'accessControl', 'analyticsConfigurations', 'bucketEncryption', 'bucketName', 'corsConfiguration', 'intelligentTieringConfigurations', 'inventoryConfigurations', 'lifecycleConfiguration', 'loggingConfiguration', 'metadataConfiguration', 'metadataTableConfiguration', 'metricsConfigurations', 'notificationConfiguration', 'objectLockConfiguration', 'objectLockEnabled', 'ownershipControls', 'publicAccessBlockConfiguration', 'replicationConfiguration', 'tags', 'versioningConfiguration', 'websiteConfiguration']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
AbortIncompleteMultipartUploadProperty
- class CfnBucketPropsMixin.AbortIncompleteMultipartUploadProperty(*, days_after_initiation=None)
Bases:
objectSpecifies the days since the initiation of an incomplete multipart upload that Amazon S3 will wait before permanently removing all parts of the upload.
For more information, see Stopping Incomplete Multipart Uploads Using a Bucket Lifecycle Policy in the Amazon S3 User Guide .
- Parameters:
days_after_initiation (
Union[int,float,None]) – Specifies the number of days after which Amazon S3 stops an incomplete multipart upload.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins abort_incomplete_multipart_upload_property = s3_mixins.CfnBucketPropsMixin.AbortIncompleteMultipartUploadProperty( days_after_initiation=123 )
Attributes
- days_after_initiation
Specifies the number of days after which Amazon S3 stops an incomplete multipart upload.
AccelerateConfigurationProperty
- class CfnBucketPropsMixin.AccelerateConfigurationProperty(*, acceleration_status=None)
Bases:
objectConfigures the transfer acceleration state for an Amazon S3 bucket.
For more information, see Amazon S3 Transfer Acceleration in the Amazon S3 User Guide .
- Parameters:
acceleration_status (
Optional[str]) – Specifies the transfer acceleration status of the bucket.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins accelerate_configuration_property = s3_mixins.CfnBucketPropsMixin.AccelerateConfigurationProperty( acceleration_status="accelerationStatus" )
Attributes
- acceleration_status
Specifies the transfer acceleration status of the bucket.
AccessControlTranslationProperty
- class CfnBucketPropsMixin.AccessControlTranslationProperty(*, owner=None)
Bases:
objectSpecify this only in a cross-account scenario (where source and destination bucket owners are not the same), and you want to change replica ownership to the AWS account that owns the destination bucket.
If this is not specified in the replication configuration, the replicas are owned by same AWS account that owns the source object.
- Parameters:
owner (
Optional[str]) – Specifies the replica ownership. For default and valid values, see PUT bucket replication in the Amazon S3 API Reference .- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins access_control_translation_property = s3_mixins.CfnBucketPropsMixin.AccessControlTranslationProperty( owner="owner" )
Attributes
- owner
Specifies the replica ownership.
For default and valid values, see PUT bucket replication in the Amazon S3 API Reference .
AnalyticsConfigurationProperty
- class CfnBucketPropsMixin.AnalyticsConfigurationProperty(*, id=None, prefix=None, storage_class_analysis=None, tag_filters=None)
Bases:
objectSpecifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket.
- Parameters:
id (
Optional[str]) – The ID that identifies the analytics configuration.prefix (
Optional[str]) – The prefix that an object must have to be included in the analytics results.storage_class_analysis (
Union[IResolvable,StorageClassAnalysisProperty,Dict[str,Any],None]) – Contains data related to access patterns to be collected and made available to analyze the tradeoffs between different storage classes.tag_filters (
Union[IResolvable,Sequence[Union[IResolvable,TagFilterProperty,Dict[str,Any]]],None]) – The tags to use when evaluating an analytics filter. The analytics only includes objects that meet the filter’s criteria. If no filter is specified, all of the contents of the bucket are included in the analysis.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins analytics_configuration_property = s3_mixins.CfnBucketPropsMixin.AnalyticsConfigurationProperty( id="id", prefix="prefix", storage_class_analysis=s3_mixins.CfnBucketPropsMixin.StorageClassAnalysisProperty( data_export=s3_mixins.CfnBucketPropsMixin.DataExportProperty( destination=s3_mixins.CfnBucketPropsMixin.DestinationProperty( bucket_account_id="bucketAccountId", bucket_arn="bucketArn", format="format", prefix="prefix" ), output_schema_version="outputSchemaVersion" ) ), tag_filters=[s3_mixins.CfnBucketPropsMixin.TagFilterProperty( key="key", value="value" )] )
Attributes
- id
The ID that identifies the analytics configuration.
- prefix
The prefix that an object must have to be included in the analytics results.
- storage_class_analysis
Contains data related to access patterns to be collected and made available to analyze the tradeoffs between different storage classes.
- 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.
BlockedEncryptionTypesProperty
- class CfnBucketPropsMixin.BlockedEncryptionTypesProperty(*, encryption_type=None)
Bases:
objectA bucket-level setting for Amazon S3 general purpose buckets used to prevent the upload of new objects encrypted with the specified server-side encryption type.
For example, blocking an encryption type will block
PutObject,CopyObject,PostObject, multipart upload, and replication requests to the bucket for objects with the specified encryption type. However, you can continue to read and list any pre-existing objects already encrypted with the specified encryption type. For more information, see Blocking or unblocking SSE-C for a general purpose bucket .This data type is used with the following actions:
Permissions - You must have the
s3:PutEncryptionConfigurationpermission to block or unblock an encryption type for a bucket.
You must have the
s3:GetEncryptionConfigurationpermission to view a bucket’s encryption type.- Parameters:
encryption_type (
Optional[Sequence[str]]) – The object encryption type that you want to block or unblock for an Amazon S3 general purpose bucket. .. epigraph:: Currently, this parameter only supports blocking or unblocking server side encryption with customer-provided keys (SSE-C). For more information about SSE-C, see Using server-side encryption with customer-provided keys (SSE-C) .- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins blocked_encryption_types_property = s3_mixins.CfnBucketPropsMixin.BlockedEncryptionTypesProperty( encryption_type=["encryptionType"] )
Attributes
- encryption_type
The object encryption type that you want to block or unblock for an Amazon S3 general purpose bucket.
Currently, this parameter only supports blocking or unblocking server side encryption with customer-provided keys (SSE-C). For more information about SSE-C, see Using server-side encryption with customer-provided keys (SSE-C) .
BucketEncryptionProperty
- class CfnBucketPropsMixin.BucketEncryptionProperty(*, server_side_encryption_configuration=None)
Bases:
objectSpecifies default encryption for a bucket using server-side encryption with Amazon S3-managed keys (SSE-S3), AWS KMS-managed keys (SSE-KMS), or dual-layer server-side encryption with KMS-managed keys (DSSE-KMS).
For information about the Amazon S3 default encryption feature, see Amazon S3 Default Encryption for S3 Buckets in the Amazon S3 User Guide .
- Parameters:
server_side_encryption_configuration (
Union[IResolvable,Sequence[Union[IResolvable,ServerSideEncryptionRuleProperty,Dict[str,Any]]],None]) – Specifies the default server-side-encryption configuration.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins bucket_encryption_property = s3_mixins.CfnBucketPropsMixin.BucketEncryptionProperty( server_side_encryption_configuration=[s3_mixins.CfnBucketPropsMixin.ServerSideEncryptionRuleProperty( blocked_encryption_types=s3_mixins.CfnBucketPropsMixin.BlockedEncryptionTypesProperty( encryption_type=["encryptionType"] ), bucket_key_enabled=False, server_side_encryption_by_default=s3_mixins.CfnBucketPropsMixin.ServerSideEncryptionByDefaultProperty( kms_master_key_id="kmsMasterKeyId", sse_algorithm="sseAlgorithm" ) )] )
Attributes
- server_side_encryption_configuration
Specifies the default server-side-encryption configuration.
CorsConfigurationProperty
- class CfnBucketPropsMixin.CorsConfigurationProperty(*, cors_rules=None)
Bases:
objectDescribes the cross-origin access configuration for objects in an Amazon S3 bucket.
For more information, see Enabling Cross-Origin Resource Sharing in the Amazon S3 User Guide .
- Parameters:
cors_rules (
Union[IResolvable,Sequence[Union[IResolvable,CorsRuleProperty,Dict[str,Any]]],None]) – A set of origins and methods (cross-origin access that you want to allow). You can add up to 100 rules to the configuration.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins cors_configuration_property = s3_mixins.CfnBucketPropsMixin.CorsConfigurationProperty( cors_rules=[s3_mixins.CfnBucketPropsMixin.CorsRuleProperty( allowed_headers=["allowedHeaders"], allowed_methods=["allowedMethods"], allowed_origins=["allowedOrigins"], exposed_headers=["exposedHeaders"], id="id", max_age=123 )] )
Attributes
- cors_rules
A set of origins and methods (cross-origin access that you want to allow).
You can add up to 100 rules to the configuration.
CorsRuleProperty
- class CfnBucketPropsMixin.CorsRuleProperty(*, allowed_headers=None, allowed_methods=None, allowed_origins=None, exposed_headers=None, id=None, max_age=None)
Bases:
objectSpecifies a cross-origin access rule for an Amazon S3 bucket.
- Parameters:
allowed_headers (
Optional[Sequence[str]]) – Headers that are specified in theAccess-Control-Request-Headersheader. These headers are allowed in a preflight OPTIONS request. In response to any preflight OPTIONS request, Amazon S3 returns any requested headers that are allowed.allowed_methods (
Optional[Sequence[str]]) – An HTTP method that you allow the origin to run. Allowed values :GET|PUT|HEAD|POST|DELETEallowed_origins (
Optional[Sequence[str]]) – One or more origins you want customers to be able to access the bucket from.exposed_headers (
Optional[Sequence[str]]) – One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScriptXMLHttpRequestobject).id (
Optional[str]) – A unique identifier for this rule. The value must be no more than 255 characters.max_age (
Union[int,float,None]) – The time in seconds that your browser is to cache the preflight response for the specified resource.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-corsrule.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins cors_rule_property = s3_mixins.CfnBucketPropsMixin.CorsRuleProperty( allowed_headers=["allowedHeaders"], allowed_methods=["allowedMethods"], allowed_origins=["allowedOrigins"], exposed_headers=["exposedHeaders"], id="id", max_age=123 )
Attributes
- allowed_headers
Headers that are specified in the
Access-Control-Request-Headersheader.These headers are allowed in a preflight OPTIONS request. In response to any preflight OPTIONS request, Amazon S3 returns any requested headers that are allowed.
- allowed_methods
An HTTP method that you allow the origin to run.
Allowed values :
GET|PUT|HEAD|POST|DELETE
- allowed_origins
One or more origins you want customers to be able to access the bucket from.
- 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
XMLHttpRequestobject).
- id
A unique identifier for this rule.
The value must be no more than 255 characters.
- max_age
The time in seconds that your browser is to cache the preflight response for the specified resource.
DataExportProperty
- class CfnBucketPropsMixin.DataExportProperty(*, destination=None, output_schema_version=None)
Bases:
objectSpecifies how data related to the storage class analysis for an Amazon S3 bucket should be exported.
- Parameters:
destination (
Union[IResolvable,DestinationProperty,Dict[str,Any],None]) – The place to store the data for an analysis.output_schema_version (
Optional[str]) – The version of the output schema to use when exporting data. Must beV_1.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins data_export_property = s3_mixins.CfnBucketPropsMixin.DataExportProperty( destination=s3_mixins.CfnBucketPropsMixin.DestinationProperty( bucket_account_id="bucketAccountId", bucket_arn="bucketArn", format="format", prefix="prefix" ), output_schema_version="outputSchemaVersion" )
Attributes
- destination
The place to store the data for an analysis.
- output_schema_version
The version of the output schema to use when exporting data.
Must be
V_1.
DefaultRetentionProperty
- class CfnBucketPropsMixin.DefaultRetentionProperty(*, days=None, mode=None, years=None)
Bases:
objectThe container element for optionally specifying the default Object Lock retention settings for new objects placed in the specified bucket.
The
DefaultRetentionsettings require both a mode and a period.The
DefaultRetentionperiod can be eitherDaysorYearsbut you must select one. You cannot specifyDaysandYearsat 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 specifyModeand specify eitherDaysorYears.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 specifyModeand specify eitherDaysorYears.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 specifyModeand specify eitherDaysorYears.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins default_retention_property = s3_mixins.CfnBucketPropsMixin.DefaultRetentionProperty( days=123, mode="mode", years=123 )
Attributes
- days
The number of days that you want to specify for the default retention period.
If Object Lock is turned on, you must specify
Modeand specify eitherDaysorYears.
- 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
Modeand specify eitherDaysorYears.
- years
The number of years that you want to specify for the default retention period.
If Object Lock is turned on, you must specify
Modeand specify eitherDaysorYears.
DeleteMarkerReplicationProperty
- class CfnBucketPropsMixin.DeleteMarkerReplicationProperty(*, status=None)
Bases:
objectSpecifies whether Amazon S3 replicates delete markers.
If you specify a
Filterin your replication configuration, you must also include aDeleteMarkerReplicationelement. If yourFilterincludes aTagelement, theDeleteMarkerReplicationStatusmust be set to Disabled, because Amazon S3 does not support replicating delete markers for tag-based rules. For an example configuration, see Basic Rule Configuration .For more information about delete marker replication, see Basic Rule Configuration . .. epigraph:
If you are using an earlier version of the replication configuration, Amazon S3 handles replication of delete markers differently. For more information, see `Backward Compatibility <https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations>`_ .
- Parameters:
status (
Optional[str]) – Indicates whether to replicate delete markers.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins delete_marker_replication_property = s3_mixins.CfnBucketPropsMixin.DeleteMarkerReplicationProperty( status="status" )
Attributes
- status
Indicates whether to replicate delete markers.
DestinationProperty
- class CfnBucketPropsMixin.DestinationProperty(*, bucket_account_id=None, bucket_arn=None, format=None, prefix=None)
Bases:
objectSpecifies information about where to publish analysis or configuration results for an Amazon S3 bucket.
- Parameters:
bucket_account_id (
Optional[str]) – The account ID that owns the destination S3 bucket. If no account ID is provided, the owner is not validated before exporting data. .. epigraph:: Although this value is optional, we strongly recommend that you set it to help prevent problems if the destination bucket ownership changes.bucket_arn (
Optional[str]) – The Amazon Resource Name (ARN) of the bucket to which data is exported.format (
Optional[str]) – Specifies the file format used when exporting data to Amazon S3. Allowed values :CSV|ORC|Parquetprefix (
Optional[str]) – The prefix to use when exporting data. The prefix is prepended to all results.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins destination_property = s3_mixins.CfnBucketPropsMixin.DestinationProperty( bucket_account_id="bucketAccountId", bucket_arn="bucketArn", format="format", prefix="prefix" )
Attributes
- bucket_account_id
The account ID that owns the destination S3 bucket.
If no account ID is provided, the owner is not validated before exporting data. .. epigraph:
Although this value is optional, we strongly recommend that you set it to help prevent problems if the destination bucket ownership changes.
- bucket_arn
The Amazon Resource Name (ARN) of the bucket to which data is exported.
- format
Specifies the file format used when exporting data to Amazon S3.
Allowed values :
CSV|ORC|Parquet
- prefix
The prefix to use when exporting data.
The prefix is prepended to all results.
EncryptionConfigurationProperty
- class CfnBucketPropsMixin.EncryptionConfigurationProperty(*, replica_kms_key_id=None)
Bases:
objectSpecifies encryption-related information for an Amazon S3 bucket that is a destination for replicated objects.
If you’re specifying a customer managed KMS key, we recommend using a fully qualified KMS key ARN. If you use a KMS key alias instead, then AWS resolves the key within the requester’s account. This behavior can result in data that’s encrypted with a KMS key that belongs to the requester, and not the bucket owner.
- Parameters:
replica_kms_key_id (
Optional[str]) – Specifies the ID (Key ARN or Alias ARN) of the customer managed AWS KMS key stored in AWS Key Management Service (KMS) for the destination bucket. Amazon S3 uses this key to encrypt replica objects. Amazon S3 only supports symmetric encryption KMS keys. For more information, see Asymmetric keys in AWS KMS in the AWS Key Management Service Developer Guide .- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins encryption_configuration_property = s3_mixins.CfnBucketPropsMixin.EncryptionConfigurationProperty( replica_kms_key_id="replicaKmsKeyId" )
Attributes
- replica_kms_key_id
Specifies the ID (Key ARN or Alias ARN) of the customer managed AWS KMS key stored in AWS Key Management Service (KMS) for the destination bucket.
Amazon S3 uses this key to encrypt replica objects. Amazon S3 only supports symmetric encryption KMS keys. For more information, see Asymmetric keys in AWS KMS in the AWS Key Management Service Developer Guide .
EventBridgeConfigurationProperty
- class CfnBucketPropsMixin.EventBridgeConfigurationProperty(*, event_bridge_enabled=None)
Bases:
objectAmazon S3 can send events to Amazon EventBridge whenever certain events happen in your bucket, see Using EventBridge in the Amazon S3 User Guide .
Unlike other destinations, delivery of events to EventBridge can be either enabled or disabled for a bucket. If enabled, all events will be sent to EventBridge and you can use EventBridge rules to route events to additional targets. For more information, see What Is Amazon EventBridge in the Amazon EventBridge User Guide
- Parameters:
event_bridge_enabled (
Union[bool,IResolvable,None]) – Enables delivery of events to Amazon EventBridge.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins event_bridge_configuration_property = s3_mixins.CfnBucketPropsMixin.EventBridgeConfigurationProperty( event_bridge_enabled=False )
Attributes
- event_bridge_enabled
Enables delivery of events to Amazon EventBridge.
FilterRuleProperty
- class CfnBucketPropsMixin.FilterRuleProperty(*, name=None, value=None)
Bases:
objectSpecifies the Amazon S3 object key name to filter on.
An object key name is the name assigned to an object in your Amazon S3 bucket. You specify whether to filter on the suffix or prefix of the object key name. A prefix is a specific string of characters at the beginning of an object key name, which you can use to organize objects. For example, you can start the key names of related objects with a prefix, such as
2023-orengineering/. Then, you can useFilterRuleto find objects in a bucket with key names that have the same prefix. A suffix is similar to a prefix, but it is at the end of the object key name instead of at the beginning.- Parameters:
name (
Optional[str]) – The object key name prefix or suffix identifying one or more objects to which the filtering rule applies. The maximum length is 1,024 characters. Overlapping prefixes and suffixes are not supported. For more information, see Configuring Event Notifications in the Amazon S3 User Guide .value (
Optional[str]) – The value that the filter searches for in object key names.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins filter_rule_property = s3_mixins.CfnBucketPropsMixin.FilterRuleProperty( name="name", value="value" )
Attributes
- name
The object key name prefix or suffix identifying one or more objects to which the filtering rule applies.
The maximum length is 1,024 characters. Overlapping prefixes and suffixes are not supported. For more information, see Configuring Event Notifications in the Amazon S3 User Guide .
- value
The value that the filter searches for in object key names.
IntelligentTieringConfigurationProperty
- class CfnBucketPropsMixin.IntelligentTieringConfigurationProperty(*, id=None, prefix=None, status=None, tag_filters=None, tierings=None)
Bases:
objectSpecifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket.
For information about the S3 Intelligent-Tiering storage class, see Storage class for automatically optimizing frequently and infrequently accessed objects .
- Parameters:
id (
Optional[str]) – The ID used to identify the S3 Intelligent-Tiering configuration.prefix (
Optional[str]) – An object key name prefix that identifies the subset of objects to which the rule applies.status (
Optional[str]) – Specifies the status of the configuration.tag_filters (
Union[IResolvable,Sequence[Union[IResolvable,TagFilterProperty,Dict[str,Any]]],None]) – A container for a key-value pair.tierings (
Union[IResolvable,Sequence[Union[IResolvable,TieringProperty,Dict[str,Any]]],None]) – Specifies a list of S3 Intelligent-Tiering storage class tiers in the configuration. At least one tier must be defined in the list. At most, you can specify two tiers in the list, one for each available AccessTier:ARCHIVE_ACCESSandDEEP_ARCHIVE_ACCESS. .. epigraph:: You only need Intelligent Tiering Configuration enabled on a bucket if you want to automatically move objects stored in the Intelligent-Tiering storage class to Archive Access or Deep Archive Access tiers.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins intelligent_tiering_configuration_property = s3_mixins.CfnBucketPropsMixin.IntelligentTieringConfigurationProperty( id="id", prefix="prefix", status="status", tag_filters=[s3_mixins.CfnBucketPropsMixin.TagFilterProperty( key="key", value="value" )], tierings=[s3_mixins.CfnBucketPropsMixin.TieringProperty( access_tier="accessTier", days=123 )] )
Attributes
- id
The ID used to identify the S3 Intelligent-Tiering configuration.
- prefix
An object key name prefix that identifies the subset of objects to which the rule applies.
- status
Specifies the status of the configuration.
- tag_filters
A container for a key-value pair.
- 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_ACCESSandDEEP_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.
InventoryConfigurationProperty
- class CfnBucketPropsMixin.InventoryConfigurationProperty(*, destination=None, enabled=None, id=None, included_object_versions=None, optional_fields=None, prefix=None, schedule_frequency=None)
Bases:
objectSpecifies the S3 Inventory configuration for an Amazon S3 bucket.
For more information, see GET Bucket inventory in the Amazon S3 API Reference .
- Parameters:
destination (
Union[IResolvable,DestinationProperty,Dict[str,Any],None]) – Contains information about where to publish the inventory results.enabled (
Union[bool,IResolvable,None]) – Specifies whether the inventory is enabled or disabled. If set toTrue, an inventory list is generated. If set toFalse, no inventory list is generated.id (
Optional[str]) – The ID used to identify the inventory configuration.included_object_versions (
Optional[str]) – Object versions to include in the inventory list. If set toAll, the list includes all the object versions, which adds the version-related fieldsVersionId,IsLatest, andDeleteMarkerto the list. If set toCurrent, the list does not contain these version-related fields.optional_fields (
Optional[Sequence[str]]) – Contains the optional fields that are included in the inventory results.prefix (
Optional[str]) – Specifies the inventory filter prefix.schedule_frequency (
Optional[str]) – Specifies the schedule for generating inventory results.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins inventory_configuration_property = s3_mixins.CfnBucketPropsMixin.InventoryConfigurationProperty( destination=s3_mixins.CfnBucketPropsMixin.DestinationProperty( bucket_account_id="bucketAccountId", bucket_arn="bucketArn", format="format", prefix="prefix" ), enabled=False, id="id", included_object_versions="includedObjectVersions", optional_fields=["optionalFields"], prefix="prefix", schedule_frequency="scheduleFrequency" )
Attributes
- destination
Contains information about where to publish the inventory results.
- enabled
Specifies whether the inventory is enabled or disabled.
If set to
True, an inventory list is generated. If set toFalse, no inventory list is generated.
- id
The ID used to identify the inventory configuration.
- 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 fieldsVersionId,IsLatest, andDeleteMarkerto the list. If set toCurrent, the list does not contain these version-related fields.
- optional_fields
Contains the optional fields that are included in the inventory results.
- prefix
Specifies the inventory filter prefix.
- schedule_frequency
Specifies the schedule for generating inventory results.
InventoryTableConfigurationProperty
- class CfnBucketPropsMixin.InventoryTableConfigurationProperty(*, configuration_state=None, encryption_configuration=None, table_arn=None, table_name=None)
Bases:
objectThe inventory table configuration for an S3 Metadata configuration.
- Parameters:
configuration_state (
Optional[str]) – The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.encryption_configuration (
Union[IResolvable,MetadataTableEncryptionConfigurationProperty,Dict[str,Any],None]) – The encryption configuration for the inventory table.table_arn (
Optional[str]) – The Amazon Resource Name (ARN) for the inventory table.table_name (
Optional[str]) – The name of the inventory table.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins inventory_table_configuration_property = s3_mixins.CfnBucketPropsMixin.InventoryTableConfigurationProperty( configuration_state="configurationState", encryption_configuration=s3_mixins.CfnBucketPropsMixin.MetadataTableEncryptionConfigurationProperty( kms_key_arn="kmsKeyArn", sse_algorithm="sseAlgorithm" ), table_arn="tableArn", table_name="tableName" )
Attributes
- configuration_state
The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.
- encryption_configuration
The encryption configuration for the inventory table.
- table_arn
The Amazon Resource Name (ARN) for the inventory table.
- table_name
The name of the inventory table.
JournalTableConfigurationProperty
- class CfnBucketPropsMixin.JournalTableConfigurationProperty(*, encryption_configuration=None, record_expiration=None, table_arn=None, table_name=None)
Bases:
objectThe journal table configuration for an S3 Metadata configuration.
- Parameters:
encryption_configuration (
Union[IResolvable,MetadataTableEncryptionConfigurationProperty,Dict[str,Any],None]) – The encryption configuration for the journal table.record_expiration (
Union[IResolvable,RecordExpirationProperty,Dict[str,Any],None]) – The journal table record expiration settings for the journal table.table_arn (
Optional[str]) – The Amazon Resource Name (ARN) for the journal table.table_name (
Optional[str]) – The name of the journal table.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins journal_table_configuration_property = s3_mixins.CfnBucketPropsMixin.JournalTableConfigurationProperty( encryption_configuration=s3_mixins.CfnBucketPropsMixin.MetadataTableEncryptionConfigurationProperty( kms_key_arn="kmsKeyArn", sse_algorithm="sseAlgorithm" ), record_expiration=s3_mixins.CfnBucketPropsMixin.RecordExpirationProperty( days=123, expiration="expiration" ), table_arn="tableArn", table_name="tableName" )
Attributes
- encryption_configuration
The encryption configuration for the journal table.
- record_expiration
The journal table record expiration settings for the journal table.
- table_arn
The Amazon Resource Name (ARN) for the journal table.
- table_name
The name of the journal table.
LambdaConfigurationProperty
- class CfnBucketPropsMixin.LambdaConfigurationProperty(*, event=None, filter=None, function=None)
Bases:
objectDescribes the AWS Lambda functions to invoke and the events for which to invoke them.
- Parameters:
event (
Optional[str]) – The Amazon S3 bucket event for which to invoke the AWS Lambda function. For more information, see Supported Event Types in the Amazon S3 User Guide .filter (
Union[IResolvable,NotificationFilterProperty,Dict[str,Any],None]) – The filtering rules that determine which objects invoke the AWS Lambda function. For example, you can create a filter so that only image files with a.jpgextension invoke the function when they are added to the Amazon S3 bucket.function (
Optional[str]) – The Amazon Resource Name (ARN) of the AWS Lambda function that Amazon S3 invokes when the specified event type occurs.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins lambda_configuration_property = s3_mixins.CfnBucketPropsMixin.LambdaConfigurationProperty( event="event", filter=s3_mixins.CfnBucketPropsMixin.NotificationFilterProperty( s3_key=s3_mixins.CfnBucketPropsMixin.S3KeyFilterProperty( rules=[s3_mixins.CfnBucketPropsMixin.FilterRuleProperty( name="name", value="value" )] ) ), function="function" )
Attributes
- event
The Amazon S3 bucket event for which to invoke the AWS Lambda function.
For more information, see Supported Event Types in the Amazon S3 User Guide .
- 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
.jpgextension invoke the function when they are added to the Amazon S3 bucket.
- function
The Amazon Resource Name (ARN) of the AWS Lambda function that Amazon S3 invokes when the specified event type occurs.
LifecycleConfigurationProperty
- class CfnBucketPropsMixin.LifecycleConfigurationProperty(*, rules=None, transition_default_minimum_object_size=None)
Bases:
objectSpecifies the lifecycle configuration for objects in an Amazon S3 bucket.
For more information, see Object Lifecycle Management in the Amazon S3 User Guide .
- Parameters:
rules (
Union[IResolvable,Sequence[Union[IResolvable,RuleProperty,Dict[str,Any]]],None]) – A lifecycle rule for individual objects in an Amazon S3 bucket.transition_default_minimum_object_size (
Optional[str]) – Indicates which default minimum object size behavior is applied to the lifecycle configuration. .. epigraph:: This parameter applies to general purpose buckets only. It isn’t supported for directory bucket lifecycle configurations. -all_storage_classes_128K- Objects smaller than 128 KB will not transition to any storage class by default. -varies_by_storage_class- Objects smaller than 128 KB will transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By default, all other storage classes will prevent transitions smaller than 128 KB. To customize the minimum object size for any transition you can add a filter that specifies a customObjectSizeGreaterThanorObjectSizeLessThanin the body of your transition rule. Custom filters always take precedence over the default transition behavior.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins lifecycle_configuration_property = s3_mixins.CfnBucketPropsMixin.LifecycleConfigurationProperty( rules=[s3_mixins.CfnBucketPropsMixin.RuleProperty( abort_incomplete_multipart_upload=s3_mixins.CfnBucketPropsMixin.AbortIncompleteMultipartUploadProperty( days_after_initiation=123 ), expiration_date=Date(), expiration_in_days=123, expired_object_delete_marker=False, id="id", noncurrent_version_expiration=s3_mixins.CfnBucketPropsMixin.NoncurrentVersionExpirationProperty( newer_noncurrent_versions=123, noncurrent_days=123 ), noncurrent_version_expiration_in_days=123, noncurrent_version_transition=s3_mixins.CfnBucketPropsMixin.NoncurrentVersionTransitionProperty( newer_noncurrent_versions=123, storage_class="storageClass", transition_in_days=123 ), noncurrent_version_transitions=[s3_mixins.CfnBucketPropsMixin.NoncurrentVersionTransitionProperty( newer_noncurrent_versions=123, storage_class="storageClass", transition_in_days=123 )], object_size_greater_than=123, object_size_less_than=123, prefix="prefix", status="status", tag_filters=[s3_mixins.CfnBucketPropsMixin.TagFilterProperty( key="key", value="value" )], transition=s3_mixins.CfnBucketPropsMixin.TransitionProperty( storage_class="storageClass", transition_date=Date(), transition_in_days=123 ), transitions=[s3_mixins.CfnBucketPropsMixin.TransitionProperty( storage_class="storageClass", transition_date=Date(), transition_in_days=123 )] )], transition_default_minimum_object_size="transitionDefaultMinimumObjectSize" )
Attributes
- rules
A lifecycle rule for individual objects in an Amazon S3 bucket.
- transition_default_minimum_object_size
Indicates which default minimum object size behavior is applied to the lifecycle configuration.
This parameter applies to general purpose buckets only. It isn’t supported for directory bucket lifecycle configurations.
all_storage_classes_128K- Objects smaller than 128 KB will not transition to any storage class by default.varies_by_storage_class- Objects smaller than 128 KB will transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By default, all other storage classes will prevent transitions smaller than 128 KB.
To customize the minimum object size for any transition you can add a filter that specifies a custom
ObjectSizeGreaterThanorObjectSizeLessThanin the body of your transition rule. Custom filters always take precedence over the default transition behavior.
LoggingConfigurationProperty
- class CfnBucketPropsMixin.LoggingConfigurationProperty(*, destination_bucket_name=None, log_file_prefix=None, target_object_key_format=None)
Bases:
objectDescribes 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 theLoggingConfigurationproperty is defined.log_file_prefix (
Optional[str]) – A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a single bucket, you can use a prefix to distinguish which log files came from which bucket.target_object_key_format (
Union[IResolvable,TargetObjectKeyFormatProperty,Dict[str,Any],None]) – Amazon S3 key format for log objects. Only one format, either PartitionedPrefix or SimplePrefix, is allowed.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins # simple_prefix: Any logging_configuration_property = s3_mixins.CfnBucketPropsMixin.LoggingConfigurationProperty( destination_bucket_name="destinationBucketName", log_file_prefix="logFilePrefix", target_object_key_format=s3_mixins.CfnBucketPropsMixin.TargetObjectKeyFormatProperty( partitioned_prefix=s3_mixins.CfnBucketPropsMixin.PartitionedPrefixProperty( partition_date_source="partitionDateSource" ), simple_prefix=simple_prefix ) )
Attributes
- destination_bucket_name
The name of the bucket where Amazon S3 should store server access log files.
You can store log files in any bucket that you own. By default, logs are stored in the bucket where the
LoggingConfigurationproperty is defined.
- 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.
- target_object_key_format
Amazon S3 key format for log objects.
Only one format, either PartitionedPrefix or SimplePrefix, is allowed.
MetadataConfigurationProperty
- class CfnBucketPropsMixin.MetadataConfigurationProperty(*, destination=None, inventory_table_configuration=None, journal_table_configuration=None)
Bases:
objectCreates a V2 Amazon S3 Metadata configuration of a general purpose bucket.
For more information, see Accelerating data discovery with S3 Metadata in the Amazon S3 User Guide .
- Parameters:
destination (
Union[IResolvable,MetadataDestinationProperty,Dict[str,Any],None]) – The destination information for the S3 Metadata configuration.inventory_table_configuration (
Union[IResolvable,InventoryTableConfigurationProperty,Dict[str,Any],None]) – The inventory table configuration for a metadata configuration.journal_table_configuration (
Union[IResolvable,JournalTableConfigurationProperty,Dict[str,Any],None]) – The journal table configuration for a metadata configuration.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins metadata_configuration_property = s3_mixins.CfnBucketPropsMixin.MetadataConfigurationProperty( destination=s3_mixins.CfnBucketPropsMixin.MetadataDestinationProperty( table_bucket_arn="tableBucketArn", table_bucket_type="tableBucketType", table_namespace="tableNamespace" ), inventory_table_configuration=s3_mixins.CfnBucketPropsMixin.InventoryTableConfigurationProperty( configuration_state="configurationState", encryption_configuration=s3_mixins.CfnBucketPropsMixin.MetadataTableEncryptionConfigurationProperty( kms_key_arn="kmsKeyArn", sse_algorithm="sseAlgorithm" ), table_arn="tableArn", table_name="tableName" ), journal_table_configuration=s3_mixins.CfnBucketPropsMixin.JournalTableConfigurationProperty( encryption_configuration=s3_mixins.CfnBucketPropsMixin.MetadataTableEncryptionConfigurationProperty( kms_key_arn="kmsKeyArn", sse_algorithm="sseAlgorithm" ), record_expiration=s3_mixins.CfnBucketPropsMixin.RecordExpirationProperty( days=123, expiration="expiration" ), table_arn="tableArn", table_name="tableName" ) )
Attributes
- destination
The destination information for the S3 Metadata configuration.
- inventory_table_configuration
The inventory table configuration for a metadata configuration.
- journal_table_configuration
The journal table configuration for a metadata configuration.
MetadataDestinationProperty
- class CfnBucketPropsMixin.MetadataDestinationProperty(*, table_bucket_arn=None, table_bucket_type=None, table_namespace=None)
Bases:
objectThe destination information for the S3 Metadata configuration.
- Parameters:
table_bucket_arn (
Optional[str]) – The Amazon Resource Name (ARN) of the table bucket where the metadata configuration is stored.table_bucket_type (
Optional[str]) – The type of the table bucket where the metadata configuration is stored. Theawsvalue indicates an AWS managed table bucket, and thecustomervalue indicates a customer-managed table bucket. V2 metadata configurations are stored in AWS managed table buckets, and V1 metadata configurations are stored in customer-managed table buckets.table_namespace (
Optional[str]) – The namespace in the table bucket where the metadata tables for a metadata configuration are stored.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins metadata_destination_property = s3_mixins.CfnBucketPropsMixin.MetadataDestinationProperty( table_bucket_arn="tableBucketArn", table_bucket_type="tableBucketType", table_namespace="tableNamespace" )
Attributes
- table_bucket_arn
The Amazon Resource Name (ARN) of the table bucket where the metadata configuration is stored.
- table_bucket_type
The type of the table bucket where the metadata configuration is stored.
The
awsvalue indicates an AWS managed table bucket, and thecustomervalue indicates a customer-managed table bucket. V2 metadata configurations are stored in AWS managed table buckets, and V1 metadata configurations are stored in customer-managed table buckets.
- table_namespace
The namespace in the table bucket where the metadata tables for a metadata configuration are stored.
MetadataTableConfigurationProperty
- class CfnBucketPropsMixin.MetadataTableConfigurationProperty(*, s3_tables_destination=None)
Bases:
objectWe recommend that you create your S3 Metadata configurations by using the V2 MetadataConfiguration resource type. We no longer recommend using the V1
MetadataTableConfigurationresource type. > > If you created your S3 Metadata configuration before July 15, 2025, we recommend that you delete and re-create your configuration by using the MetadataConfiguration resource type so that you can expire journal table records and create a live inventory table.Creates a V1 S3 Metadata configuration for a general purpose bucket. For more information, see Accelerating data discovery with S3 Metadata in the Amazon S3 User Guide .
Attributes
- s3_tables_destination
The destination information for the metadata table configuration.
The destination table bucket must be in the same Region and AWS account as the general purpose bucket. The specified metadata table name must be unique within the
aws_s3_metadatanamespace in the destination table bucket.
MetadataTableEncryptionConfigurationProperty
- class CfnBucketPropsMixin.MetadataTableEncryptionConfigurationProperty(*, kms_key_arn=None, sse_algorithm=None)
Bases:
objectThe encryption settings for an S3 Metadata journal table or inventory table configuration.
- Parameters:
kms_key_arn (
Optional[str]) – If server-side encryption with AWS Key Management Service ( AWS ) keys (SSE-KMS) is specified, you must also specify the KMS key Amazon Resource Name (ARN). You must specify a customer-managed KMS key that’s located in the same Region as the general purpose bucket that corresponds to the metadata table configuration.sse_algorithm (
Optional[str]) – The encryption type specified for a metadata table. To specify server-side encryption with AWS Key Management Service ( AWS ) keys (SSE-KMS), use theaws:kmsvalue. To specify server-side encryption with Amazon S3 managed keys (SSE-S3), use theAES256value.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins metadata_table_encryption_configuration_property = s3_mixins.CfnBucketPropsMixin.MetadataTableEncryptionConfigurationProperty( kms_key_arn="kmsKeyArn", sse_algorithm="sseAlgorithm" )
Attributes
- kms_key_arn
If server-side encryption with AWS Key Management Service ( AWS ) keys (SSE-KMS) is specified, you must also specify the KMS key Amazon Resource Name (ARN).
You must specify a customer-managed KMS key that’s located in the same Region as the general purpose bucket that corresponds to the metadata table configuration.
- sse_algorithm
The encryption type specified for a metadata table.
To specify server-side encryption with AWS Key Management Service ( AWS ) keys (SSE-KMS), use the
aws:kmsvalue. To specify server-side encryption with Amazon S3 managed keys (SSE-S3), use theAES256value.
MetricsConfigurationProperty
- class CfnBucketPropsMixin.MetricsConfigurationProperty(*, access_point_arn=None, id=None, prefix=None, tag_filters=None)
Bases:
objectSpecifies a metrics configuration for the CloudWatch request metrics (specified by the metrics configuration ID) from an Amazon S3 bucket.
If you’re updating an existing metrics configuration, note that this is a full replacement of the existing metrics configuration. If you don’t include the elements you want to keep, they are erased. For examples, see AWS::S3::Bucket . For more information, see PUT Bucket metrics in the Amazon S3 API Reference .
- Parameters:
access_point_arn (
Optional[str]) – The access point that was used while performing operations on the object. The metrics configuration only includes objects that meet the filter’s criteria.id (
Optional[str]) – The ID used to identify the metrics configuration. This can be any value you choose that helps you identify your metrics configuration.prefix (
Optional[str]) – The prefix that an object must have to be included in the metrics results.tag_filters (
Union[IResolvable,Sequence[Union[IResolvable,TagFilterProperty,Dict[str,Any]]],None]) – Specifies a list of tag filters to use as a metrics configuration filter. The metrics configuration includes only objects that meet the filter’s criteria.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins metrics_configuration_property = s3_mixins.CfnBucketPropsMixin.MetricsConfigurationProperty( access_point_arn="accessPointArn", id="id", prefix="prefix", tag_filters=[s3_mixins.CfnBucketPropsMixin.TagFilterProperty( key="key", value="value" )] )
Attributes
- access_point_arn
The access point that was used while performing operations on the object.
The metrics configuration only includes objects that meet the filter’s criteria.
- id
The ID used to identify the metrics configuration.
This can be any value you choose that helps you identify your metrics configuration.
- prefix
The prefix that an object must have to be included in the metrics results.
- 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.
MetricsProperty
- class CfnBucketPropsMixin.MetricsProperty(*, event_threshold=None, status=None)
Bases:
objectA container specifying replication metrics-related settings enabling replication metrics and events.
- Parameters:
event_threshold (
Union[IResolvable,ReplicationTimeValueProperty,Dict[str,Any],None]) – A container specifying the time threshold for emitting thes3:Replication:OperationMissedThresholdevent.status (
Optional[str]) – Specifies whether the replication metrics are enabled.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metrics.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins metrics_property = s3_mixins.CfnBucketPropsMixin.MetricsProperty( event_threshold=s3_mixins.CfnBucketPropsMixin.ReplicationTimeValueProperty( minutes=123 ), status="status" )
Attributes
- event_threshold
A container specifying the time threshold for emitting the
s3:Replication:OperationMissedThresholdevent.
- status
Specifies whether the replication metrics are enabled.
NoncurrentVersionExpirationProperty
- class CfnBucketPropsMixin.NoncurrentVersionExpirationProperty(*, newer_noncurrent_versions=None, noncurrent_days=None)
Bases:
objectSpecifies when noncurrent object versions expire.
Upon expiration, Amazon S3 permanently deletes the noncurrent object versions. You set this lifecycle configuration action on a bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent object versions at a specific period in the object’s lifetime. For more information about setting a lifecycle rule configuration, see AWS::S3::Bucket Rule .
- Parameters:
newer_noncurrent_versions (
Union[int,float,None]) – Specifies how many noncurrent versions Amazon S3 will retain. If there are this many more recent noncurrent versions, Amazon S3 will take the associated action. For more information about noncurrent versions, see Lifecycle configuration elements in the Amazon S3 User Guide .noncurrent_days (
Union[int,float,None]) – Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. For information about the noncurrent days calculations, see How Amazon S3 Calculates When an Object Became Noncurrent in the Amazon S3 User Guide .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins noncurrent_version_expiration_property = s3_mixins.CfnBucketPropsMixin.NoncurrentVersionExpirationProperty( newer_noncurrent_versions=123, noncurrent_days=123 )
Attributes
- newer_noncurrent_versions
Specifies how many noncurrent versions Amazon S3 will retain.
If there are this many more recent noncurrent versions, Amazon S3 will take the associated action. For more information about noncurrent versions, see Lifecycle configuration elements in the Amazon S3 User Guide .
- 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 .
NoncurrentVersionTransitionProperty
- class CfnBucketPropsMixin.NoncurrentVersionTransitionProperty(*, newer_noncurrent_versions=None, storage_class=None, transition_in_days=None)
Bases:
objectContainer for the transition rule that describes when noncurrent objects transition to the
STANDARD_IA,ONEZONE_IA,INTELLIGENT_TIERING,GLACIER_IR,GLACIER, orDEEP_ARCHIVEstorage 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, orDEEP_ARCHIVEstorage class at a specific period in the object’s lifetime. If you specify this property, don’t specify theNoncurrentVersionTransitionsproperty.- Parameters:
newer_noncurrent_versions (
Union[int,float,None]) –Specifies how many noncurrent versions Amazon S3 will retain. If there are this many more recent noncurrent versions, Amazon S3 will take the associated action. For more information about noncurrent versions, see Lifecycle configuration elements in the Amazon S3 User Guide .
storage_class (
Optional[str]) – The class of storage used to store the object.transition_in_days (
Union[int,float,None]) – Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. For information about the noncurrent days calculations, see How Amazon S3 Calculates How Long an Object Has Been Noncurrent in the Amazon S3 User Guide .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins noncurrent_version_transition_property = s3_mixins.CfnBucketPropsMixin.NoncurrentVersionTransitionProperty( newer_noncurrent_versions=123, storage_class="storageClass", transition_in_days=123 )
Attributes
- newer_noncurrent_versions
Specifies how many noncurrent versions Amazon S3 will retain.
If there are this many more recent noncurrent versions, Amazon S3 will take the associated action. For more information about noncurrent versions, see Lifecycle configuration elements in the Amazon S3 User Guide .
- storage_class
The class of storage used to store the object.
- 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 .
NotificationConfigurationProperty
- class CfnBucketPropsMixin.NotificationConfigurationProperty(*, event_bridge_configuration=None, lambda_configurations=None, queue_configurations=None, topic_configurations=None)
Bases:
objectDescribes 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::Permissionresource 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:
event_bridge_configuration (
Union[IResolvable,EventBridgeConfigurationProperty,Dict[str,Any],None]) – Enables delivery of events to Amazon EventBridge.lambda_configurations (
Union[IResolvable,Sequence[Union[IResolvable,LambdaConfigurationProperty,Dict[str,Any]]],None]) – Describes the AWS Lambda functions to invoke and the events for which to invoke them.queue_configurations (
Union[IResolvable,Sequence[Union[IResolvable,QueueConfigurationProperty,Dict[str,Any]]],None]) – The Amazon Simple Queue Service queues to publish messages to and the events for which to publish messages.topic_configurations (
Union[IResolvable,Sequence[Union[IResolvable,TopicConfigurationProperty,Dict[str,Any]]],None]) – The topic to which notifications are sent and the events for which notifications are generated.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins notification_configuration_property = s3_mixins.CfnBucketPropsMixin.NotificationConfigurationProperty( event_bridge_configuration=s3_mixins.CfnBucketPropsMixin.EventBridgeConfigurationProperty( event_bridge_enabled=False ), lambda_configurations=[s3_mixins.CfnBucketPropsMixin.LambdaConfigurationProperty( event="event", filter=s3_mixins.CfnBucketPropsMixin.NotificationFilterProperty( s3_key=s3_mixins.CfnBucketPropsMixin.S3KeyFilterProperty( rules=[s3_mixins.CfnBucketPropsMixin.FilterRuleProperty( name="name", value="value" )] ) ), function="function" )], queue_configurations=[s3_mixins.CfnBucketPropsMixin.QueueConfigurationProperty( event="event", filter=s3_mixins.CfnBucketPropsMixin.NotificationFilterProperty( s3_key=s3_mixins.CfnBucketPropsMixin.S3KeyFilterProperty( rules=[s3_mixins.CfnBucketPropsMixin.FilterRuleProperty( name="name", value="value" )] ) ), queue="queue" )], topic_configurations=[s3_mixins.CfnBucketPropsMixin.TopicConfigurationProperty( event="event", filter=s3_mixins.CfnBucketPropsMixin.NotificationFilterProperty( s3_key=s3_mixins.CfnBucketPropsMixin.S3KeyFilterProperty( rules=[s3_mixins.CfnBucketPropsMixin.FilterRuleProperty( name="name", value="value" )] ) ), topic="topic" )] )
Attributes
- event_bridge_configuration
Enables delivery of events to Amazon EventBridge.
- lambda_configurations
Describes the AWS Lambda functions to invoke and the events for which to invoke them.
- queue_configurations
The Amazon Simple Queue Service queues to publish messages to and the events for which to publish messages.
- topic_configurations
The topic to which notifications are sent and the events for which notifications are generated.
NotificationFilterProperty
- class CfnBucketPropsMixin.NotificationFilterProperty(*, s3_key=None)
Bases:
objectSpecifies object key name filtering rules.
For information about key name filtering, see Configuring event notifications using object key name filtering in the Amazon S3 User Guide .
- Parameters:
s3_key (
Union[IResolvable,S3KeyFilterProperty,Dict[str,Any],None]) – A container for object key name prefix and suffix filtering rules.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins notification_filter_property = s3_mixins.CfnBucketPropsMixin.NotificationFilterProperty( s3_key=s3_mixins.CfnBucketPropsMixin.S3KeyFilterProperty( rules=[s3_mixins.CfnBucketPropsMixin.FilterRuleProperty( name="name", value="value" )] ) )
Attributes
- s3_key
A container for object key name prefix and suffix filtering rules.
ObjectLockConfigurationProperty
- class CfnBucketPropsMixin.ObjectLockConfigurationProperty(*, object_lock_enabled=None, rule=None)
Bases:
objectPlaces 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. EnableObjectLockEnabledwhen you applyObjectLockConfigurationto a bucket.rule (
Union[IResolvable,ObjectLockRuleProperty,Dict[str,Any],None]) – Specifies the Object Lock rule for the specified object. Enable this rule when you applyObjectLockConfigurationto a bucket. If Object Lock is turned on, bucket settings require bothModeand a period of eitherDaysorYears. You cannot specifyDaysandYearsat the same time. For more information, see ObjectLockRule and DefaultRetention .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins object_lock_configuration_property = s3_mixins.CfnBucketPropsMixin.ObjectLockConfigurationProperty( object_lock_enabled="objectLockEnabled", rule=s3_mixins.CfnBucketPropsMixin.ObjectLockRuleProperty( default_retention=s3_mixins.CfnBucketPropsMixin.DefaultRetentionProperty( days=123, mode="mode", years=123 ) ) )
Attributes
- object_lock_enabled
Indicates whether this bucket has an Object Lock configuration enabled.
Enable
ObjectLockEnabledwhen you applyObjectLockConfigurationto a bucket.
- rule
Specifies the Object Lock rule for the specified object.
Enable this rule when you apply
ObjectLockConfigurationto a bucket. If Object Lock is turned on, bucket settings require bothModeand a period of eitherDaysorYears. You cannot specifyDaysandYearsat the same time. For more information, see ObjectLockRule and DefaultRetention .
ObjectLockRuleProperty
- class CfnBucketPropsMixin.ObjectLockRuleProperty(*, default_retention=None)
Bases:
objectSpecifies the Object Lock rule for the specified object.
Enable the this rule when you apply
ObjectLockConfigurationto 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
Modeand a period of eitherDaysorYears. You cannot specifyDaysandYearsat the same time. For more information about allowable values for mode and period, see DefaultRetention .- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins object_lock_rule_property = s3_mixins.CfnBucketPropsMixin.ObjectLockRuleProperty( default_retention=s3_mixins.CfnBucketPropsMixin.DefaultRetentionProperty( days=123, mode="mode", years=123 ) )
Attributes
- default_retention
The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket.
If Object Lock is turned on, bucket settings require both
Modeand a period of eitherDaysorYears. You cannot specifyDaysandYearsat the same time. For more information about allowable values for mode and period, see DefaultRetention .
OwnershipControlsProperty
- class CfnBucketPropsMixin.OwnershipControlsProperty(*, rules=None)
Bases:
objectSpecifies the container element for Object Ownership rules.
S3 Object Ownership is an Amazon S3 bucket-level setting that you can use to disable access control lists (ACLs) and take ownership of every object in your bucket, simplifying access management for data stored in Amazon S3. For more information, see Controlling ownership of objects and disabling ACLs in the Amazon S3 User Guide .
- Parameters:
rules (
Union[IResolvable,Sequence[Union[IResolvable,OwnershipControlsRuleProperty,Dict[str,Any]]],None]) – Specifies the container element for Object Ownership rules.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins ownership_controls_property = s3_mixins.CfnBucketPropsMixin.OwnershipControlsProperty( rules=[s3_mixins.CfnBucketPropsMixin.OwnershipControlsRuleProperty( object_ownership="objectOwnership" )] )
Attributes
- rules
Specifies the container element for Object Ownership rules.
OwnershipControlsRuleProperty
- class CfnBucketPropsMixin.OwnershipControlsRuleProperty(*, object_ownership=None)
Bases:
objectSpecifies an Object Ownership rule.
S3 Object Ownership is an Amazon S3 bucket-level setting that you can use to disable access control lists (ACLs) and take ownership of every object in your bucket, simplifying access management for data stored in Amazon S3. For more information, see Controlling ownership of objects and disabling ACLs in the Amazon S3 User Guide .
- Parameters:
object_ownership (
Optional[str]) – Specifies an object ownership rule.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins ownership_controls_rule_property = s3_mixins.CfnBucketPropsMixin.OwnershipControlsRuleProperty( object_ownership="objectOwnership" )
Attributes
- object_ownership
Specifies an object ownership rule.
PartitionedPrefixProperty
- class CfnBucketPropsMixin.PartitionedPrefixProperty(*, partition_date_source=None)
Bases:
objectAmazon S3 keys for log objects are partitioned in the following format:.
[DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString]PartitionedPrefix defaults to EventTime delivery when server access logs are delivered.
- Parameters:
partition_date_source (
Optional[str]) – Specifies the partition date source for the partitioned prefix.PartitionDateSourcecan beEventTimeorDeliveryTime. ForDeliveryTime, the time in the log file names corresponds to the delivery time for the log files. ForEventTime, The logs delivered are for a specific day only. The year, month, and day correspond to the day on which the event occurred, and the hour, minutes and seconds are set to 00 in the key.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins partitioned_prefix_property = s3_mixins.CfnBucketPropsMixin.PartitionedPrefixProperty( partition_date_source="partitionDateSource" )
Attributes
- partition_date_source
Specifies the partition date source for the partitioned prefix.
PartitionDateSourcecan beEventTimeorDeliveryTime.For
DeliveryTime, the time in the log file names corresponds to the delivery time for the log files.For
EventTime, The logs delivered are for a specific day only. The year, month, and day correspond to the day on which the event occurred, and the hour, minutes and seconds are set to 00 in the key.
PublicAccessBlockConfigurationProperty
- class CfnBucketPropsMixin.PublicAccessBlockConfigurationProperty(*, block_public_acls=None, block_public_policy=None, ignore_public_acls=None, restrict_public_buckets=None)
Bases:
objectThe PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket.
You can enable the configuration options in any combination. Bucket-level settings work alongside account-level settings (which may inherit from organization-level policies). For more information about when Amazon S3 considers a bucket or object public, see The Meaning of “Public” in the Amazon S3 User Guide .
- Parameters:
block_public_acls (
Union[bool,IResolvable,None]) – Specifies whether Amazon S3 should block public access control lists (ACLs) for this bucket and objects in this bucket. Setting this element toTRUEcauses 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 toTRUEcauses 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 toTRUEcauses 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 toTRUErestricts access to this bucket to only AWS service principals and authorized users within this account if the bucket has a public policy. Enabling this setting doesn’t affect previously stored bucket policies, except that public and cross-account access within any public bucket policy, including non-public delegation to specific accounts, is blocked.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins public_access_block_configuration_property = s3_mixins.CfnBucketPropsMixin.PublicAccessBlockConfigurationProperty( block_public_acls=False, block_public_policy=False, ignore_public_acls=False, restrict_public_buckets=False )
Attributes
- block_public_acls
Specifies whether Amazon S3 should block public access control lists (ACLs) for this bucket and objects in this bucket.
Setting this element to
TRUEcauses 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
Specifies whether Amazon S3 should block public bucket policies for this bucket.
Setting this element to
TRUEcauses 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
Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket.
Setting this element to
TRUEcauses 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
Specifies whether Amazon S3 should restrict public bucket policies for this bucket.
Setting this element to
TRUErestricts 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.
QueueConfigurationProperty
- class CfnBucketPropsMixin.QueueConfigurationProperty(*, event=None, filter=None, queue=None)
Bases:
objectSpecifies the configuration for publishing messages to an Amazon Simple Queue Service (Amazon SQS) queue when Amazon S3 detects specified events.
- Parameters:
event (
Optional[str]) –The Amazon S3 bucket event about which you want to publish messages to Amazon SQS. For more information, see Supported Event Types in the Amazon S3 User Guide .
filter (
Union[IResolvable,NotificationFilterProperty,Dict[str,Any],None]) –The filtering rules that determine which objects trigger notifications. For example, you can create a filter so that Amazon S3 sends notifications only when image files with a
.jpgextension are added to the bucket. For more information, see Configuring event notifications using object key name filtering in the Amazon S3 User Guide .queue (
Optional[str]) – The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 publishes a message when it detects events of the specified type. FIFO queues are not allowed when enabling an SQS queue as the event notification destination.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins queue_configuration_property = s3_mixins.CfnBucketPropsMixin.QueueConfigurationProperty( event="event", filter=s3_mixins.CfnBucketPropsMixin.NotificationFilterProperty( s3_key=s3_mixins.CfnBucketPropsMixin.S3KeyFilterProperty( rules=[s3_mixins.CfnBucketPropsMixin.FilterRuleProperty( name="name", value="value" )] ) ), queue="queue" )
Attributes
- event
The Amazon S3 bucket event about which you want to publish messages to Amazon SQS.
For more information, see Supported Event Types in the Amazon S3 User Guide .
- 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
.jpgextension are added to the bucket. For more information, see Configuring event notifications using object key name filtering in the Amazon S3 User Guide .
- 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.
RecordExpirationProperty
- class CfnBucketPropsMixin.RecordExpirationProperty(*, days=None, expiration=None)
Bases:
objectThe journal table record expiration settings for a journal table in an S3 Metadata configuration.
- Parameters:
days (
Union[int,float,None]) – If you enable journal table record expiration, you can set the number of days to retain your journal table records. Journal table records must be retained for a minimum of 7 days. To set this value, specify any whole number from7to2147483647. For example, to retain your journal table records for one year, set this value to365.expiration (
Optional[str]) – Specifies whether journal table record expiration is enabled or disabled.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins record_expiration_property = s3_mixins.CfnBucketPropsMixin.RecordExpirationProperty( days=123, expiration="expiration" )
Attributes
- days
If you enable journal table record expiration, you can set the number of days to retain your journal table records.
Journal table records must be retained for a minimum of 7 days. To set this value, specify any whole number from
7to2147483647. For example, to retain your journal table records for one year, set this value to365.
- expiration
Specifies whether journal table record expiration is enabled or disabled.
RedirectAllRequestsToProperty
- class CfnBucketPropsMixin.RedirectAllRequestsToProperty(*, host_name=None, protocol=None)
Bases:
objectSpecifies the redirect behavior of all requests to a website endpoint of an Amazon S3 bucket.
- Parameters:
host_name (
Optional[str]) – Name of the host where requests are redirected.protocol (
Optional[str]) – Protocol to use when redirecting requests. The default is the protocol that is used in the original request.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins redirect_all_requests_to_property = s3_mixins.CfnBucketPropsMixin.RedirectAllRequestsToProperty( host_name="hostName", protocol="protocol" )
Attributes
- host_name
Name of the host where requests are redirected.
- protocol
Protocol to use when redirecting requests.
The default is the protocol that is used in the original request.
RedirectRuleProperty
- class CfnBucketPropsMixin.RedirectRuleProperty(*, host_name=None, http_redirect_code=None, protocol=None, replace_key_prefix_with=None, replace_key_with=None)
Bases:
objectSpecifies 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 prefixdocs/(objects in thedocs/folder) todocuments/, you can set a condition block withKeyPrefixEqualsset todocs/and in the Redirect setReplaceKeyPrefixWithto/documents. Not required if one of the siblings is present. Can be present only ifReplaceKeyWithis 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 ifReplaceKeyPrefixWithis not provided. .. epigraph:: Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins redirect_rule_property = s3_mixins.CfnBucketPropsMixin.RedirectRuleProperty( host_name="hostName", http_redirect_code="httpRedirectCode", protocol="protocol", replace_key_prefix_with="replaceKeyPrefixWith", replace_key_with="replaceKeyWith" )
Attributes
- host_name
The host name to use in the redirect request.
- http_redirect_code
The HTTP redirect code to use on the response.
Not required if one of the siblings is present.
- protocol
Protocol to use when redirecting requests.
The default is the protocol that is used in the original request.
- 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 thedocs/folder) todocuments/, you can set a condition block withKeyPrefixEqualsset todocs/and in the Redirect setReplaceKeyPrefixWithto/documents. Not required if one of the siblings is present. Can be present only ifReplaceKeyWithis 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>`_ .
- 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 ifReplaceKeyPrefixWithis 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>`_ .
ReplicaModificationsProperty
- class CfnBucketPropsMixin.ReplicaModificationsProperty(*, status=None)
Bases:
objectA filter that you can specify for selection for modifications on replicas.
- Parameters:
status (
Optional[str]) – Specifies whether Amazon S3 replicates modifications on replicas. Allowed values :Enabled|Disabled- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins replica_modifications_property = s3_mixins.CfnBucketPropsMixin.ReplicaModificationsProperty( status="status" )
Attributes
- status
Specifies whether Amazon S3 replicates modifications on replicas.
Allowed values :
Enabled|Disabled
ReplicationConfigurationProperty
- class CfnBucketPropsMixin.ReplicationConfigurationProperty(*, role=None, rules=None)
Bases:
objectA container for replication rules.
You can add up to 1,000 rules. The maximum size of a replication configuration is 2 MB. The latest version of the replication configuration XML is V2. For more information about XML V2 replication configurations, see Replication configuration in the Amazon S3 User Guide .
- Parameters:
role (
Optional[str]) – The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that Amazon S3 assumes when replicating objects. For more information, see How to Set Up Replication in the Amazon S3 User Guide .rules (
Union[IResolvable,Sequence[Union[IResolvable,ReplicationRuleProperty,Dict[str,Any]]],None]) – A container for one or more replication rules. A replication configuration must have at least one rule and can contain a maximum of 1,000 rules.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins replication_configuration_property = s3_mixins.CfnBucketPropsMixin.ReplicationConfigurationProperty( role="role", rules=[s3_mixins.CfnBucketPropsMixin.ReplicationRuleProperty( delete_marker_replication=s3_mixins.CfnBucketPropsMixin.DeleteMarkerReplicationProperty( status="status" ), destination=s3_mixins.CfnBucketPropsMixin.ReplicationDestinationProperty( access_control_translation=s3_mixins.CfnBucketPropsMixin.AccessControlTranslationProperty( owner="owner" ), account="account", bucket="bucket", encryption_configuration=s3_mixins.CfnBucketPropsMixin.EncryptionConfigurationProperty( replica_kms_key_id="replicaKmsKeyId" ), metrics=s3_mixins.CfnBucketPropsMixin.MetricsProperty( event_threshold=s3_mixins.CfnBucketPropsMixin.ReplicationTimeValueProperty( minutes=123 ), status="status" ), replication_time=s3_mixins.CfnBucketPropsMixin.ReplicationTimeProperty( status="status", time=s3_mixins.CfnBucketPropsMixin.ReplicationTimeValueProperty( minutes=123 ) ), storage_class="storageClass" ), filter=s3_mixins.CfnBucketPropsMixin.ReplicationRuleFilterProperty( and=s3_mixins.CfnBucketPropsMixin.ReplicationRuleAndOperatorProperty( prefix="prefix", tag_filters=[s3_mixins.CfnBucketPropsMixin.TagFilterProperty( key="key", value="value" )] ), prefix="prefix", tag_filter=s3_mixins.CfnBucketPropsMixin.TagFilterProperty( key="key", value="value" ) ), id="id", prefix="prefix", priority=123, source_selection_criteria=s3_mixins.CfnBucketPropsMixin.SourceSelectionCriteriaProperty( replica_modifications=s3_mixins.CfnBucketPropsMixin.ReplicaModificationsProperty( status="status" ), sse_kms_encrypted_objects=s3_mixins.CfnBucketPropsMixin.SseKmsEncryptedObjectsProperty( status="status" ) ), status="status" )] )
Attributes
- role
The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that Amazon S3 assumes when replicating objects.
For more information, see How to Set Up Replication in the Amazon S3 User Guide .
- 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.
ReplicationDestinationProperty
- class CfnBucketPropsMixin.ReplicationDestinationProperty(*, access_control_translation=None, account=None, bucket=None, encryption_configuration=None, metrics=None, replication_time=None, storage_class=None)
Bases:
objectA container for information about the replication destination and its configurations including enabling the S3 Replication Time Control (S3 RTC).
- Parameters:
access_control_translation (
Union[IResolvable,AccessControlTranslationProperty,Dict[str,Any],None]) – Specify this only in a cross-account scenario (where source and destination bucket owners are not the same), and you want to change replica ownership to the AWS account that owns the destination bucket. If this is not specified in the replication configuration, the replicas are owned by same AWS account that owns the source object.account (
Optional[str]) – Destination bucket owner account ID. In a cross-account scenario, if you direct Amazon S3 to change replica ownership to the AWS account that owns the destination bucket by specifying theAccessControlTranslationproperty, 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 theAccessControlTranslationproperty, theAccountproperty is required.bucket (
Optional[str]) – The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store the results.encryption_configuration (
Union[IResolvable,EncryptionConfigurationProperty,Dict[str,Any],None]) – Specifies encryption-related information.metrics (
Union[IResolvable,MetricsProperty,Dict[str,Any],None]) – A container specifying replication metrics-related settings enabling replication metrics and events.replication_time (
Union[IResolvable,ReplicationTimeProperty,Dict[str,Any],None]) – A container specifying S3 Replication Time Control (S3 RTC), including whether S3 RTC is enabled and the time when all objects and operations on objects must be replicated. Must be specified together with aMetricsblock.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
StorageClasselement of the PUT Bucket replication action in the Amazon S3 API Reference .FSX_OPENZFSis not an accepted value when replicating objects.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins replication_destination_property = s3_mixins.CfnBucketPropsMixin.ReplicationDestinationProperty( access_control_translation=s3_mixins.CfnBucketPropsMixin.AccessControlTranslationProperty( owner="owner" ), account="account", bucket="bucket", encryption_configuration=s3_mixins.CfnBucketPropsMixin.EncryptionConfigurationProperty( replica_kms_key_id="replicaKmsKeyId" ), metrics=s3_mixins.CfnBucketPropsMixin.MetricsProperty( event_threshold=s3_mixins.CfnBucketPropsMixin.ReplicationTimeValueProperty( minutes=123 ), status="status" ), replication_time=s3_mixins.CfnBucketPropsMixin.ReplicationTimeProperty( status="status", time=s3_mixins.CfnBucketPropsMixin.ReplicationTimeValueProperty( minutes=123 ) ), storage_class="storageClass" )
Attributes
- access_control_translation
Specify this only in a cross-account scenario (where source and destination bucket owners are not the same), and you want to change replica ownership to the AWS account that owns the destination bucket.
If this is not specified in the replication configuration, the replicas are owned by same AWS account that owns the source object.
- 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
AccessControlTranslationproperty, 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
AccessControlTranslationproperty, theAccountproperty is required.
- bucket
The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store the results.
- encryption_configuration
Specifies encryption-related information.
- metrics
A container specifying replication metrics-related settings enabling replication metrics and events.
- 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
Metricsblock.
- 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
StorageClasselement of the PUT Bucket replication action in the Amazon S3 API Reference .FSX_OPENZFSis not an accepted value when replicating objects.
ReplicationRuleAndOperatorProperty
- class CfnBucketPropsMixin.ReplicationRuleAndOperatorProperty(*, prefix=None, tag_filters=None)
Bases:
objectA 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
Prefixand aTagFilter, wrap these filters in anAndtag.If you specify a filter based on multiple tags, wrap the
TagFilterelements in anAndtag
- Parameters:
prefix (
Optional[str]) – An object key name prefix that identifies the subset of objects to which the rule applies.tag_filters (
Union[IResolvable,Sequence[Union[IResolvable,TagFilterProperty,Dict[str,Any]]],None]) – An array of tags containing key and value pairs.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins replication_rule_and_operator_property = s3_mixins.CfnBucketPropsMixin.ReplicationRuleAndOperatorProperty( prefix="prefix", tag_filters=[s3_mixins.CfnBucketPropsMixin.TagFilterProperty( key="key", value="value" )] )
Attributes
- prefix
An object key name prefix that identifies the subset of objects to which the rule applies.
- tag_filters
An array of tags containing key and value pairs.
ReplicationRuleFilterProperty
- class CfnBucketPropsMixin.ReplicationRuleFilterProperty(*, and_=None, prefix=None, tag_filter=None)
Bases:
objectA filter that identifies the subset of objects to which the replication rule applies.
A
Filtermust specify exactly onePrefix,TagFilter, or anAndchild 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
Prefixand aTagFilter, wrap these filters in anAndtag. - If you specify a filter based on multiple tags, wrap theTagFilterelements in anAndtag.prefix (
Optional[str]) –An object key name prefix that identifies the subset of objects to which the rule applies. .. epigraph:: Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints .
tag_filter (
Union[IResolvable,TagFilterProperty,Dict[str,Any],None]) – A container for specifying a tag key and value. The rule applies only to objects that have the tag in their tag set.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins replication_rule_filter_property = s3_mixins.CfnBucketPropsMixin.ReplicationRuleFilterProperty( and=s3_mixins.CfnBucketPropsMixin.ReplicationRuleAndOperatorProperty( prefix="prefix", tag_filters=[s3_mixins.CfnBucketPropsMixin.TagFilterProperty( key="key", value="value" )] ), prefix="prefix", tag_filter=s3_mixins.CfnBucketPropsMixin.TagFilterProperty( key="key", value="value" ) )
Attributes
- and_
A container for specifying rule filters.
The filters determine the subset of objects to which the rule applies. This element is required only if you specify more than one filter. For example:
If you specify both a
Prefixand aTagFilter, wrap these filters in anAndtag.If you specify a filter based on multiple tags, wrap the
TagFilterelements in anAndtag.
- 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 .
- 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.
ReplicationRuleProperty
- class CfnBucketPropsMixin.ReplicationRuleProperty(*, delete_marker_replication=None, destination=None, filter=None, id=None, prefix=None, priority=None, source_selection_criteria=None, status=None)
Bases:
objectSpecifies which Amazon S3 objects to replicate and where to store the replicas.
- Parameters:
delete_marker_replication (
Union[IResolvable,DeleteMarkerReplicationProperty,Dict[str,Any],None]) –Specifies whether Amazon S3 replicates delete markers. If you specify a
Filterin your replication configuration, you must also include aDeleteMarkerReplicationelement. If yourFilterincludes aTagelement, theDeleteMarkerReplicationStatusmust be set to Disabled, because Amazon S3 does not support replicating delete markers for tag-based rules. For an example configuration, see Basic Rule Configuration . For more information about delete marker replication, see Basic Rule Configuration . .. epigraph:: If you are using an earlier version of the replication configuration, Amazon S3 handles replication of delete markers differently. For more information, see Backward Compatibility .destination (
Union[IResolvable,ReplicationDestinationProperty,Dict[str,Any],None]) – A container for information about the replication destination and its configurations including enabling the S3 Replication Time Control (S3 RTC).filter (
Union[IResolvable,ReplicationRuleFilterProperty,Dict[str,Any],None]) – A filter that identifies the subset of objects to which the replication rule applies. AFiltermust specify exactly onePrefix,TagFilter, or anAndchild 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 thePrefixdirectly as a child element of theRuleelement.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
Prefixdirectly as a child element of theRuleelement. .. epigraph:: Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints .priority (
Union[int,float,None]) – The priority indicates which rule has precedence whenever two or more replication rules conflict. Amazon S3 will attempt to replicate objects according to all replication rules. However, if there are two or more rules with the same destination bucket, then objects will be replicated according to the rule with the highest priority. The higher the number, the higher the priority. For more information, see Replication in the Amazon S3 User Guide .source_selection_criteria (
Union[IResolvable,SourceSelectionCriteriaProperty,Dict[str,Any],None]) – A container that describes additional filters for identifying the source objects that you want to replicate. You can choose to enable or disable the replication of these objects.status (
Optional[str]) – Specifies whether the rule is enabled.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins replication_rule_property = s3_mixins.CfnBucketPropsMixin.ReplicationRuleProperty( delete_marker_replication=s3_mixins.CfnBucketPropsMixin.DeleteMarkerReplicationProperty( status="status" ), destination=s3_mixins.CfnBucketPropsMixin.ReplicationDestinationProperty( access_control_translation=s3_mixins.CfnBucketPropsMixin.AccessControlTranslationProperty( owner="owner" ), account="account", bucket="bucket", encryption_configuration=s3_mixins.CfnBucketPropsMixin.EncryptionConfigurationProperty( replica_kms_key_id="replicaKmsKeyId" ), metrics=s3_mixins.CfnBucketPropsMixin.MetricsProperty( event_threshold=s3_mixins.CfnBucketPropsMixin.ReplicationTimeValueProperty( minutes=123 ), status="status" ), replication_time=s3_mixins.CfnBucketPropsMixin.ReplicationTimeProperty( status="status", time=s3_mixins.CfnBucketPropsMixin.ReplicationTimeValueProperty( minutes=123 ) ), storage_class="storageClass" ), filter=s3_mixins.CfnBucketPropsMixin.ReplicationRuleFilterProperty( and=s3_mixins.CfnBucketPropsMixin.ReplicationRuleAndOperatorProperty( prefix="prefix", tag_filters=[s3_mixins.CfnBucketPropsMixin.TagFilterProperty( key="key", value="value" )] ), prefix="prefix", tag_filter=s3_mixins.CfnBucketPropsMixin.TagFilterProperty( key="key", value="value" ) ), id="id", prefix="prefix", priority=123, source_selection_criteria=s3_mixins.CfnBucketPropsMixin.SourceSelectionCriteriaProperty( replica_modifications=s3_mixins.CfnBucketPropsMixin.ReplicaModificationsProperty( status="status" ), sse_kms_encrypted_objects=s3_mixins.CfnBucketPropsMixin.SseKmsEncryptedObjectsProperty( status="status" ) ), status="status" )
Attributes
- delete_marker_replication
Specifies whether Amazon S3 replicates delete markers.
If you specify a
Filterin your replication configuration, you must also include aDeleteMarkerReplicationelement. If yourFilterincludes aTagelement, theDeleteMarkerReplicationStatusmust 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>`_ .
- destination
A container for information about the replication destination and its configurations including enabling the S3 Replication Time Control (S3 RTC).
- filter
A filter that identifies the subset of objects to which the replication rule applies.
A
Filtermust specify exactly onePrefix,TagFilter, or anAndchild 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
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
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
Prefixdirectly as a child element of theRuleelement. .. 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>`_ .
- 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 .
- 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.
- status
Specifies whether the rule is enabled.
ReplicationTimeProperty
- class CfnBucketPropsMixin.ReplicationTimeProperty(*, status=None, time=None)
Bases:
objectA 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
Metricsblock.- Parameters:
status (
Optional[str]) – Specifies whether the replication time is enabled.time (
Union[IResolvable,ReplicationTimeValueProperty,Dict[str,Any],None]) – A container specifying the time by which replication should be complete for all objects and operations on objects.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins replication_time_property = s3_mixins.CfnBucketPropsMixin.ReplicationTimeProperty( status="status", time=s3_mixins.CfnBucketPropsMixin.ReplicationTimeValueProperty( minutes=123 ) )
Attributes
- status
Specifies whether the replication time is enabled.
- time
A container specifying the time by which replication should be complete for all objects and operations on objects.
ReplicationTimeValueProperty
- class CfnBucketPropsMixin.ReplicationTimeValueProperty(*, minutes=None)
Bases:
objectA container specifying the time value for S3 Replication Time Control (S3 RTC) and replication metrics
EventThreshold.- Parameters:
minutes (
Union[int,float,None]) – Contains an integer specifying time in minutes. Valid value: 15- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins replication_time_value_property = s3_mixins.CfnBucketPropsMixin.ReplicationTimeValueProperty( minutes=123 )
Attributes
- minutes
Contains an integer specifying time in minutes.
Valid value: 15
RoutingRuleConditionProperty
- class CfnBucketPropsMixin.RoutingRuleConditionProperty(*, http_error_code_returned_equals=None, key_prefix_equals=None)
Bases:
objectA 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
/docsfolder, redirect to the/documentsfolder. 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 elementConditionis specified and siblingKeyPrefixEqualsis 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 forExamplePage.html, the key prefix will beExamplePage.html. To redirect request for all pages with the prefixdocs/, the key prefix will bedocs/, which identifies all objects in the docs/ folder. Required when the parent elementConditionis specified and siblingHttpErrorCodeReturnedEqualsis not specified. If both conditions are specified, both must be true for the redirect to be applied.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins routing_rule_condition_property = s3_mixins.CfnBucketPropsMixin.RoutingRuleConditionProperty( http_error_code_returned_equals="httpErrorCodeReturnedEquals", key_prefix_equals="keyPrefixEquals" )
Attributes
- http_error_code_returned_equals
The HTTP error code when the redirect is applied.
In the event of an error, if the error code equals this value, then the specified redirect is applied.
Required when parent element
Conditionis specified and siblingKeyPrefixEqualsis not specified. If both are specified, then both must be true for the redirect to be applied.
- 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 beExamplePage.html. To redirect request for all pages with the prefixdocs/, the key prefix will bedocs/, which identifies all objects in the docs/ folder.Required when the parent element
Conditionis specified and siblingHttpErrorCodeReturnedEqualsis not specified. If both conditions are specified, both must be true for the redirect to be applied.
RoutingRuleProperty
- class CfnBucketPropsMixin.RoutingRuleProperty(*, redirect_rule=None, routing_rule_condition=None)
Bases:
objectSpecifies the redirect behavior and when a redirect is applied.
For more information about routing rules, see Configuring advanced conditional redirects in the Amazon S3 User Guide .
- Parameters:
redirect_rule (
Union[IResolvable,RedirectRuleProperty,Dict[str,Any],None]) – Container for redirect information. You can redirect requests to another host, to another page, or with another protocol. In the event of an error, you can specify a different error code to return.routing_rule_condition (
Union[IResolvable,RoutingRuleConditionProperty,Dict[str,Any],None]) – A container for describing a condition that must be met for the specified redirect to apply. For example, 1. If request is for pages in the/docsfolder, redirect to the/documentsfolder. 2. If request results in HTTP error 4xx, redirect request to another host where you might process the error.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins routing_rule_property = s3_mixins.CfnBucketPropsMixin.RoutingRuleProperty( redirect_rule=s3_mixins.CfnBucketPropsMixin.RedirectRuleProperty( host_name="hostName", http_redirect_code="httpRedirectCode", protocol="protocol", replace_key_prefix_with="replaceKeyPrefixWith", replace_key_with="replaceKeyWith" ), routing_rule_condition=s3_mixins.CfnBucketPropsMixin.RoutingRuleConditionProperty( http_error_code_returned_equals="httpErrorCodeReturnedEquals", key_prefix_equals="keyPrefixEquals" ) )
Attributes
- redirect_rule
Container for redirect information.
You can redirect requests to another host, to another page, or with another protocol. In the event of an error, you can specify a different error code to return.
- 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
/docsfolder, redirect to the/documentsfolder. 2. If request results in HTTP error 4xx, redirect request to another host where you might process the error.
RuleProperty
- class CfnBucketPropsMixin.RuleProperty(*, abort_incomplete_multipart_upload=None, expiration_date=None, expiration_in_days=None, expired_object_delete_marker=None, id=None, noncurrent_version_expiration=None, noncurrent_version_expiration_in_days=None, noncurrent_version_transition=None, noncurrent_version_transitions=None, object_size_greater_than=None, object_size_less_than=None, prefix=None, status=None, tag_filters=None, transition=None, transitions=None)
Bases:
objectSpecifies 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, orTransitions.- Parameters:
abort_incomplete_multipart_upload (
Union[IResolvable,AbortIncompleteMultipartUploadProperty,Dict[str,Any],None]) – Specifies a lifecycle rule that stops incomplete multipart uploads to an Amazon S3 bucket.expiration_date (
Union[datetime,IResolvable,None]) – Indicates when objects are deleted from Amazon S3 and Amazon S3 Glacier. The date value must be in ISO 8601 format. The time is always midnight UTC. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time.expiration_in_days (
Union[int,float,None]) – Indicates the number of days after creation when objects are deleted from Amazon S3 and Amazon S3 Glacier. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time.expired_object_delete_marker (
Union[bool,IResolvable,None]) – Indicates whether Amazon S3 will remove a delete marker without any noncurrent versions. If set to true, the delete marker will be removed if there are no noncurrent versions. This cannot be specified withExpirationInDays,ExpirationDate, orTagFilters.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 theNoncurrentVersionTransitionsproperty.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 theNoncurrentVersionTransitionproperty.object_size_greater_than (
Union[int,float,None]) – Specifies the minimum object size in bytes for this rule to apply to. Objects must be larger than this value in bytes. For more information about size based rules, see Lifecycle configuration using size-based rules in the Amazon S3 User Guide .object_size_less_than (
Union[int,float,None]) –Specifies the maximum object size in bytes for this rule to apply to. Objects must be smaller than this value in bytes. For more information about sized based rules, see Lifecycle configuration using size-based rules in the Amazon S3 User Guide .
prefix (
Optional[str]) –Object key prefix that identifies one or more objects to which this rule applies. .. epigraph:: Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints .
status (
Optional[str]) – IfEnabled, the rule is currently being applied. IfDisabled, the rule is not currently being applied.tag_filters (
Union[IResolvable,Sequence[Union[IResolvable,TagFilterProperty,Dict[str,Any]]],None]) – Tags to use to identify a subset of objects to which the lifecycle rule applies.transition (
Union[IResolvable,TransitionProperty,Dict[str,Any],None]) – (Deprecated.) Specifies when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don’t specify theTransitionsproperty.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 theTransitionproperty.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins rule_property = s3_mixins.CfnBucketPropsMixin.RuleProperty( abort_incomplete_multipart_upload=s3_mixins.CfnBucketPropsMixin.AbortIncompleteMultipartUploadProperty( days_after_initiation=123 ), expiration_date=Date(), expiration_in_days=123, expired_object_delete_marker=False, id="id", noncurrent_version_expiration=s3_mixins.CfnBucketPropsMixin.NoncurrentVersionExpirationProperty( newer_noncurrent_versions=123, noncurrent_days=123 ), noncurrent_version_expiration_in_days=123, noncurrent_version_transition=s3_mixins.CfnBucketPropsMixin.NoncurrentVersionTransitionProperty( newer_noncurrent_versions=123, storage_class="storageClass", transition_in_days=123 ), noncurrent_version_transitions=[s3_mixins.CfnBucketPropsMixin.NoncurrentVersionTransitionProperty( newer_noncurrent_versions=123, storage_class="storageClass", transition_in_days=123 )], object_size_greater_than=123, object_size_less_than=123, prefix="prefix", status="status", tag_filters=[s3_mixins.CfnBucketPropsMixin.TagFilterProperty( key="key", value="value" )], transition=s3_mixins.CfnBucketPropsMixin.TransitionProperty( storage_class="storageClass", transition_date=Date(), transition_in_days=123 ), transitions=[s3_mixins.CfnBucketPropsMixin.TransitionProperty( storage_class="storageClass", transition_date=Date(), transition_in_days=123 )] )
Attributes
- abort_incomplete_multipart_upload
Specifies a lifecycle rule that stops incomplete multipart uploads to an Amazon S3 bucket.
- 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.
- 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.
- 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, orTagFilters.
- id
Unique identifier for the rule.
The value can’t be longer than 255 characters.
- 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.
- 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.
- 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
NoncurrentVersionTransitionsproperty.
- 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
NoncurrentVersionTransitionproperty.
- 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 .
- 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 .
- 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 .
- status
If
Enabled, the rule is currently being applied.If
Disabled, the rule is not currently being applied.
- tag_filters
Tags to use to identify a subset of objects to which the lifecycle rule applies.
- 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
Transitionsproperty.
- 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
Transitionproperty.
S3KeyFilterProperty
- class CfnBucketPropsMixin.S3KeyFilterProperty(*, rules=None)
Bases:
objectA container for object key name prefix and suffix filtering rules.
For more information about object key name filtering, see Configuring event notifications using object key name filtering in the Amazon S3 User Guide . .. epigraph:
The same type of filter rule cannot be used more than once. For example, you cannot specify two prefix rules.
- Parameters:
rules (
Union[IResolvable,Sequence[Union[IResolvable,FilterRuleProperty,Dict[str,Any]]],None]) – A list of containers for the key-value pair that defines the criteria for the filter rule.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins s3_key_filter_property = s3_mixins.CfnBucketPropsMixin.S3KeyFilterProperty( rules=[s3_mixins.CfnBucketPropsMixin.FilterRuleProperty( name="name", value="value" )] )
Attributes
- rules
A list of containers for the key-value pair that defines the criteria for the filter rule.
S3TablesDestinationProperty
- class CfnBucketPropsMixin.S3TablesDestinationProperty(*, table_arn=None, table_bucket_arn=None, table_name=None, table_namespace=None)
Bases:
objectThe destination information for a V1 S3 Metadata configuration.
The destination table bucket must be in the same Region and AWS account as the general purpose bucket. The specified metadata table name must be unique within the
aws_s3_metadatanamespace in the destination table bucket.- Parameters:
table_arn (
Optional[str]) – The Amazon Resource Name (ARN) for the metadata table in the metadata table configuration. The specified metadata table name must be unique within theaws_s3_metadatanamespace in the destination table bucket.table_bucket_arn (
Optional[str]) – The Amazon Resource Name (ARN) for the table bucket that’s specified as the destination in the metadata table configuration. The destination table bucket must be in the same Region and AWS account as the general purpose bucket.table_name (
Optional[str]) – The name for the metadata table in your metadata table configuration. The specified metadata table name must be unique within theaws_s3_metadatanamespace in the destination table bucket.table_namespace (
Optional[str]) – The table bucket namespace for the metadata table in your metadata table configuration. This value is alwaysaws_s3_metadata.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins s3_tables_destination_property = s3_mixins.CfnBucketPropsMixin.S3TablesDestinationProperty( table_arn="tableArn", table_bucket_arn="tableBucketArn", table_name="tableName", table_namespace="tableNamespace" )
Attributes
- table_arn
The Amazon Resource Name (ARN) for the metadata table in the metadata table configuration.
The specified metadata table name must be unique within the
aws_s3_metadatanamespace in the destination table bucket.
- table_bucket_arn
The Amazon Resource Name (ARN) for the table bucket that’s specified as the destination in the metadata table configuration.
The destination table bucket must be in the same Region and AWS account as the general purpose bucket.
- table_name
The name for the metadata table in your metadata table configuration.
The specified metadata table name must be unique within the
aws_s3_metadatanamespace in the destination table bucket.
- table_namespace
The table bucket namespace for the metadata table in your metadata table configuration.
This value is always
aws_s3_metadata.
ServerSideEncryptionByDefaultProperty
- class CfnBucketPropsMixin.ServerSideEncryptionByDefaultProperty(*, kms_master_key_id=None, sse_algorithm=None)
Bases:
objectDescribes the default server-side encryption to apply to new objects in the bucket.
If a PUT Object request doesn’t specify any server-side encryption, this default encryption will be applied. For more information, see PutBucketEncryption . .. epigraph:
- *General purpose buckets* - If you don't specify a customer managed key at configuration, Amazon S3 automatically creates an AWS KMS key ( ``aws/s3`` ) in your AWS account the first time that you add an object encrypted with SSE-KMS to a bucket. By default, Amazon S3 uses this KMS key for SSE-KMS. - *Directory buckets* - Your SSE-KMS configuration can only support 1 `customer managed key <https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk>`_ per directory bucket's lifetime. The `AWS managed key <https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk>`_ ( ``aws/s3`` ) isn't supported. - *Directory buckets* - For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS.
- Parameters:
kms_master_key_id (
Optional[str]) –AWS Key Management Service (KMS) customer managed key ID to use for the default encryption. .. epigraph:: - General purpose buckets - This parameter is allowed if and only if
SSEAlgorithmis set toaws:kmsoraws:kms:dsse. - Directory buckets - This parameter is allowed if and only ifSSEAlgorithmis set toaws:kms. You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the KMS key. - Key ID:1234abcd-12ab-34cd-56ef-1234567890ab- Key ARN:arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab- Key Alias:alias/alias-nameIf you are using encryption with cross-account or AWS service operations, you must use a fully qualified KMS key ARN. For more information, see Using encryption for cross-account operations . .. epigraph:: - General purpose buckets - If you’re specifying a customer managed KMS key, we recommend using a fully qualified KMS key ARN. If you use a KMS key alias instead, then AWS resolves the key within the requester’s account. This behavior can result in data that’s encrypted with a KMS key that belongs to the requester, and not the bucket owner. Also, if you use a key ID, you can run into a LogDestination undeliverable error when creating a VPC flow log. - Directory buckets - When you specify an AWS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn’t supported. > Amazon S3 only supports symmetric encryption KMS keys. For more information, see Asymmetric keys in AWS KMS in the AWS Key Management Service Developer Guide .sse_algorithm (
Optional[str]) – Server-side encryption algorithm to use for the default encryption. .. epigraph:: For directory buckets, there are only two supported values for server-side encryption:AES256andaws:kms.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins server_side_encryption_by_default_property = s3_mixins.CfnBucketPropsMixin.ServerSideEncryptionByDefaultProperty( kms_master_key_id="kmsMasterKeyId", sse_algorithm="sseAlgorithm" )
Attributes
- kms_master_key_id
AWS Key Management Service (KMS) customer managed key ID to use for the default encryption.
General purpose buckets - This parameter is allowed if and only if
SSEAlgorithmis set toaws:kmsoraws:kms:dsse.Directory buckets - This parameter is allowed if and only if
SSEAlgorithmis set toaws:kms.
You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the KMS key.
Key ID:
1234abcd-12ab-34cd-56ef-1234567890abKey ARN:
arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890abKey Alias:
alias/alias-name
If you are using encryption with cross-account or AWS service operations, you must use a fully qualified KMS key ARN. For more information, see Using encryption for cross-account operations . .. epigraph:
- *General purpose buckets* - If you're specifying a customer managed KMS key, we recommend using a fully qualified KMS key ARN. If you use a KMS key alias instead, then AWS resolves the key within the requester’s account. This behavior can result in data that's encrypted with a KMS key that belongs to the requester, and not the bucket owner. Also, if you use a key ID, you can run into a LogDestination undeliverable error when creating a VPC flow log. - *Directory buckets* - When you specify an `AWS customer managed key <https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk>`_ for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported. > Amazon S3 only supports symmetric encryption KMS keys. For more information, see `Asymmetric keys in AWS KMS <https://docs.aws.amazon.com//kms/latest/developerguide/symmetric-asymmetric.html>`_ in the *AWS Key Management Service Developer Guide* .
- sse_algorithm
Server-side encryption algorithm to use for the default encryption.
For directory buckets, there are only two supported values for server-side encryption:
AES256andaws:kms.
ServerSideEncryptionRuleProperty
- class CfnBucketPropsMixin.ServerSideEncryptionRuleProperty(*, blocked_encryption_types=None, bucket_key_enabled=None, server_side_encryption_by_default=None)
Bases:
objectSpecifies the default server-side encryption configuration.
General purpose buckets - If you’re specifying a customer managed KMS key, we recommend using a fully qualified KMS key ARN. If you use a KMS key alias instead, then AWS resolves the key within the requester’s account. This behavior can result in data that’s encrypted with a KMS key that belongs to the requester, and not the bucket owner.
Directory buckets - When you specify an AWS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn’t supported.
- Parameters:
blocked_encryption_types (
Union[IResolvable,BlockedEncryptionTypesProperty,Dict[str,Any],None]) –A bucket-level setting for Amazon S3 general purpose buckets used to prevent the upload of new objects encrypted with the specified server-side encryption type. For example, blocking an encryption type will block
PutObject,CopyObject,PostObject, multipart upload, and replication requests to the bucket for objects with the specified encryption type. However, you can continue to read and list any pre-existing objects already encrypted with the specified encryption type. For more information, see Blocking or unblocking SSE-C for a general purpose bucket . .. epigraph:: Currently, this parameter only supports blocking or unblocking server-side encryption with customer-provided keys (SSE-C). For more information about SSE-C, see Using server-side encryption with customer-provided keys (SSE-C) .bucket_key_enabled (
Union[bool,IResolvable,None]) – Specifies whether Amazon S3 should use an S3 Bucket Key with server-side encryption using KMS (SSE-KMS) for new objects in the bucket. Existing objects are not affected. Setting theBucketKeyEnabledelement totruecauses Amazon S3 to use an S3 Bucket Key. By default, S3 Bucket Key is not enabled. For more information, see Amazon S3 Bucket Keys in the Amazon S3 User Guide .server_side_encryption_by_default (
Union[IResolvable,ServerSideEncryptionByDefaultProperty,Dict[str,Any],None]) – Specifies the default server-side encryption to apply to new objects in the bucket. If a PUT Object request doesn’t specify any server-side encryption, this default encryption will be applied.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins server_side_encryption_rule_property = s3_mixins.CfnBucketPropsMixin.ServerSideEncryptionRuleProperty( blocked_encryption_types=s3_mixins.CfnBucketPropsMixin.BlockedEncryptionTypesProperty( encryption_type=["encryptionType"] ), bucket_key_enabled=False, server_side_encryption_by_default=s3_mixins.CfnBucketPropsMixin.ServerSideEncryptionByDefaultProperty( kms_master_key_id="kmsMasterKeyId", sse_algorithm="sseAlgorithm" ) )
Attributes
- blocked_encryption_types
A bucket-level setting for Amazon S3 general purpose buckets used to prevent the upload of new objects encrypted with the specified server-side encryption type.
For example, blocking an encryption type will block
PutObject,CopyObject,PostObject, multipart upload, and replication requests to the bucket for objects with the specified encryption type. However, you can continue to read and list any pre-existing objects already encrypted with the specified encryption type. For more information, see Blocking or unblocking SSE-C for a general purpose bucket . .. epigraph:Currently, this parameter only supports blocking or unblocking server-side encryption with customer-provided keys (SSE-C). For more information about SSE-C, see `Using server-side encryption with customer-provided keys (SSE-C) <https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html>`_ .
- 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
BucketKeyEnabledelement totruecauses 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
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.
SourceSelectionCriteriaProperty
- class CfnBucketPropsMixin.SourceSelectionCriteriaProperty(*, replica_modifications=None, sse_kms_encrypted_objects=None)
Bases:
objectA 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:
replica_modifications (
Union[IResolvable,ReplicaModificationsProperty,Dict[str,Any],None]) – A filter that you can specify for selection for modifications on replicas.sse_kms_encrypted_objects (
Union[IResolvable,SseKmsEncryptedObjectsProperty,Dict[str,Any],None]) – A container for filter information for the selection of Amazon S3 objects encrypted with AWS KMS.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins source_selection_criteria_property = s3_mixins.CfnBucketPropsMixin.SourceSelectionCriteriaProperty( replica_modifications=s3_mixins.CfnBucketPropsMixin.ReplicaModificationsProperty( status="status" ), sse_kms_encrypted_objects=s3_mixins.CfnBucketPropsMixin.SseKmsEncryptedObjectsProperty( status="status" ) )
Attributes
- replica_modifications
A filter that you can specify for selection for modifications on replicas.
- sse_kms_encrypted_objects
A container for filter information for the selection of Amazon S3 objects encrypted with AWS KMS.
SseKmsEncryptedObjectsProperty
- class CfnBucketPropsMixin.SseKmsEncryptedObjectsProperty(*, status=None)
Bases:
objectA container for filter information for the selection of S3 objects encrypted with AWS KMS.
- Parameters:
status (
Optional[str]) – Specifies whether Amazon S3 replicates objects created with server-side encryption using an AWS KMS key stored in AWS Key Management Service.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins sse_kms_encrypted_objects_property = s3_mixins.CfnBucketPropsMixin.SseKmsEncryptedObjectsProperty( status="status" )
Attributes
- status
Specifies whether Amazon S3 replicates objects created with server-side encryption using an AWS KMS key stored in AWS Key Management Service.
StorageClassAnalysisProperty
- class CfnBucketPropsMixin.StorageClassAnalysisProperty(*, data_export=None)
Bases:
objectSpecifies data related to access patterns to be collected and made available to analyze the tradeoffs between different storage classes for an Amazon S3 bucket.
- Parameters:
data_export (
Union[IResolvable,DataExportProperty,Dict[str,Any],None]) – Specifies how data related to the storage class analysis for an Amazon S3 bucket should be exported.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins storage_class_analysis_property = s3_mixins.CfnBucketPropsMixin.StorageClassAnalysisProperty( data_export=s3_mixins.CfnBucketPropsMixin.DataExportProperty( destination=s3_mixins.CfnBucketPropsMixin.DestinationProperty( bucket_account_id="bucketAccountId", bucket_arn="bucketArn", format="format", prefix="prefix" ), output_schema_version="outputSchemaVersion" ) )
Attributes
- data_export
Specifies how data related to the storage class analysis for an Amazon S3 bucket should be exported.
TagFilterProperty
- class CfnBucketPropsMixin.TagFilterProperty(*, key=None, value=None)
Bases:
objectSpecifies tags to use to identify a subset of objects for an Amazon S3 bucket.
For more information, see Categorizing your storage using tags in the Amazon Simple Storage Service User Guide .
- Parameters:
key (
Optional[str]) – The tag key.value (
Optional[str]) – The tag value.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins tag_filter_property = s3_mixins.CfnBucketPropsMixin.TagFilterProperty( key="key", value="value" )
Attributes
- key
The tag key.
TargetObjectKeyFormatProperty
- class CfnBucketPropsMixin.TargetObjectKeyFormatProperty(*, partitioned_prefix=None, simple_prefix=None)
Bases:
objectAmazon S3 key format for log objects.
Only one format, PartitionedPrefix or SimplePrefix, is allowed.
- Parameters:
partitioned_prefix (
Union[IResolvable,PartitionedPrefixProperty,Dict[str,Any],None]) – Partitioned S3 key for log objects.simple_prefix (
Any) – To use the simple format for S3 keys for log objects. To specify SimplePrefix format, set SimplePrefix to {}.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins # simple_prefix: Any target_object_key_format_property = s3_mixins.CfnBucketPropsMixin.TargetObjectKeyFormatProperty( partitioned_prefix=s3_mixins.CfnBucketPropsMixin.PartitionedPrefixProperty( partition_date_source="partitionDateSource" ), simple_prefix=simple_prefix )
Attributes
- partitioned_prefix
Partitioned S3 key for log objects.
- simple_prefix
To use the simple format for S3 keys for log objects.
To specify SimplePrefix format, set SimplePrefix to {}.
TieringProperty
- class CfnBucketPropsMixin.TieringProperty(*, access_tier=None, days=None)
Bases:
objectThe S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without additional operational overhead.
- Parameters:
access_tier (
Optional[str]) –S3 Intelligent-Tiering access tier. See Storage class for automatically optimizing frequently and infrequently accessed objects for a list of access tiers in the S3 Intelligent-Tiering storage class.
days (
Union[int,float,None]) – The number of consecutive days of no access after which an object will be eligible to be transitioned to the corresponding tier. The minimum number of days specified for Archive Access tier must be at least 90 days and Deep Archive Access tier must be at least 180 days. The maximum can be up to 2 years (730 days).
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-tiering.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins tiering_property = s3_mixins.CfnBucketPropsMixin.TieringProperty( access_tier="accessTier", days=123 )
Attributes
- access_tier
S3 Intelligent-Tiering access tier.
See Storage class for automatically optimizing frequently and infrequently accessed objects for a list of access tiers in the S3 Intelligent-Tiering storage class.
- 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).
TopicConfigurationProperty
- class CfnBucketPropsMixin.TopicConfigurationProperty(*, event=None, filter=None, topic=None)
Bases:
objectA container for specifying the configuration for publication of messages to an Amazon Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events.
- Parameters:
event (
Optional[str]) –The Amazon S3 bucket event about which to send notifications. For more information, see Supported Event Types in the Amazon S3 User Guide .
filter (
Union[IResolvable,NotificationFilterProperty,Dict[str,Any],None]) – The filtering rules that determine for which objects to send notifications. For example, you can create a filter so that Amazon S3 sends notifications only when image files with a.jpgextension are added to the bucket.topic (
Optional[str]) – The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message when it detects events of the specified type.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins topic_configuration_property = s3_mixins.CfnBucketPropsMixin.TopicConfigurationProperty( event="event", filter=s3_mixins.CfnBucketPropsMixin.NotificationFilterProperty( s3_key=s3_mixins.CfnBucketPropsMixin.S3KeyFilterProperty( rules=[s3_mixins.CfnBucketPropsMixin.FilterRuleProperty( name="name", value="value" )] ) ), topic="topic" )
Attributes
- event
The Amazon S3 bucket event about which to send notifications.
For more information, see Supported Event Types in the Amazon S3 User Guide .
- 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
.jpgextension are added to the bucket.
- 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.
TransitionProperty
- class CfnBucketPropsMixin.TransitionProperty(*, storage_class=None, transition_date=None, transition_in_days=None)
Bases:
objectSpecifies when an object transitions to a specified storage class.
For more information about Amazon S3 lifecycle configuration rules, see Transitioning Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide .
- Parameters:
storage_class (
Optional[str]) – The storage class to which you want the object to transition.transition_date (
Union[datetime,IResolvable,None]) – Indicates when objects are transitioned to the specified storage class. The date value must be in ISO 8601 format. The time is always midnight UTC.transition_in_days (
Union[int,float,None]) – Indicates the number of days after creation when objects are transitioned to the specified storage class. If the specified storage class isINTELLIGENT_TIERING,GLACIER_IR,GLACIER, orDEEP_ARCHIVE, valid values are0or positive integers. If the specified storage class isSTANDARD_IAorONEZONE_IA, valid values are positive integers greater than30. Be aware that some storage classes have a minimum storage duration and that you’re charged for transitioning objects before their minimum storage duration. For more information, see Constraints and considerations for transitions in the Amazon S3 User Guide .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins transition_property = s3_mixins.CfnBucketPropsMixin.TransitionProperty( storage_class="storageClass", transition_date=Date(), transition_in_days=123 )
Attributes
- storage_class
The storage class to which you want the object to transition.
- 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.
- transition_in_days
Indicates the number of days after creation when objects are transitioned to the specified storage class.
If the specified storage class is
INTELLIGENT_TIERING,GLACIER_IR,GLACIER, orDEEP_ARCHIVE, valid values are0or positive integers. If the specified storage class isSTANDARD_IAorONEZONE_IA, valid values are positive integers greater than30. Be aware that some storage classes have a minimum storage duration and that you’re charged for transitioning objects before their minimum storage duration. For more information, see Constraints and considerations for transitions in the Amazon S3 User Guide .
VersioningConfigurationProperty
- class CfnBucketPropsMixin.VersioningConfigurationProperty(*, status=None)
Bases:
objectDescribes the versioning state of an Amazon S3 bucket.
For more information, see PUT Bucket versioning in the Amazon S3 API Reference .
Keep the following timing in mind when enabling, suspending, or transitioning between versioning states:
Enabling versioning - Changes may take up to 15 minutes to propagate across all AWS regions for full consistency.
Suspending versioning - Takes effect immediately with no propagation delay.
Transitioning between states - Any change from Suspended to Enabled has a 15-minute delay.
- Parameters:
status (
Optional[str]) – The versioning state of the bucket. Default: - “Suspended”- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins versioning_configuration_property = s3_mixins.CfnBucketPropsMixin.VersioningConfigurationProperty( status="status" )
Attributes
- status
The versioning state of the bucket.
WebsiteConfigurationProperty
- class CfnBucketPropsMixin.WebsiteConfigurationProperty(*, error_document=None, index_document=None, redirect_all_requests_to=None, routing_rules=None)
Bases:
objectSpecifies website configuration parameters for an Amazon S3 bucket.
- Parameters:
error_document (
Optional[str]) – The name of the error document for the website.index_document (
Optional[str]) – The name of the index document for the website.redirect_all_requests_to (
Union[IResolvable,RedirectAllRequestsToProperty,Dict[str,Any],None]) – The redirect behavior for every request to this bucket’s website endpoint. .. epigraph:: If you specify this property, you can’t specify any other property.routing_rules (
Union[IResolvable,Sequence[Union[IResolvable,RoutingRuleProperty,Dict[str,Any]]],None]) – Rules that define when a redirect is applied and the redirect behavior.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins website_configuration_property = s3_mixins.CfnBucketPropsMixin.WebsiteConfigurationProperty( error_document="errorDocument", index_document="indexDocument", redirect_all_requests_to=s3_mixins.CfnBucketPropsMixin.RedirectAllRequestsToProperty( host_name="hostName", protocol="protocol" ), routing_rules=[s3_mixins.CfnBucketPropsMixin.RoutingRuleProperty( redirect_rule=s3_mixins.CfnBucketPropsMixin.RedirectRuleProperty( host_name="hostName", http_redirect_code="httpRedirectCode", protocol="protocol", replace_key_prefix_with="replaceKeyPrefixWith", replace_key_with="replaceKeyWith" ), routing_rule_condition=s3_mixins.CfnBucketPropsMixin.RoutingRuleConditionProperty( http_error_code_returned_equals="httpErrorCodeReturnedEquals", key_prefix_equals="keyPrefixEquals" ) )] )
Attributes
- error_document
The name of the error document for the website.
- index_document
The name of the index document for the website.
- 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.
- routing_rules
Rules that define when a redirect is applied and the redirect behavior.