public static final class CfnBucketProps.Builder
extends java.lang.Object
CfnBucketProps
Constructor and Description |
---|
Builder() |
public CfnBucketProps.Builder accelerateConfiguration(IResolvable accelerateConfiguration)
CfnBucketProps.getAccelerateConfiguration()
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 .this
public CfnBucketProps.Builder accelerateConfiguration(CfnBucket.AccelerateConfigurationProperty accelerateConfiguration)
CfnBucketProps.getAccelerateConfiguration()
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 .this
public CfnBucketProps.Builder accessControl(java.lang.String accessControl)
CfnBucketProps.getAccessControl()
accessControl
- 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.
this
public CfnBucketProps.Builder analyticsConfigurations(IResolvable analyticsConfigurations)
CfnBucketProps.getAnalyticsConfigurations()
analyticsConfigurations
- Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket.this
public CfnBucketProps.Builder analyticsConfigurations(java.util.List<? extends java.lang.Object> analyticsConfigurations)
CfnBucketProps.getAnalyticsConfigurations()
analyticsConfigurations
- Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket.this
public CfnBucketProps.Builder bucketEncryption(IResolvable bucketEncryption)
CfnBucketProps.getBucketEncryption()
bucketEncryption
- 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 .this
public CfnBucketProps.Builder bucketEncryption(CfnBucket.BucketEncryptionProperty bucketEncryption)
CfnBucketProps.getBucketEncryption()
bucketEncryption
- 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 .this
public CfnBucketProps.Builder bucketName(java.lang.String bucketName)
CfnBucketProps.getBucketName()
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.
this
public CfnBucketProps.Builder corsConfiguration(IResolvable corsConfiguration)
CfnBucketProps.getCorsConfiguration()
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 .this
public CfnBucketProps.Builder corsConfiguration(CfnBucket.CorsConfigurationProperty corsConfiguration)
CfnBucketProps.getCorsConfiguration()
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 .this
public CfnBucketProps.Builder intelligentTieringConfigurations(IResolvable intelligentTieringConfigurations)
CfnBucketProps.getIntelligentTieringConfigurations()
intelligentTieringConfigurations
- Defines how Amazon S3 handles Intelligent-Tiering storage.this
public CfnBucketProps.Builder intelligentTieringConfigurations(java.util.List<? extends java.lang.Object> intelligentTieringConfigurations)
CfnBucketProps.getIntelligentTieringConfigurations()
intelligentTieringConfigurations
- Defines how Amazon S3 handles Intelligent-Tiering storage.this
public CfnBucketProps.Builder inventoryConfigurations(IResolvable inventoryConfigurations)
CfnBucketProps.getInventoryConfigurations()
inventoryConfigurations
- Specifies the inventory configuration for an Amazon S3 bucket.
For more information, see GET Bucket inventory in the Amazon S3 API Reference .this
public CfnBucketProps.Builder inventoryConfigurations(java.util.List<? extends java.lang.Object> inventoryConfigurations)
CfnBucketProps.getInventoryConfigurations()
inventoryConfigurations
- Specifies the inventory configuration for an Amazon S3 bucket.
For more information, see GET Bucket inventory in the Amazon S3 API Reference .this
public CfnBucketProps.Builder lifecycleConfiguration(IResolvable lifecycleConfiguration)
CfnBucketProps.getLifecycleConfiguration()
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 .this
public CfnBucketProps.Builder lifecycleConfiguration(CfnBucket.LifecycleConfigurationProperty lifecycleConfiguration)
CfnBucketProps.getLifecycleConfiguration()
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 .this
public CfnBucketProps.Builder loggingConfiguration(IResolvable loggingConfiguration)
CfnBucketProps.getLoggingConfiguration()
loggingConfiguration
- Settings that define where logs are stored.this
public CfnBucketProps.Builder loggingConfiguration(CfnBucket.LoggingConfigurationProperty loggingConfiguration)
CfnBucketProps.getLoggingConfiguration()
loggingConfiguration
- Settings that define where logs are stored.this
public CfnBucketProps.Builder metricsConfigurations(IResolvable metricsConfigurations)
CfnBucketProps.getMetricsConfigurations()
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 .this
public CfnBucketProps.Builder metricsConfigurations(java.util.List<? extends java.lang.Object> metricsConfigurations)
CfnBucketProps.getMetricsConfigurations()
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 .this
public CfnBucketProps.Builder notificationConfiguration(IResolvable notificationConfiguration)
CfnBucketProps.getNotificationConfiguration()
notificationConfiguration
- Configuration that defines how Amazon S3 handles bucket notifications.this
public CfnBucketProps.Builder notificationConfiguration(CfnBucket.NotificationConfigurationProperty notificationConfiguration)
CfnBucketProps.getNotificationConfiguration()
notificationConfiguration
- Configuration that defines how Amazon S3 handles bucket notifications.this
public CfnBucketProps.Builder objectLockConfiguration(IResolvable objectLockConfiguration)
CfnBucketProps.getObjectLockConfiguration()
objectLockConfiguration
- 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 only enable Object Lock for new buckets. If you want to turn on Object Lock for an existing bucket, contact AWS Support.
this
public CfnBucketProps.Builder objectLockConfiguration(CfnBucket.ObjectLockConfigurationProperty objectLockConfiguration)
CfnBucketProps.getObjectLockConfiguration()
objectLockConfiguration
- 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 only enable Object Lock for new buckets. If you want to turn on Object Lock for an existing bucket, contact AWS Support.
this
public CfnBucketProps.Builder objectLockEnabled(java.lang.Boolean objectLockEnabled)
CfnBucketProps.getObjectLockEnabled()
objectLockEnabled
- Indicates whether this bucket has an Object Lock configuration enabled.
Enable ObjectLockEnabled
when you apply ObjectLockConfiguration
to a bucket.this
public CfnBucketProps.Builder objectLockEnabled(IResolvable objectLockEnabled)
CfnBucketProps.getObjectLockEnabled()
objectLockEnabled
- Indicates whether this bucket has an Object Lock configuration enabled.
Enable ObjectLockEnabled
when you apply ObjectLockConfiguration
to a bucket.this
public CfnBucketProps.Builder ownershipControls(IResolvable ownershipControls)
CfnBucketProps.getOwnershipControls()
ownershipControls
- Configuration that defines how Amazon S3 handles Object Ownership rules.this
public CfnBucketProps.Builder ownershipControls(CfnBucket.OwnershipControlsProperty ownershipControls)
CfnBucketProps.getOwnershipControls()
ownershipControls
- Configuration that defines how Amazon S3 handles Object Ownership rules.this
public CfnBucketProps.Builder publicAccessBlockConfiguration(IResolvable publicAccessBlockConfiguration)
CfnBucketProps.getPublicAccessBlockConfiguration()
publicAccessBlockConfiguration
- Configuration that defines how Amazon S3 handles public access.this
public CfnBucketProps.Builder publicAccessBlockConfiguration(CfnBucket.PublicAccessBlockConfigurationProperty publicAccessBlockConfiguration)
CfnBucketProps.getPublicAccessBlockConfiguration()
publicAccessBlockConfiguration
- Configuration that defines how Amazon S3 handles public access.this
public CfnBucketProps.Builder replicationConfiguration(IResolvable replicationConfiguration)
CfnBucketProps.getReplicationConfiguration()
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.
this
public CfnBucketProps.Builder replicationConfiguration(CfnBucket.ReplicationConfigurationProperty replicationConfiguration)
CfnBucketProps.getReplicationConfiguration()
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.
this
public CfnBucketProps.Builder tags(java.util.List<? extends CfnTag> tags)
CfnBucketProps.getTags()
tags
- An arbitrary set of tags (key-value pairs) for this S3 bucket.this
public CfnBucketProps.Builder versioningConfiguration(IResolvable versioningConfiguration)
CfnBucketProps.getVersioningConfiguration()
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.this
public CfnBucketProps.Builder versioningConfiguration(CfnBucket.VersioningConfigurationProperty versioningConfiguration)
CfnBucketProps.getVersioningConfiguration()
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.this
public CfnBucketProps.Builder websiteConfiguration(IResolvable websiteConfiguration)
CfnBucketProps.getWebsiteConfiguration()
websiteConfiguration
- Information used to configure the bucket as a static website.
For more information, see Hosting Websites on Amazon S3 .this
public CfnBucketProps.Builder websiteConfiguration(CfnBucket.WebsiteConfigurationProperty websiteConfiguration)
CfnBucketProps.getWebsiteConfiguration()
websiteConfiguration
- Information used to configure the bucket as a static website.
For more information, see Hosting Websites on Amazon S3 .this
public CfnBucketProps build()
CfnBucketProps
java.lang.NullPointerException
- if any required attribute was not provided