Interface LifecycleRule.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<LifecycleRule.Builder,LifecycleRule>,SdkBuilder<LifecycleRule.Builder,LifecycleRule>,SdkPojo
- Enclosing class:
- LifecycleRule
@Mutable @NotThreadSafe public static interface LifecycleRule.Builder extends SdkPojo, CopyableBuilder<LifecycleRule.Builder,LifecycleRule>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default LifecycleRule.BuilderabortIncompleteMultipartUpload(Consumer<AbortIncompleteMultipartUpload.Builder> abortIncompleteMultipartUpload)Sets the value of the AbortIncompleteMultipartUpload property for this object.LifecycleRule.BuilderabortIncompleteMultipartUpload(AbortIncompleteMultipartUpload abortIncompleteMultipartUpload)Sets the value of the AbortIncompleteMultipartUpload property for this object.default LifecycleRule.Builderexpiration(Consumer<LifecycleExpiration.Builder> expiration)Specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker.LifecycleRule.Builderexpiration(LifecycleExpiration expiration)Specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker.default LifecycleRule.Builderfilter(Consumer<LifecycleRuleFilter.Builder> filter)TheFilteris used to identify objects that a Lifecycle Rule applies to.LifecycleRule.Builderfilter(LifecycleRuleFilter filter)TheFilteris used to identify objects that a Lifecycle Rule applies to.LifecycleRule.Builderid(String id)Unique identifier for the rule.default LifecycleRule.BuildernoncurrentVersionExpiration(Consumer<NoncurrentVersionExpiration.Builder> noncurrentVersionExpiration)Sets the value of the NoncurrentVersionExpiration property for this object.LifecycleRule.BuildernoncurrentVersionExpiration(NoncurrentVersionExpiration noncurrentVersionExpiration)Sets the value of the NoncurrentVersionExpiration property for this object.LifecycleRule.BuildernoncurrentVersionTransitions(Collection<NoncurrentVersionTransition> noncurrentVersionTransitions)Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class.LifecycleRule.BuildernoncurrentVersionTransitions(Consumer<NoncurrentVersionTransition.Builder>... noncurrentVersionTransitions)Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class.LifecycleRule.BuildernoncurrentVersionTransitions(NoncurrentVersionTransition... noncurrentVersionTransitions)Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class.LifecycleRule.Builderprefix(String prefix)Deprecated.LifecycleRule.Builderstatus(String status)If 'Enabled', the rule is currently being applied.LifecycleRule.Builderstatus(ExpirationStatus status)If 'Enabled', the rule is currently being applied.LifecycleRule.Buildertransitions(Collection<Transition> transitions)Specifies when an Amazon S3 object transitions to a specified storage class.LifecycleRule.Buildertransitions(Consumer<Transition.Builder>... transitions)Specifies when an Amazon S3 object transitions to a specified storage class.LifecycleRule.Buildertransitions(Transition... transitions)Specifies when an Amazon S3 object transitions to a specified storage class.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
-
-
-
Method Detail
-
expiration
LifecycleRule.Builder expiration(LifecycleExpiration expiration)
Specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker.
- Parameters:
expiration- Specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
expiration
default LifecycleRule.Builder expiration(Consumer<LifecycleExpiration.Builder> expiration)
Specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker.
This is a convenience method that creates an instance of theLifecycleExpiration.Builderavoiding the need to create one manually viaLifecycleExpiration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toexpiration(LifecycleExpiration).- Parameters:
expiration- a consumer that will call methods onLifecycleExpiration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
expiration(LifecycleExpiration)
-
id
LifecycleRule.Builder id(String id)
Unique identifier for the rule. The value cannot be longer than 255 characters.
- Parameters:
id- Unique identifier for the rule. The value cannot be longer than 255 characters.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
prefix
@Deprecated LifecycleRule.Builder prefix(String prefix)
Deprecated.The general purpose bucket prefix that identifies one or more objects to which the rule applies. We recommend using
Filterinstead ofPrefixfor new PUTs. Previous configurations where a prefix is defined will continue to operate as before.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.
- Parameters:
prefix- The general purpose bucket prefix that identifies one or more objects to which the rule applies. We recommend usingFilterinstead ofPrefixfor new PUTs. Previous configurations where a prefix is defined will continue to operate as before.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:
- Returns a reference to this object so that method calls can be chained together.
-
filter
LifecycleRule.Builder filter(LifecycleRuleFilter filter)
The
Filteris used to identify objects that a Lifecycle Rule applies to. AFiltermust have exactly one ofPrefix,Tag,ObjectSizeGreaterThan,ObjectSizeLessThan, orAndspecified.Filteris required if theLifecycleRuledoes not contain aPrefixelement.For more information about
Tagfilters, see Adding filters to Lifecycle rules in the Amazon S3 User Guide.Tagfilters are not supported for directory buckets.- Parameters:
filter- TheFilteris used to identify objects that a Lifecycle Rule applies to. AFiltermust have exactly one ofPrefix,Tag,ObjectSizeGreaterThan,ObjectSizeLessThan, orAndspecified.Filteris required if theLifecycleRuledoes not contain aPrefixelement.For more information about
Tagfilters, see Adding filters to Lifecycle rules in the Amazon S3 User Guide.Tagfilters are not supported for directory buckets.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
filter
default LifecycleRule.Builder filter(Consumer<LifecycleRuleFilter.Builder> filter)
The
Filteris used to identify objects that a Lifecycle Rule applies to. AFiltermust have exactly one ofPrefix,Tag,ObjectSizeGreaterThan,ObjectSizeLessThan, orAndspecified.Filteris required if theLifecycleRuledoes not contain aPrefixelement.For more information about
Tagfilters, see Adding filters to Lifecycle rules in the Amazon S3 User Guide. This is a convenience method that creates an instance of theTagfilters are not supported for directory buckets.LifecycleRuleFilter.Builderavoiding the need to create one manually viaLifecycleRuleFilter.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tofilter(LifecycleRuleFilter).- Parameters:
filter- a consumer that will call methods onLifecycleRuleFilter.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
filter(LifecycleRuleFilter)
-
status
LifecycleRule.Builder status(String status)
If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not currently being applied.
- Parameters:
status- If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not currently being applied.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ExpirationStatus,ExpirationStatus
-
status
LifecycleRule.Builder status(ExpirationStatus status)
If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not currently being applied.
- Parameters:
status- If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not currently being applied.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ExpirationStatus,ExpirationStatus
-
transitions
LifecycleRule.Builder transitions(Collection<Transition> transitions)
Specifies when an Amazon S3 object transitions to a specified storage class.
This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.
- Parameters:
transitions- Specifies when an Amazon S3 object transitions to a specified storage class.This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
transitions
LifecycleRule.Builder transitions(Transition... transitions)
Specifies when an Amazon S3 object transitions to a specified storage class.
This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.
- Parameters:
transitions- Specifies when an Amazon S3 object transitions to a specified storage class.This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
transitions
LifecycleRule.Builder transitions(Consumer<Transition.Builder>... transitions)
Specifies when an Amazon S3 object transitions to a specified storage class.
This is a convenience method that creates an instance of theThis parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.
Transition.Builderavoiding the need to create one manually viaTransition.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#transitions(List.) - Parameters:
transitions- a consumer that will call methods onTransition.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#transitions(java.util.Collection)
-
noncurrentVersionTransitions
LifecycleRule.Builder noncurrentVersionTransitions(Collection<NoncurrentVersionTransition> noncurrentVersionTransitions)
Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class. If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to a specific storage class at a set period in the object's lifetime.
This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.
- Parameters:
noncurrentVersionTransitions- Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class. If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to a specific storage class at a set period in the object's lifetime.This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
noncurrentVersionTransitions
LifecycleRule.Builder noncurrentVersionTransitions(NoncurrentVersionTransition... noncurrentVersionTransitions)
Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class. If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to a specific storage class at a set period in the object's lifetime.
This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.
- Parameters:
noncurrentVersionTransitions- Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class. If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to a specific storage class at a set period in the object's lifetime.This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
noncurrentVersionTransitions
LifecycleRule.Builder noncurrentVersionTransitions(Consumer<NoncurrentVersionTransition.Builder>... noncurrentVersionTransitions)
Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class. If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to a specific storage class at a set period in the object's lifetime.
This is a convenience method that creates an instance of theThis parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.
NoncurrentVersionTransition.Builderavoiding the need to create one manually viaNoncurrentVersionTransition.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#noncurrentVersionTransitions(List.) - Parameters:
noncurrentVersionTransitions- a consumer that will call methods onNoncurrentVersionTransition.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#noncurrentVersionTransitions(java.util.Collection)
-
noncurrentVersionExpiration
LifecycleRule.Builder noncurrentVersionExpiration(NoncurrentVersionExpiration noncurrentVersionExpiration)
Sets the value of the NoncurrentVersionExpiration property for this object.- Parameters:
noncurrentVersionExpiration- The new value for the NoncurrentVersionExpiration property for this object.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
noncurrentVersionExpiration
default LifecycleRule.Builder noncurrentVersionExpiration(Consumer<NoncurrentVersionExpiration.Builder> noncurrentVersionExpiration)
Sets the value of the NoncurrentVersionExpiration property for this object. This is a convenience method that creates an instance of theNoncurrentVersionExpiration.Builderavoiding the need to create one manually viaNoncurrentVersionExpiration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tononcurrentVersionExpiration(NoncurrentVersionExpiration).- Parameters:
noncurrentVersionExpiration- a consumer that will call methods onNoncurrentVersionExpiration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
noncurrentVersionExpiration(NoncurrentVersionExpiration)
-
abortIncompleteMultipartUpload
LifecycleRule.Builder abortIncompleteMultipartUpload(AbortIncompleteMultipartUpload abortIncompleteMultipartUpload)
Sets the value of the AbortIncompleteMultipartUpload property for this object.- Parameters:
abortIncompleteMultipartUpload- The new value for the AbortIncompleteMultipartUpload property for this object.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
abortIncompleteMultipartUpload
default LifecycleRule.Builder abortIncompleteMultipartUpload(Consumer<AbortIncompleteMultipartUpload.Builder> abortIncompleteMultipartUpload)
Sets the value of the AbortIncompleteMultipartUpload property for this object. This is a convenience method that creates an instance of theAbortIncompleteMultipartUpload.Builderavoiding the need to create one manually viaAbortIncompleteMultipartUpload.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toabortIncompleteMultipartUpload(AbortIncompleteMultipartUpload).- Parameters:
abortIncompleteMultipartUpload- a consumer that will call methods onAbortIncompleteMultipartUpload.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
abortIncompleteMultipartUpload(AbortIncompleteMultipartUpload)
-
-