Interface LifecycleRule.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<LifecycleRule.Builder,
,LifecycleRule> SdkBuilder<LifecycleRule.Builder,
,LifecycleRule> SdkPojo
- Enclosing class:
LifecycleRule
-
Method Summary
Modifier and TypeMethodDescriptiondefault LifecycleRule.Builder
abortIncompleteMultipartUpload
(Consumer<AbortIncompleteMultipartUpload.Builder> abortIncompleteMultipartUpload) Sets the value of the AbortIncompleteMultipartUpload property for this object.abortIncompleteMultipartUpload
(AbortIncompleteMultipartUpload abortIncompleteMultipartUpload) Sets the value of the AbortIncompleteMultipartUpload property for this object.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.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.default LifecycleRule.Builder
filter
(Consumer<LifecycleRuleFilter.Builder> filter) TheFilter
is used to identify objects that a Lifecycle Rule applies to.filter
(LifecycleRuleFilter filter) TheFilter
is used to identify objects that a Lifecycle Rule applies to.Unique identifier for the rule.default LifecycleRule.Builder
noncurrentVersionExpiration
(Consumer<NoncurrentVersionExpiration.Builder> noncurrentVersionExpiration) Sets the value of the NoncurrentVersionExpiration property for this object.noncurrentVersionExpiration
(NoncurrentVersionExpiration noncurrentVersionExpiration) Sets the value of the NoncurrentVersionExpiration property for this object.noncurrentVersionTransitions
(Collection<NoncurrentVersionTransition> noncurrentVersionTransitions) Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class.noncurrentVersionTransitions
(Consumer<NoncurrentVersionTransition.Builder>... noncurrentVersionTransitions) Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class.noncurrentVersionTransitions
(NoncurrentVersionTransition... noncurrentVersionTransitions) Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class.Deprecated.If 'Enabled', the rule is currently being applied.status
(ExpirationStatus status) If 'Enabled', the rule is currently being applied.transitions
(Collection<Transition> transitions) Specifies when an Amazon S3 object transitions to a specified storage class.transitions
(Consumer<Transition.Builder>... transitions) Specifies when an Amazon S3 object transitions to a specified storage class.transitions
(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, sdkFields
-
Method Details
-
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
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.Builder
avoiding the need to create one manually viaLifecycleExpiration.builder()
.When the
Consumer
completes,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:
-
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.Prefix identifying one or more objects to which the rule applies. This is no longer used; use
Filter
instead.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
- Prefix identifying one or more objects to which the rule applies. This is no longer used; useFilter
instead.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
The
Filter
is used to identify objects that a Lifecycle Rule applies to. AFilter
must have exactly one ofPrefix
,Tag
, orAnd
specified.Filter
is required if theLifecycleRule
does not contain aPrefix
element.- Parameters:
filter
- TheFilter
is used to identify objects that a Lifecycle Rule applies to. AFilter
must have exactly one ofPrefix
,Tag
, orAnd
specified.Filter
is required if theLifecycleRule
does not contain aPrefix
element.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
filter
The
This is a convenience method that creates an instance of theFilter
is used to identify objects that a Lifecycle Rule applies to. AFilter
must have exactly one ofPrefix
,Tag
, orAnd
specified.Filter
is required if theLifecycleRule
does not contain aPrefix
element.LifecycleRuleFilter.Builder
avoiding the need to create one manually viaLifecycleRuleFilter.builder()
.When the
Consumer
completes,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:
-
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:
-
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:
-
transitions
Specifies when an Amazon S3 object transitions to a specified storage class.
- Parameters:
transitions
- Specifies when an Amazon S3 object transitions to a specified storage class.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
transitions
Specifies when an Amazon S3 object transitions to a specified storage class.
- Parameters:
transitions
- Specifies when an Amazon S3 object transitions to a specified storage class.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
transitions
Specifies when an Amazon S3 object transitions to a specified storage class.
This is a convenience method that creates an instance of theTransition.Builder
avoiding the need to create one manually viaTransition.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed totransitions(List<Transition>)
.- 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:
-
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.
- 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.- 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.
- 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.- 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 theNoncurrentVersionTransition.Builder
avoiding the need to create one manually viaNoncurrentVersionTransition.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tononcurrentVersionTransitions(List<NoncurrentVersionTransition>)
.- 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:
-
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.Builder
avoiding the need to create one manually viaNoncurrentVersionExpiration.builder()
.When the
Consumer
completes,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:
-
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.Builder
avoiding the need to create one manually viaAbortIncompleteMultipartUpload.builder()
.When the
Consumer
completes,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:
-