Class CfnBucket
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::S3::Bucket
.
The AWS::S3::Bucket
resource creates an Amazon S3 bucket in the same AWS Region where you create the AWS CloudFormation stack.
To control how AWS CloudFormation handles the bucket when the stack is deleted, you can set a deletion policy for your bucket. You can choose to retain the bucket or to delete the bucket. For more information, see DeletionPolicy Attribute .
You can only delete empty buckets. Deletion fails for buckets that have contents.
Example:
CfnInclude cfnTemplate; CfnBucket cfnBucket = (CfnBucket)cfnTemplate.getResource("Bucket"); Role role = Role.Builder.create(this, "Role") .assumedBy(new AnyPrincipal()) .build(); role.addToPolicy(PolicyStatement.Builder.create() .actions(List.of("s3:*")) .resources(List.of(cfnBucket.getAttrArn())) .build());
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Specifies the days since the initiation of an incomplete multipart upload that Amazon S3 will wait before permanently removing all parts of the upload.static interface
Configures the transfer acceleration state for an Amazon S3 bucket.static interface
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.static interface
Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket.static interface
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.static final class
A fluent builder forCfnBucket
.static interface
Describes the cross-origin access configuration for objects in an Amazon S3 bucket.static interface
Specifies a cross-origin access rule for an Amazon S3 bucket.static interface
Specifies how data related to the storage class analysis for an Amazon S3 bucket should be exported.static interface
The container element for specifying the default Object Lock retention settings for new objects placed in the specified bucket.static interface
Specifies whether Amazon S3 replicates delete markers.static interface
Specifies information about where to publish analysis or configuration results for an Amazon S3 bucket.static interface
Specifies encryption-related information for an Amazon S3 bucket that is a destination for replicated objects.static interface
Amazon S3 can send events to Amazon EventBridge whenever certain events happen in your bucket, see Using EventBridge in the Amazon S3 User Guide .static interface
Specifies the Amazon S3 object key name to filter on and whether to filter on the suffix or prefix of the key name.static interface
Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket.static interface
Specifies the inventory configuration for an Amazon S3 bucket.static interface
Describes the AWS Lambda functions to invoke and the events for which to invoke them.static interface
Specifies the lifecycle configuration for objects in an Amazon S3 bucket.static interface
Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket.static interface
Specifies a metrics configuration for the CloudWatch request metrics (specified by the metrics configuration ID) from an Amazon S3 bucket.static interface
A container specifying replication metrics-related settings enabling replication metrics and events.static interface
Specifies when noncurrent object versions expire.static interface
Container for the transition rule that describes when noncurrent objects transition to theSTANDARD_IA
,ONEZONE_IA
,INTELLIGENT_TIERING
,GLACIER_IR
,GLACIER
, orDEEP_ARCHIVE
storage class.static interface
Describes the notification configuration for an Amazon S3 bucket.static interface
Specifies object key name filtering rules.static interface
Places an Object Lock configuration on the specified bucket.static interface
Specifies the Object Lock rule for the specified object.static interface
Specifies the container element for Object Ownership rules.static interface
Specifies an Object Ownership rule.static interface
The PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket.static interface
Specifies the configuration for publishing messages to an Amazon Simple Queue Service (Amazon SQS) queue when Amazon S3 detects specified events.static interface
Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 bucket.static interface
Specifies how requests are redirected.static interface
A filter that you can specify for selection for modifications on replicas.static interface
A container for replication rules.static interface
A container for information about the replication destination and its configurations including enabling the S3 Replication Time Control (S3 RTC).static interface
A container for specifying rule filters.static interface
A filter that identifies the subset of objects to which the replication rule applies.static interface
Specifies which Amazon S3 objects to replicate and where to store the replicas.static interface
A container specifying S3 Replication Time Control (S3 RTC) related information, including whether S3 RTC is enabled and the time when all objects and operations on objects must be replicated.static interface
A container specifying the time value for S3 Replication Time Control (S3 RTC) and replication metricsEventThreshold
.static interface
A container for describing a condition that must be met for the specified redirect to apply.static interface
Specifies the redirect behavior and when a redirect is applied.static interface
Specifies lifecycle rules for an Amazon S3 bucket.static interface
A container for object key name prefix and suffix filtering rules.static interface
Describes the default server-side encryption to apply to new objects in the bucket.static interface
Specifies the default server-side encryption configuration.static interface
A container that describes additional filters for identifying the source objects that you want to replicate.static interface
A container for filter information for the selection of S3 objects encrypted with AWS KMS.static interface
Specifies data related to access patterns to be collected and made available to analyze the tradeoffs between different storage classes for an Amazon S3 bucket.static interface
Specifies tags to use to identify a subset of objects for an Amazon S3 bucket.static interface
The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without additional operational overhead.static interface
A container for specifying the configuration for publication of messages to an Amazon Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events.static interface
Specifies when an object transitions to a specified storage class.static interface
Describes the versioning state of an Amazon S3 bucket.static interface
Specifies website configuration parameters for an Amazon S3 bucket.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCreate a newAWS::S3::Bucket
.CfnBucket
(Construct scope, String id, CfnBucketProps props) Create a newAWS::S3::Bucket
.protected
CfnBucket
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnBucket
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionConfigures the transfer acceleration state for an Amazon S3 bucket.A canned access control list (ACL) that grants predefined permissions to the bucket.Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket.Returns the Amazon Resource Name (ARN) of the specified bucket.Returns the IPv4 DNS name of the specified bucket.Returns the IPv6 DNS name of the specified bucket.Returns the regional domain name of the specified bucket.Returns the Amazon S3 website endpoint for the specified bucket.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.A name for the bucket.Describes the cross-origin access configuration for objects in an Amazon S3 bucket.Defines how Amazon S3 handles Intelligent-Tiering storage.Specifies the inventory configuration for an Amazon S3 bucket.Specifies the lifecycle configuration for objects in an Amazon S3 bucket.Settings that define where logs are stored.Specifies a metrics configuration for the CloudWatch request metrics (specified by the metrics configuration ID) from an Amazon S3 bucket.Configuration that defines how Amazon S3 handles bucket notifications.Places an Object Lock configuration on the specified bucket.Indicates whether this bucket has an Object Lock configuration enabled.Configuration that defines how Amazon S3 handles Object Ownership rules.Configuration that defines how Amazon S3 handles public access.Configuration for replicating objects in an S3 bucket.getTags()
An arbitrary set of tags (key-value pairs) for this S3 bucket.Enables multiple versions of all objects in this bucket.Information used to configure the bucket as a static website.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
Configures the transfer acceleration state for an Amazon S3 bucket.void
Configures the transfer acceleration state for an Amazon S3 bucket.void
setAccessControl
(String value) A canned access control list (ACL) that grants predefined permissions to the bucket.void
setAnalyticsConfigurations
(List<Object> value) Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket.void
Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket.void
setBucketEncryption
(IResolvable value) 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.void
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.void
setBucketName
(String value) A name for the bucket.void
setCorsConfiguration
(IResolvable value) Describes the cross-origin access configuration for objects in an Amazon S3 bucket.void
Describes the cross-origin access configuration for objects in an Amazon S3 bucket.void
Defines how Amazon S3 handles Intelligent-Tiering storage.void
Defines how Amazon S3 handles Intelligent-Tiering storage.void
setInventoryConfigurations
(List<Object> value) Specifies the inventory configuration for an Amazon S3 bucket.void
Specifies the inventory configuration for an Amazon S3 bucket.void
Specifies the lifecycle configuration for objects in an Amazon S3 bucket.void
Specifies the lifecycle configuration for objects in an Amazon S3 bucket.void
Settings that define where logs are stored.void
Settings that define where logs are stored.void
setMetricsConfigurations
(List<Object> value) Specifies a metrics configuration for the CloudWatch request metrics (specified by the metrics configuration ID) from an Amazon S3 bucket.void
Specifies a metrics configuration for the CloudWatch request metrics (specified by the metrics configuration ID) from an Amazon S3 bucket.void
Configuration that defines how Amazon S3 handles bucket notifications.void
Configuration that defines how Amazon S3 handles bucket notifications.void
Places an Object Lock configuration on the specified bucket.void
Places an Object Lock configuration on the specified bucket.void
setObjectLockEnabled
(Boolean value) Indicates whether this bucket has an Object Lock configuration enabled.void
setObjectLockEnabled
(IResolvable value) Indicates whether this bucket has an Object Lock configuration enabled.void
setOwnershipControls
(IResolvable value) Configuration that defines how Amazon S3 handles Object Ownership rules.void
Configuration that defines how Amazon S3 handles Object Ownership rules.void
Configuration that defines how Amazon S3 handles public access.void
Configuration that defines how Amazon S3 handles public access.void
Configuration for replicating objects in an S3 bucket.void
Configuration for replicating objects in an S3 bucket.void
Enables multiple versions of all objects in this bucket.void
Enables multiple versions of all objects in this bucket.void
Information used to configure the bucket as a static website.void
Information used to configure the bucket as a static website.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnBucket
protected CfnBucket(software.amazon.jsii.JsiiObjectRef objRef) -
CfnBucket
protected CfnBucket(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnBucket
@Stability(Stable) public CfnBucket(@NotNull Construct scope, @NotNull String id, @Nullable CfnBucketProps props) Create a newAWS::S3::Bucket
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
CfnBucket
Create a newAWS::S3::Bucket
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrArn
Returns the Amazon Resource Name (ARN) of the specified bucket.Example:
arn:aws:s3:::DOC-EXAMPLE-BUCKET
-
getAttrDomainName
Returns the IPv4 DNS name of the specified bucket.Example:
DOC-EXAMPLE-BUCKET.s3.amazonaws.com
-
getAttrDualStackDomainName
Returns the IPv6 DNS name of the specified bucket.Example:
DOC-EXAMPLE-BUCKET.s3.dualstack.us-east-2.amazonaws.com
For more information about dual-stack endpoints, see Using Amazon S3 Dual-Stack Endpoints .
-
getAttrRegionalDomainName
Returns the regional domain name of the specified bucket.Example:
DOC-EXAMPLE-BUCKET.s3.us-east-2.amazonaws.com
-
getAttrWebsiteUrl
Returns the Amazon S3 website endpoint for the specified bucket.Example (IPv4):
http://DOC-EXAMPLE-BUCKET.s3-website.us-east-2.amazonaws.com
Example (IPv6):
http://DOC-EXAMPLE-BUCKET.s3.dualstack.us-east-2.amazonaws.com
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
An arbitrary set of tags (key-value pairs) for this S3 bucket. -
getAccelerateConfiguration
Configures the transfer acceleration state for an Amazon S3 bucket.For more information, see Amazon S3 Transfer Acceleration in the Amazon S3 User Guide .
-
setAccelerateConfiguration
Configures the transfer acceleration state for an Amazon S3 bucket.For more information, see Amazon S3 Transfer Acceleration in the Amazon S3 User Guide .
-
setAccelerateConfiguration
@Stability(Stable) public void setAccelerateConfiguration(@Nullable CfnBucket.AccelerateConfigurationProperty value) Configures the transfer acceleration state for an Amazon S3 bucket.For more information, see Amazon S3 Transfer Acceleration in the Amazon S3 User Guide .
-
getAccessControl
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.
-
setAccessControl
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.
-
getAnalyticsConfigurations
Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket. -
setAnalyticsConfigurations
Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket. -
setAnalyticsConfigurations
Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket. -
getBucketEncryption
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 .
-
setBucketEncryption
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 .
-
setBucketEncryption
@Stability(Stable) public void setBucketEncryption(@Nullable CfnBucket.BucketEncryptionProperty value) 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 .
-
getBucketName
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.
-
setBucketName
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.
-
getCorsConfiguration
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 .
-
setCorsConfiguration
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 .
-
setCorsConfiguration
@Stability(Stable) public void setCorsConfiguration(@Nullable CfnBucket.CorsConfigurationProperty value) 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 .
-
getIntelligentTieringConfigurations
Defines how Amazon S3 handles Intelligent-Tiering storage. -
setIntelligentTieringConfigurations
Defines how Amazon S3 handles Intelligent-Tiering storage. -
setIntelligentTieringConfigurations
Defines how Amazon S3 handles Intelligent-Tiering storage. -
getInventoryConfigurations
Specifies the inventory configuration for an Amazon S3 bucket.For more information, see GET Bucket inventory in the Amazon S3 API Reference .
-
setInventoryConfigurations
Specifies the inventory configuration for an Amazon S3 bucket.For more information, see GET Bucket inventory in the Amazon S3 API Reference .
-
setInventoryConfigurations
Specifies the inventory configuration for an Amazon S3 bucket.For more information, see GET Bucket inventory in the Amazon S3 API Reference .
-
getLifecycleConfiguration
Specifies the lifecycle configuration for objects in an Amazon S3 bucket.For more information, see Object Lifecycle Management in the Amazon S3 User Guide .
-
setLifecycleConfiguration
Specifies the lifecycle configuration for objects in an Amazon S3 bucket.For more information, see Object Lifecycle Management in the Amazon S3 User Guide .
-
setLifecycleConfiguration
@Stability(Stable) public void setLifecycleConfiguration(@Nullable CfnBucket.LifecycleConfigurationProperty value) Specifies the lifecycle configuration for objects in an Amazon S3 bucket.For more information, see Object Lifecycle Management in the Amazon S3 User Guide .
-
getLoggingConfiguration
Settings that define where logs are stored. -
setLoggingConfiguration
Settings that define where logs are stored. -
setLoggingConfiguration
@Stability(Stable) public void setLoggingConfiguration(@Nullable CfnBucket.LoggingConfigurationProperty value) Settings that define where logs are stored. -
getMetricsConfigurations
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 .
-
setMetricsConfigurations
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 .
-
setMetricsConfigurations
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 .
-
getNotificationConfiguration
Configuration that defines how Amazon S3 handles bucket notifications. -
setNotificationConfiguration
Configuration that defines how Amazon S3 handles bucket notifications. -
setNotificationConfiguration
@Stability(Stable) public void setNotificationConfiguration(@Nullable CfnBucket.NotificationConfigurationProperty value) Configuration that defines how Amazon S3 handles bucket notifications. -
getObjectLockConfiguration
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.
- The
-
setObjectLockConfiguration
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.
- The
-
setObjectLockConfiguration
@Stability(Stable) public void setObjectLockConfiguration(@Nullable CfnBucket.ObjectLockConfigurationProperty value) 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.
- The
-
getObjectLockEnabled
Indicates whether this bucket has an Object Lock configuration enabled.Enable
ObjectLockEnabled
when you applyObjectLockConfiguration
to a bucket. -
setObjectLockEnabled
Indicates whether this bucket has an Object Lock configuration enabled.Enable
ObjectLockEnabled
when you applyObjectLockConfiguration
to a bucket. -
setObjectLockEnabled
Indicates whether this bucket has an Object Lock configuration enabled.Enable
ObjectLockEnabled
when you applyObjectLockConfiguration
to a bucket. -
getOwnershipControls
Configuration that defines how Amazon S3 handles Object Ownership rules. -
setOwnershipControls
Configuration that defines how Amazon S3 handles Object Ownership rules. -
setOwnershipControls
@Stability(Stable) public void setOwnershipControls(@Nullable CfnBucket.OwnershipControlsProperty value) Configuration that defines how Amazon S3 handles Object Ownership rules. -
getPublicAccessBlockConfiguration
Configuration that defines how Amazon S3 handles public access. -
setPublicAccessBlockConfiguration
Configuration that defines how Amazon S3 handles public access. -
setPublicAccessBlockConfiguration
@Stability(Stable) public void setPublicAccessBlockConfiguration(@Nullable CfnBucket.PublicAccessBlockConfigurationProperty value) Configuration that defines how Amazon S3 handles public access. -
getReplicationConfiguration
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.
-
setReplicationConfiguration
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.
-
setReplicationConfiguration
@Stability(Stable) public void setReplicationConfiguration(@Nullable CfnBucket.ReplicationConfigurationProperty value) 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.
-
getVersioningConfiguration
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.
-
setVersioningConfiguration
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.
-
setVersioningConfiguration
@Stability(Stable) public void setVersioningConfiguration(@Nullable CfnBucket.VersioningConfigurationProperty value) 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.
-
getWebsiteConfiguration
Information used to configure the bucket as a static website.For more information, see Hosting Websites on Amazon S3 .
-
setWebsiteConfiguration
Information used to configure the bucket as a static website.For more information, see Hosting Websites on Amazon S3 .
-
setWebsiteConfiguration
@Stability(Stable) public void setWebsiteConfiguration(@Nullable CfnBucket.WebsiteConfigurationProperty value) Information used to configure the bucket as a static website.For more information, see Hosting Websites on Amazon S3 .
-