Class CfnBucket.RuleProperty.Builder
java.lang.Object
software.amazon.awscdk.services.s3.CfnBucket.RuleProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnBucket.RuleProperty>
- Enclosing interface:
CfnBucket.RuleProperty
@Stability(Stable)
public static final class CfnBucket.RuleProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnBucket.RuleProperty>
A builder for
CfnBucket.RuleProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabortIncompleteMultipartUpload
(IResolvable abortIncompleteMultipartUpload) Sets the value ofCfnBucket.RuleProperty.getAbortIncompleteMultipartUpload()
abortIncompleteMultipartUpload
(CfnBucket.AbortIncompleteMultipartUploadProperty abortIncompleteMultipartUpload) Sets the value ofCfnBucket.RuleProperty.getAbortIncompleteMultipartUpload()
build()
Builds the configured instance.expirationDate
(Instant expirationDate) Sets the value ofCfnBucket.RuleProperty.getExpirationDate()
expirationDate
(IResolvable expirationDate) Sets the value ofCfnBucket.RuleProperty.getExpirationDate()
expirationInDays
(Number expirationInDays) Sets the value ofCfnBucket.RuleProperty.getExpirationInDays()
expiredObjectDeleteMarker
(Boolean expiredObjectDeleteMarker) Sets the value ofCfnBucket.RuleProperty.getExpiredObjectDeleteMarker()
expiredObjectDeleteMarker
(IResolvable expiredObjectDeleteMarker) Sets the value ofCfnBucket.RuleProperty.getExpiredObjectDeleteMarker()
Sets the value ofCfnBucket.RuleProperty.getId()
noncurrentVersionExpiration
(IResolvable noncurrentVersionExpiration) Sets the value ofCfnBucket.RuleProperty.getNoncurrentVersionExpiration()
noncurrentVersionExpiration
(CfnBucket.NoncurrentVersionExpirationProperty noncurrentVersionExpiration) Sets the value ofCfnBucket.RuleProperty.getNoncurrentVersionExpiration()
noncurrentVersionExpirationInDays
(Number noncurrentVersionExpirationInDays) Sets the value ofCfnBucket.RuleProperty.getNoncurrentVersionExpirationInDays()
noncurrentVersionTransition
(IResolvable noncurrentVersionTransition) Sets the value ofCfnBucket.RuleProperty.getNoncurrentVersionTransition()
noncurrentVersionTransition
(CfnBucket.NoncurrentVersionTransitionProperty noncurrentVersionTransition) Sets the value ofCfnBucket.RuleProperty.getNoncurrentVersionTransition()
noncurrentVersionTransitions
(List<? extends Object> noncurrentVersionTransitions) Sets the value ofCfnBucket.RuleProperty.getNoncurrentVersionTransitions()
noncurrentVersionTransitions
(IResolvable noncurrentVersionTransitions) Sets the value ofCfnBucket.RuleProperty.getNoncurrentVersionTransitions()
objectSizeGreaterThan
(Number objectSizeGreaterThan) Sets the value ofCfnBucket.RuleProperty.getObjectSizeGreaterThan()
objectSizeLessThan
(Number objectSizeLessThan) Sets the value ofCfnBucket.RuleProperty.getObjectSizeLessThan()
Sets the value ofCfnBucket.RuleProperty.getPrefix()
Sets the value ofCfnBucket.RuleProperty.getStatus()
tagFilters
(List<? extends Object> tagFilters) Sets the value ofCfnBucket.RuleProperty.getTagFilters()
tagFilters
(IResolvable tagFilters) Sets the value ofCfnBucket.RuleProperty.getTagFilters()
transition
(IResolvable transition) Sets the value ofCfnBucket.RuleProperty.getTransition()
transition
(CfnBucket.TransitionProperty transition) Sets the value ofCfnBucket.RuleProperty.getTransition()
transitions
(List<? extends Object> transitions) Sets the value ofCfnBucket.RuleProperty.getTransitions()
transitions
(IResolvable transitions) Sets the value ofCfnBucket.RuleProperty.getTransitions()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
status
Sets the value ofCfnBucket.RuleProperty.getStatus()
- Parameters:
status
- IfEnabled
, the rule is currently being applied. This parameter is required. IfDisabled
, the rule is not currently being applied.- Returns:
this
-
abortIncompleteMultipartUpload
@Stability(Stable) public CfnBucket.RuleProperty.Builder abortIncompleteMultipartUpload(IResolvable abortIncompleteMultipartUpload) Sets the value ofCfnBucket.RuleProperty.getAbortIncompleteMultipartUpload()
- Parameters:
abortIncompleteMultipartUpload
- Specifies a lifecycle rule that stops incomplete multipart uploads to an Amazon S3 bucket.- Returns:
this
-
abortIncompleteMultipartUpload
@Stability(Stable) public CfnBucket.RuleProperty.Builder abortIncompleteMultipartUpload(CfnBucket.AbortIncompleteMultipartUploadProperty abortIncompleteMultipartUpload) Sets the value ofCfnBucket.RuleProperty.getAbortIncompleteMultipartUpload()
- Parameters:
abortIncompleteMultipartUpload
- Specifies a lifecycle rule that stops incomplete multipart uploads to an Amazon S3 bucket.- Returns:
this
-
expirationDate
Sets the value ofCfnBucket.RuleProperty.getExpirationDate()
- Parameters:
expirationDate
- 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.- Returns:
this
-
expirationDate
Sets the value ofCfnBucket.RuleProperty.getExpirationDate()
- Parameters:
expirationDate
- 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.- Returns:
this
-
expirationInDays
Sets the value ofCfnBucket.RuleProperty.getExpirationInDays()
- Parameters:
expirationInDays
- 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.- Returns:
this
-
expiredObjectDeleteMarker
@Stability(Stable) public CfnBucket.RuleProperty.Builder expiredObjectDeleteMarker(Boolean expiredObjectDeleteMarker) Sets the value ofCfnBucket.RuleProperty.getExpiredObjectDeleteMarker()
- Parameters:
expiredObjectDeleteMarker
- 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
.- Returns:
this
-
expiredObjectDeleteMarker
@Stability(Stable) public CfnBucket.RuleProperty.Builder expiredObjectDeleteMarker(IResolvable expiredObjectDeleteMarker) Sets the value ofCfnBucket.RuleProperty.getExpiredObjectDeleteMarker()
- Parameters:
expiredObjectDeleteMarker
- 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
.- Returns:
this
-
id
Sets the value ofCfnBucket.RuleProperty.getId()
- Parameters:
id
- Unique identifier for the rule. The value can't be longer than 255 characters.- Returns:
this
-
noncurrentVersionExpiration
@Stability(Stable) public CfnBucket.RuleProperty.Builder noncurrentVersionExpiration(IResolvable noncurrentVersionExpiration) Sets the value ofCfnBucket.RuleProperty.getNoncurrentVersionExpiration()
- Parameters:
noncurrentVersionExpiration
- 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.- Returns:
this
-
noncurrentVersionExpiration
@Stability(Stable) public CfnBucket.RuleProperty.Builder noncurrentVersionExpiration(CfnBucket.NoncurrentVersionExpirationProperty noncurrentVersionExpiration) Sets the value ofCfnBucket.RuleProperty.getNoncurrentVersionExpiration()
- Parameters:
noncurrentVersionExpiration
- 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.- Returns:
this
-
noncurrentVersionExpirationInDays
@Stability(Stable) public CfnBucket.RuleProperty.Builder noncurrentVersionExpirationInDays(Number noncurrentVersionExpirationInDays) Sets the value ofCfnBucket.RuleProperty.getNoncurrentVersionExpirationInDays()
- Parameters:
noncurrentVersionExpirationInDays
- (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.- Returns:
this
-
noncurrentVersionTransition
@Stability(Stable) public CfnBucket.RuleProperty.Builder noncurrentVersionTransition(IResolvable noncurrentVersionTransition) Sets the value ofCfnBucket.RuleProperty.getNoncurrentVersionTransition()
- Parameters:
noncurrentVersionTransition
- (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 theNoncurrentVersionTransitions
property.- Returns:
this
-
noncurrentVersionTransition
@Stability(Stable) public CfnBucket.RuleProperty.Builder noncurrentVersionTransition(CfnBucket.NoncurrentVersionTransitionProperty noncurrentVersionTransition) Sets the value ofCfnBucket.RuleProperty.getNoncurrentVersionTransition()
- Parameters:
noncurrentVersionTransition
- (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 theNoncurrentVersionTransitions
property.- Returns:
this
-
noncurrentVersionTransitions
@Stability(Stable) public CfnBucket.RuleProperty.Builder noncurrentVersionTransitions(IResolvable noncurrentVersionTransitions) Sets the value ofCfnBucket.RuleProperty.getNoncurrentVersionTransitions()
- Parameters:
noncurrentVersionTransitions
- 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 theNoncurrentVersionTransition
property.- Returns:
this
-
noncurrentVersionTransitions
@Stability(Stable) public CfnBucket.RuleProperty.Builder noncurrentVersionTransitions(List<? extends Object> noncurrentVersionTransitions) Sets the value ofCfnBucket.RuleProperty.getNoncurrentVersionTransitions()
- Parameters:
noncurrentVersionTransitions
- 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 theNoncurrentVersionTransition
property.- Returns:
this
-
objectSizeGreaterThan
@Stability(Stable) public CfnBucket.RuleProperty.Builder objectSizeGreaterThan(Number objectSizeGreaterThan) Sets the value ofCfnBucket.RuleProperty.getObjectSizeGreaterThan()
- Parameters:
objectSizeGreaterThan
- 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 .- Returns:
this
-
objectSizeLessThan
@Stability(Stable) public CfnBucket.RuleProperty.Builder objectSizeLessThan(Number objectSizeLessThan) Sets the value ofCfnBucket.RuleProperty.getObjectSizeLessThan()
- Parameters:
objectSizeLessThan
- 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 .- Returns:
this
-
prefix
Sets the value ofCfnBucket.RuleProperty.getPrefix()
- Parameters:
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 .
- Returns:
this
-
tagFilters
Sets the value ofCfnBucket.RuleProperty.getTagFilters()
- Parameters:
tagFilters
- Tags to use to identify a subset of objects to which the lifecycle rule applies.- Returns:
this
-
tagFilters
@Stability(Stable) public CfnBucket.RuleProperty.Builder tagFilters(List<? extends Object> tagFilters) Sets the value ofCfnBucket.RuleProperty.getTagFilters()
- Parameters:
tagFilters
- Tags to use to identify a subset of objects to which the lifecycle rule applies.- Returns:
this
-
transition
Sets the value ofCfnBucket.RuleProperty.getTransition()
- Parameters:
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 theTransitions
property.- Returns:
this
-
transition
@Stability(Stable) public CfnBucket.RuleProperty.Builder transition(CfnBucket.TransitionProperty transition) Sets the value ofCfnBucket.RuleProperty.getTransition()
- Parameters:
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 theTransitions
property.- Returns:
this
-
transitions
Sets the value ofCfnBucket.RuleProperty.getTransitions()
- Parameters:
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 theTransition
property.- Returns:
this
-
transitions
@Stability(Stable) public CfnBucket.RuleProperty.Builder transitions(List<? extends Object> transitions) Sets the value ofCfnBucket.RuleProperty.getTransitions()
- Parameters:
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 theTransition
property.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnBucket.RuleProperty>
- Returns:
- a new instance of
CfnBucket.RuleProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-