CfnBucketProps

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

Bases: object

Properties for defining a CfnBucket.

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

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

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

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

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

  • cors_configuration (Union[IResolvable, CorsConfigurationProperty, Dict[str, Any], None]) – Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing in the Amazon S3 User Guide .

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

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

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

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

  • metrics_configurations (Union[IResolvable, Sequence[Union[IResolvable, MetricsConfigurationProperty, Dict[str, Any]]], None]) – Specifies a metrics configuration for the CloudWatch request metrics (specified by the metrics configuration ID) from an Amazon S3 bucket. If you’re updating an existing metrics configuration, note that this is a full replacement of the existing metrics configuration. If you don’t include the elements you want to keep, they are erased. For more information, see PutBucketMetricsConfiguration .

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

  • object_lock_configuration (Union[IResolvable, ObjectLockConfigurationProperty, Dict[str, Any], None]) – Places an Object Lock configuration on the specified bucket. The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket. For more information, see Locking Objects . .. epigraph:: - The DefaultRetention settings require both a mode and a period. - The DefaultRetention period can be either Days or Years but you must select one. You cannot specify Days and Years at the same time. - You can only enable Object Lock for new buckets. If you want to turn on Object Lock for an existing bucket, contact AWS Support.

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

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

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

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

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

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

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

Link:

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

ExampleMetadata:

infused

Example:

raw_bucket = s3.CfnBucket(self, "Bucket")
# -or-
raw_bucket_alt = my_bucket.node.default_child

# then
raw_bucket.cfn_options.condition = CfnCondition(self, "EnableBucket")
raw_bucket.cfn_options.metadata = {
    "metadata_key": "MetadataValue"
}

Attributes

accelerate_configuration

Configures the transfer acceleration state for an Amazon S3 bucket.

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

Link:

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

access_control

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

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

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

Link:

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

analytics_configurations

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

Link:

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

bucket_encryption

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

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

Link:

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

bucket_name

A name for the bucket.

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

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

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

cors_configuration

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

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

Link:

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

intelligent_tiering_configurations

Defines how Amazon S3 handles Intelligent-Tiering storage.

Link:

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

inventory_configurations

Specifies the inventory configuration for an Amazon S3 bucket.

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

Link:

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

lifecycle_configuration

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

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

Link:

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

logging_configuration

Settings that define where logs are stored.

Link:

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

metrics_configurations

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

If you’re updating an existing metrics configuration, note that this is a full replacement of the existing metrics configuration. If you don’t include the elements you want to keep, they are erased. For more information, see PutBucketMetricsConfiguration .

Link:

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

notification_configuration

Configuration that defines how Amazon S3 handles bucket notifications.

Link:

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

object_lock_configuration

Places an Object Lock configuration on the specified bucket.

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

- The ``DefaultRetention`` settings require both a mode and a period.
- The ``DefaultRetention`` period can be either ``Days`` or ``Years`` but you must select one. You cannot specify ``Days`` and ``Years`` at the same time.
- You can only enable Object Lock for new buckets. If you want to turn on Object Lock for an existing bucket, contact AWS Support.
Link:

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

object_lock_enabled

Indicates whether this bucket has an Object Lock configuration enabled.

Enable ObjectLockEnabled when you apply ObjectLockConfiguration to a bucket.

Link:

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

ownership_controls

Configuration that defines how Amazon S3 handles Object Ownership rules.

Link:

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

public_access_block_configuration

Configuration that defines how Amazon S3 handles public access.

Link:

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

replication_configuration

Configuration for replicating objects in an S3 bucket.

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

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

Link:

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

tags

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

Link:

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

versioning_configuration

Enables multiple versions of all objects in this bucket.

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

Link:

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

website_configuration

Information used to configure the bucket as a static website.

For more information, see Hosting Websites on Amazon S3 .

Link:

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