Class CfnBucket.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnBucket>
- Enclosing class:
CfnBucket
CfnBucket
.-
Method Summary
Modifier and TypeMethodDescriptionaccelerateConfiguration
(IResolvable accelerateConfiguration) Configures the transfer acceleration state for an Amazon S3 bucket.accelerateConfiguration
(CfnBucket.AccelerateConfigurationProperty accelerateConfiguration) Configures the transfer acceleration state for an Amazon S3 bucket.accessControl
(String accessControl) analyticsConfigurations
(List<? extends Object> analyticsConfigurations) Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket.analyticsConfigurations
(IResolvable analyticsConfigurations) Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket.bucketEncryption
(IResolvable bucketEncryption) Specifies default encryption for a bucket using server-side encryption with Amazon S3-managed keys (SSE-S3), AWS KMS-managed keys (SSE-KMS), or dual-layer server-side encryption with KMS-managed keys (DSSE-KMS).bucketEncryption
(CfnBucket.BucketEncryptionProperty bucketEncryption) Specifies default encryption for a bucket using server-side encryption with Amazon S3-managed keys (SSE-S3), AWS KMS-managed keys (SSE-KMS), or dual-layer server-side encryption with KMS-managed keys (DSSE-KMS).bucketName
(String bucketName) A name for the bucket.build()
corsConfiguration
(IResolvable corsConfiguration) Describes the cross-origin access configuration for objects in an Amazon S3 bucket.corsConfiguration
(CfnBucket.CorsConfigurationProperty corsConfiguration) Describes the cross-origin access configuration for objects in an Amazon S3 bucket.static CfnBucket.Builder
intelligentTieringConfigurations
(List<? extends Object> intelligentTieringConfigurations) Defines how Amazon S3 handles Intelligent-Tiering storage.intelligentTieringConfigurations
(IResolvable intelligentTieringConfigurations) Defines how Amazon S3 handles Intelligent-Tiering storage.inventoryConfigurations
(List<? extends Object> inventoryConfigurations) Specifies the inventory configuration for an Amazon S3 bucket.inventoryConfigurations
(IResolvable inventoryConfigurations) Specifies the inventory configuration for an Amazon S3 bucket.lifecycleConfiguration
(IResolvable lifecycleConfiguration) Specifies the lifecycle configuration for objects in an Amazon S3 bucket.lifecycleConfiguration
(CfnBucket.LifecycleConfigurationProperty lifecycleConfiguration) Specifies the lifecycle configuration for objects in an Amazon S3 bucket.loggingConfiguration
(IResolvable loggingConfiguration) Settings that define where logs are stored.loggingConfiguration
(CfnBucket.LoggingConfigurationProperty loggingConfiguration) Settings that define where logs are stored.metricsConfigurations
(List<? extends Object> metricsConfigurations) Specifies a metrics configuration for the CloudWatch request metrics (specified by the metrics configuration ID) from an Amazon S3 bucket.metricsConfigurations
(IResolvable metricsConfigurations) Specifies a metrics configuration for the CloudWatch request metrics (specified by the metrics configuration ID) from an Amazon S3 bucket.notificationConfiguration
(IResolvable notificationConfiguration) Configuration that defines how Amazon S3 handles bucket notifications.notificationConfiguration
(CfnBucket.NotificationConfigurationProperty notificationConfiguration) Configuration that defines how Amazon S3 handles bucket notifications.objectLockConfiguration
(IResolvable objectLockConfiguration) objectLockConfiguration
(CfnBucket.ObjectLockConfigurationProperty objectLockConfiguration) objectLockEnabled
(Boolean objectLockEnabled) Indicates whether this bucket has an Object Lock configuration enabled.objectLockEnabled
(IResolvable objectLockEnabled) Indicates whether this bucket has an Object Lock configuration enabled.ownershipControls
(IResolvable ownershipControls) Configuration that defines how Amazon S3 handles Object Ownership rules.ownershipControls
(CfnBucket.OwnershipControlsProperty ownershipControls) Configuration that defines how Amazon S3 handles Object Ownership rules.publicAccessBlockConfiguration
(IResolvable publicAccessBlockConfiguration) Configuration that defines how Amazon S3 handles public access.publicAccessBlockConfiguration
(CfnBucket.PublicAccessBlockConfigurationProperty publicAccessBlockConfiguration) Configuration that defines how Amazon S3 handles public access.replicationConfiguration
(IResolvable replicationConfiguration) Configuration for replicating objects in an S3 bucket.replicationConfiguration
(CfnBucket.ReplicationConfigurationProperty replicationConfiguration) Configuration for replicating objects in an S3 bucket.An arbitrary set of tags (key-value pairs) for this S3 bucket.versioningConfiguration
(IResolvable versioningConfiguration) Enables multiple versions of all objects in this bucket.versioningConfiguration
(CfnBucket.VersioningConfigurationProperty versioningConfiguration) Enables multiple versions of all objects in this bucket.websiteConfiguration
(IResolvable websiteConfiguration) Information used to configure the bucket as a static website.websiteConfiguration
(CfnBucket.WebsiteConfigurationProperty websiteConfiguration) Information used to configure the bucket as a static website.
-
Method Details
-
create
@Stability(Stable) public static CfnBucket.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.- Returns:
- a new instance of
CfnBucket.Builder
.
-
accelerateConfiguration
@Stability(Stable) public CfnBucket.Builder accelerateConfiguration(IResolvable accelerateConfiguration) Configures the transfer acceleration state for an Amazon S3 bucket.For more information, see Amazon S3 Transfer Acceleration in the Amazon S3 User Guide .
- Parameters:
accelerateConfiguration
- Configures the transfer acceleration state for an Amazon S3 bucket. This parameter is required.- Returns:
this
- See Also:
-
accelerateConfiguration
@Stability(Stable) public CfnBucket.Builder accelerateConfiguration(CfnBucket.AccelerateConfigurationProperty accelerateConfiguration) Configures the transfer acceleration state for an Amazon S3 bucket.For more information, see Amazon S3 Transfer Acceleration in the Amazon S3 User Guide .
- Parameters:
accelerateConfiguration
- Configures the transfer acceleration state for an Amazon S3 bucket. This parameter is required.- Returns:
this
- See Also:
-
accessControl
This is a legacy property, and it is not recommended for most use cases.
A majority of modern use cases in Amazon S3 no longer require the use of ACLs, and we recommend that you keep ACLs disabled. For more information, see Controlling object ownership in the Amazon S3 User Guide .
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 .
S3 buckets are created with ACLs disabled by default. Therefore, unless you explicitly set the AWS::S3::OwnershipControls property to enable ACLs, your resource will fail to deploy with any value other than Private. Use cases requiring ACLs are uncommon.
The majority of access control configurations can be successfully and more easily achieved with bucket policies. For more information, see AWS::S3::BucketPolicy . For examples of common policy configurations, including S3 Server Access Logs buckets and more, see Bucket policy examples in the Amazon S3 User Guide .
- Parameters:
accessControl
-
This parameter is required.This is a legacy property, and it is not recommended for most use cases.
- Returns:
this
- See Also:
-
analyticsConfigurations
@Stability(Stable) public CfnBucket.Builder analyticsConfigurations(IResolvable analyticsConfigurations) Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket.- Parameters:
analyticsConfigurations
- Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket. This parameter is required.- Returns:
this
- See Also:
-
analyticsConfigurations
@Stability(Stable) public CfnBucket.Builder analyticsConfigurations(List<? extends Object> analyticsConfigurations) Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket.- Parameters:
analyticsConfigurations
- Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket. This parameter is required.- Returns:
this
- See Also:
-
bucketEncryption
Specifies default encryption for a bucket using server-side encryption with Amazon S3-managed keys (SSE-S3), AWS KMS-managed keys (SSE-KMS), or dual-layer server-side encryption with KMS-managed keys (DSSE-KMS).For information about the Amazon S3 default encryption feature, see Amazon S3 Default Encryption for S3 Buckets in the Amazon S3 User Guide .
- Parameters:
bucketEncryption
- Specifies default encryption for a bucket using server-side encryption with Amazon S3-managed keys (SSE-S3), AWS KMS-managed keys (SSE-KMS), or dual-layer server-side encryption with KMS-managed keys (DSSE-KMS). This parameter is required.- Returns:
this
- See Also:
-
bucketEncryption
@Stability(Stable) public CfnBucket.Builder bucketEncryption(CfnBucket.BucketEncryptionProperty bucketEncryption) Specifies default encryption for a bucket using server-side encryption with Amazon S3-managed keys (SSE-S3), AWS KMS-managed keys (SSE-KMS), or dual-layer server-side encryption with KMS-managed keys (DSSE-KMS).For information about the Amazon S3 default encryption feature, see Amazon S3 Default Encryption for S3 Buckets in the Amazon S3 User Guide .
- Parameters:
bucketEncryption
- Specifies default encryption for a bucket using server-side encryption with Amazon S3-managed keys (SSE-S3), AWS KMS-managed keys (SSE-KMS), or dual-layer server-side encryption with KMS-managed keys (DSSE-KMS). This parameter is required.- Returns:
this
- See Also:
-
bucketName
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 .
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.
- Parameters:
bucketName
- A name for the bucket. This parameter is required.- Returns:
this
- See Also:
-
corsConfiguration
Describes the cross-origin access configuration for objects in an Amazon S3 bucket.For more information, see Enabling Cross-Origin Resource Sharing in the Amazon S3 User Guide .
- Parameters:
corsConfiguration
- Describes the cross-origin access configuration for objects in an Amazon S3 bucket. This parameter is required.- Returns:
this
- See Also:
-
corsConfiguration
@Stability(Stable) public CfnBucket.Builder corsConfiguration(CfnBucket.CorsConfigurationProperty corsConfiguration) Describes the cross-origin access configuration for objects in an Amazon S3 bucket.For more information, see Enabling Cross-Origin Resource Sharing in the Amazon S3 User Guide .
- Parameters:
corsConfiguration
- Describes the cross-origin access configuration for objects in an Amazon S3 bucket. This parameter is required.- Returns:
this
- See Also:
-
intelligentTieringConfigurations
@Stability(Stable) public CfnBucket.Builder intelligentTieringConfigurations(IResolvable intelligentTieringConfigurations) Defines how Amazon S3 handles Intelligent-Tiering storage.- Parameters:
intelligentTieringConfigurations
- Defines how Amazon S3 handles Intelligent-Tiering storage. This parameter is required.- Returns:
this
- See Also:
-
intelligentTieringConfigurations
@Stability(Stable) public CfnBucket.Builder intelligentTieringConfigurations(List<? extends Object> intelligentTieringConfigurations) Defines how Amazon S3 handles Intelligent-Tiering storage.- Parameters:
intelligentTieringConfigurations
- Defines how Amazon S3 handles Intelligent-Tiering storage. This parameter is required.- Returns:
this
- See Also:
-
inventoryConfigurations
@Stability(Stable) public CfnBucket.Builder inventoryConfigurations(IResolvable inventoryConfigurations) Specifies the inventory configuration for an Amazon S3 bucket.For more information, see GET Bucket inventory in the Amazon S3 API Reference .
- Parameters:
inventoryConfigurations
- Specifies the inventory configuration for an Amazon S3 bucket. This parameter is required.- Returns:
this
- See Also:
-
inventoryConfigurations
@Stability(Stable) public CfnBucket.Builder inventoryConfigurations(List<? extends Object> inventoryConfigurations) Specifies the inventory configuration for an Amazon S3 bucket.For more information, see GET Bucket inventory in the Amazon S3 API Reference .
- Parameters:
inventoryConfigurations
- Specifies the inventory configuration for an Amazon S3 bucket. This parameter is required.- Returns:
this
- See Also:
-
lifecycleConfiguration
@Stability(Stable) public CfnBucket.Builder lifecycleConfiguration(IResolvable lifecycleConfiguration) Specifies the lifecycle configuration for objects in an Amazon S3 bucket.For more information, see Object Lifecycle Management in the Amazon S3 User Guide .
- Parameters:
lifecycleConfiguration
- Specifies the lifecycle configuration for objects in an Amazon S3 bucket. This parameter is required.- Returns:
this
- See Also:
-
lifecycleConfiguration
@Stability(Stable) public CfnBucket.Builder lifecycleConfiguration(CfnBucket.LifecycleConfigurationProperty lifecycleConfiguration) Specifies the lifecycle configuration for objects in an Amazon S3 bucket.For more information, see Object Lifecycle Management in the Amazon S3 User Guide .
- Parameters:
lifecycleConfiguration
- Specifies the lifecycle configuration for objects in an Amazon S3 bucket. This parameter is required.- Returns:
this
- See Also:
-
loggingConfiguration
Settings that define where logs are stored.- Parameters:
loggingConfiguration
- Settings that define where logs are stored. This parameter is required.- Returns:
this
- See Also:
-
loggingConfiguration
@Stability(Stable) public CfnBucket.Builder loggingConfiguration(CfnBucket.LoggingConfigurationProperty loggingConfiguration) Settings that define where logs are stored.- Parameters:
loggingConfiguration
- Settings that define where logs are stored. This parameter is required.- Returns:
this
- See Also:
-
metricsConfigurations
@Stability(Stable) public CfnBucket.Builder metricsConfigurations(IResolvable metricsConfigurations) 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 .
- Parameters:
metricsConfigurations
- Specifies a metrics configuration for the CloudWatch request metrics (specified by the metrics configuration ID) from an Amazon S3 bucket. This parameter is required.- Returns:
this
- See Also:
-
metricsConfigurations
@Stability(Stable) public CfnBucket.Builder metricsConfigurations(List<? extends Object> metricsConfigurations) 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 .
- Parameters:
metricsConfigurations
- Specifies a metrics configuration for the CloudWatch request metrics (specified by the metrics configuration ID) from an Amazon S3 bucket. This parameter is required.- Returns:
this
- See Also:
-
notificationConfiguration
@Stability(Stable) public CfnBucket.Builder notificationConfiguration(IResolvable notificationConfiguration) Configuration that defines how Amazon S3 handles bucket notifications.- Parameters:
notificationConfiguration
- Configuration that defines how Amazon S3 handles bucket notifications. This parameter is required.- Returns:
this
- See Also:
-
notificationConfiguration
@Stability(Stable) public CfnBucket.Builder notificationConfiguration(CfnBucket.NotificationConfigurationProperty notificationConfiguration) Configuration that defines how Amazon S3 handles bucket notifications.- Parameters:
notificationConfiguration
- Configuration that defines how Amazon S3 handles bucket notifications. This parameter is required.- Returns:
this
- See Also:
-
objectLockConfiguration
@Stability(Stable) public CfnBucket.Builder objectLockConfiguration(IResolvable objectLockConfiguration) This operation is not supported by directory buckets.
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 .
- The
DefaultRetention
settings require both a mode and a period. - The
DefaultRetention
period can be eitherDays
orYears
but you must select one. You cannot specifyDays
andYears
at the same time. - You can enable Object Lock for new or existing buckets. For more information, see Configuring Object Lock .
- Parameters:
objectLockConfiguration
-
This parameter is required.This operation is not supported by directory buckets.
- Returns:
this
- See Also:
- The
-
objectLockConfiguration
@Stability(Stable) public CfnBucket.Builder objectLockConfiguration(CfnBucket.ObjectLockConfigurationProperty objectLockConfiguration) This operation is not supported by directory buckets.
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 .
- The
DefaultRetention
settings require both a mode and a period. - The
DefaultRetention
period can be eitherDays
orYears
but you must select one. You cannot specifyDays
andYears
at the same time. - You can enable Object Lock for new or existing buckets. For more information, see Configuring Object Lock .
- Parameters:
objectLockConfiguration
-
This parameter is required.This operation is not supported by directory buckets.
- Returns:
this
- See Also:
- The
-
objectLockEnabled
Indicates whether this bucket has an Object Lock configuration enabled.Enable
ObjectLockEnabled
when you applyObjectLockConfiguration
to a bucket.- Parameters:
objectLockEnabled
- Indicates whether this bucket has an Object Lock configuration enabled. This parameter is required.- Returns:
this
- See Also:
-
objectLockEnabled
Indicates whether this bucket has an Object Lock configuration enabled.Enable
ObjectLockEnabled
when you applyObjectLockConfiguration
to a bucket.- Parameters:
objectLockEnabled
- Indicates whether this bucket has an Object Lock configuration enabled. This parameter is required.- Returns:
this
- See Also:
-
ownershipControls
Configuration that defines how Amazon S3 handles Object Ownership rules.- Parameters:
ownershipControls
- Configuration that defines how Amazon S3 handles Object Ownership rules. This parameter is required.- Returns:
this
- See Also:
-
ownershipControls
@Stability(Stable) public CfnBucket.Builder ownershipControls(CfnBucket.OwnershipControlsProperty ownershipControls) Configuration that defines how Amazon S3 handles Object Ownership rules.- Parameters:
ownershipControls
- Configuration that defines how Amazon S3 handles Object Ownership rules. This parameter is required.- Returns:
this
- See Also:
-
publicAccessBlockConfiguration
@Stability(Stable) public CfnBucket.Builder publicAccessBlockConfiguration(IResolvable publicAccessBlockConfiguration) Configuration that defines how Amazon S3 handles public access.- Parameters:
publicAccessBlockConfiguration
- Configuration that defines how Amazon S3 handles public access. This parameter is required.- Returns:
this
- See Also:
-
publicAccessBlockConfiguration
@Stability(Stable) public CfnBucket.Builder publicAccessBlockConfiguration(CfnBucket.PublicAccessBlockConfigurationProperty publicAccessBlockConfiguration) Configuration that defines how Amazon S3 handles public access.- Parameters:
publicAccessBlockConfiguration
- Configuration that defines how Amazon S3 handles public access. This parameter is required.- Returns:
this
- See Also:
-
replicationConfiguration
@Stability(Stable) public CfnBucket.Builder replicationConfiguration(IResolvable replicationConfiguration) 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.
- Parameters:
replicationConfiguration
- Configuration for replicating objects in an S3 bucket. This parameter is required.- Returns:
this
- See Also:
-
replicationConfiguration
@Stability(Stable) public CfnBucket.Builder replicationConfiguration(CfnBucket.ReplicationConfigurationProperty replicationConfiguration) 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.
- Parameters:
replicationConfiguration
- Configuration for replicating objects in an S3 bucket. This parameter is required.- Returns:
this
- See Also:
-
tags
An arbitrary set of tags (key-value pairs) for this S3 bucket.- Parameters:
tags
- An arbitrary set of tags (key-value pairs) for this S3 bucket. This parameter is required.- Returns:
this
- See Also:
-
versioningConfiguration
@Stability(Stable) public CfnBucket.Builder versioningConfiguration(IResolvable versioningConfiguration) 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.
When you enable versioning on a bucket for the first time, it might take a short amount of time for the change to be fully propagated. We recommend that you wait for 15 minutes after enabling versioning before issuing write operations (
PUT
orDELETE
) on objects in the bucket.- Parameters:
versioningConfiguration
- Enables multiple versions of all objects in this bucket. This parameter is required.- Returns:
this
- See Also:
-
versioningConfiguration
@Stability(Stable) public CfnBucket.Builder versioningConfiguration(CfnBucket.VersioningConfigurationProperty versioningConfiguration) 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.
When you enable versioning on a bucket for the first time, it might take a short amount of time for the change to be fully propagated. We recommend that you wait for 15 minutes after enabling versioning before issuing write operations (
PUT
orDELETE
) on objects in the bucket.- Parameters:
versioningConfiguration
- Enables multiple versions of all objects in this bucket. This parameter is required.- Returns:
this
- See Also:
-
websiteConfiguration
Information used to configure the bucket as a static website.For more information, see Hosting Websites on Amazon S3 .
- Parameters:
websiteConfiguration
- Information used to configure the bucket as a static website. This parameter is required.- Returns:
this
- See Also:
-
websiteConfiguration
@Stability(Stable) public CfnBucket.Builder websiteConfiguration(CfnBucket.WebsiteConfigurationProperty websiteConfiguration) Information used to configure the bucket as a static website.For more information, see Hosting Websites on Amazon S3 .
- Parameters:
websiteConfiguration
- Information used to configure the bucket as a static website. This parameter is required.- Returns:
this
- See Also:
-
build
-