public static final class CfnBucket.RuleProperty.Builder
extends java.lang.Object
CfnBucket.RuleProperty
Constructor and Description |
---|
Builder() |
public CfnBucket.RuleProperty.Builder status(java.lang.String status)
CfnBucket.RuleProperty.getStatus()
status
- If `Enabled` , the rule is currently being applied. This parameter is required.
If Disabled
, the rule is not currently being applied.this
public CfnBucket.RuleProperty.Builder abortIncompleteMultipartUpload(IResolvable abortIncompleteMultipartUpload)
CfnBucket.RuleProperty.getAbortIncompleteMultipartUpload()
abortIncompleteMultipartUpload
- Specifies a lifecycle rule that stops incomplete multipart uploads to an Amazon S3 bucket.this
public CfnBucket.RuleProperty.Builder abortIncompleteMultipartUpload(CfnBucket.AbortIncompleteMultipartUploadProperty abortIncompleteMultipartUpload)
CfnBucket.RuleProperty.getAbortIncompleteMultipartUpload()
abortIncompleteMultipartUpload
- Specifies a lifecycle rule that stops incomplete multipart uploads to an Amazon S3 bucket.this
public CfnBucket.RuleProperty.Builder expirationDate(java.time.Instant expirationDate)
CfnBucket.RuleProperty.getExpirationDate()
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.this
public CfnBucket.RuleProperty.Builder expirationDate(IResolvable expirationDate)
CfnBucket.RuleProperty.getExpirationDate()
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.this
public CfnBucket.RuleProperty.Builder expirationInDays(java.lang.Number expirationInDays)
CfnBucket.RuleProperty.getExpirationInDays()
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.this
public CfnBucket.RuleProperty.Builder expiredObjectDeleteMarker(java.lang.Boolean expiredObjectDeleteMarker)
CfnBucket.RuleProperty.getExpiredObjectDeleteMarker()
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 with ExpirationInDays
, ExpirationDate
, or TagFilters
.this
public CfnBucket.RuleProperty.Builder expiredObjectDeleteMarker(IResolvable expiredObjectDeleteMarker)
CfnBucket.RuleProperty.getExpiredObjectDeleteMarker()
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 with ExpirationInDays
, ExpirationDate
, or TagFilters
.this
public CfnBucket.RuleProperty.Builder id(java.lang.String id)
CfnBucket.RuleProperty.getId()
id
- Unique identifier for the rule.
The value can't be longer than 255 characters.this
public CfnBucket.RuleProperty.Builder noncurrentVersionExpiration(IResolvable noncurrentVersionExpiration)
CfnBucket.RuleProperty.getNoncurrentVersionExpiration()
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.this
public CfnBucket.RuleProperty.Builder noncurrentVersionExpiration(CfnBucket.NoncurrentVersionExpirationProperty noncurrentVersionExpiration)
CfnBucket.RuleProperty.getNoncurrentVersionExpiration()
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.this
public CfnBucket.RuleProperty.Builder noncurrentVersionExpirationInDays(java.lang.Number noncurrentVersionExpirationInDays)
CfnBucket.RuleProperty.getNoncurrentVersionExpirationInDays()
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.this
public CfnBucket.RuleProperty.Builder noncurrentVersionTransition(IResolvable noncurrentVersionTransition)
CfnBucket.RuleProperty.getNoncurrentVersionTransition()
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 the `NoncurrentVersionTransitions` property.this
public CfnBucket.RuleProperty.Builder noncurrentVersionTransition(CfnBucket.NoncurrentVersionTransitionProperty noncurrentVersionTransition)
CfnBucket.RuleProperty.getNoncurrentVersionTransition()
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 the `NoncurrentVersionTransitions` property.this
public CfnBucket.RuleProperty.Builder noncurrentVersionTransitions(IResolvable noncurrentVersionTransitions)
CfnBucket.RuleProperty.getNoncurrentVersionTransitions()
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 the NoncurrentVersionTransition
property.this
public CfnBucket.RuleProperty.Builder noncurrentVersionTransitions(java.util.List<? extends java.lang.Object> noncurrentVersionTransitions)
CfnBucket.RuleProperty.getNoncurrentVersionTransitions()
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 the NoncurrentVersionTransition
property.this
public CfnBucket.RuleProperty.Builder objectSizeGreaterThan(java.lang.Number objectSizeGreaterThan)
CfnBucket.RuleProperty.getObjectSizeGreaterThan()
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 .this
public CfnBucket.RuleProperty.Builder objectSizeLessThan(java.lang.Number objectSizeLessThan)
CfnBucket.RuleProperty.getObjectSizeLessThan()
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 .this
public CfnBucket.RuleProperty.Builder prefix(java.lang.String prefix)
CfnBucket.RuleProperty.getPrefix()
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 .
this
public CfnBucket.RuleProperty.Builder tagFilters(IResolvable tagFilters)
CfnBucket.RuleProperty.getTagFilters()
tagFilters
- Tags to use to identify a subset of objects to which the lifecycle rule applies.this
public CfnBucket.RuleProperty.Builder tagFilters(java.util.List<? extends java.lang.Object> tagFilters)
CfnBucket.RuleProperty.getTagFilters()
tagFilters
- Tags to use to identify a subset of objects to which the lifecycle rule applies.this
public CfnBucket.RuleProperty.Builder transition(IResolvable transition)
CfnBucket.RuleProperty.getTransition()
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 the `Transitions` property.this
public CfnBucket.RuleProperty.Builder transition(CfnBucket.TransitionProperty transition)
CfnBucket.RuleProperty.getTransition()
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 the `Transitions` property.this
public CfnBucket.RuleProperty.Builder transitions(IResolvable transitions)
CfnBucket.RuleProperty.getTransitions()
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 the Transition
property.this
public CfnBucket.RuleProperty.Builder transitions(java.util.List<? extends java.lang.Object> transitions)
CfnBucket.RuleProperty.getTransitions()
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 the Transition
property.this
public CfnBucket.RuleProperty build()
CfnBucket.RuleProperty
java.lang.NullPointerException
- if any required attribute was not provided