Interface ObjectLockRule.Builder
-
- All Superinterfaces:
Buildable
,CopyableBuilder<ObjectLockRule.Builder,ObjectLockRule>
,SdkBuilder<ObjectLockRule.Builder,ObjectLockRule>
,SdkPojo
- Enclosing class:
- ObjectLockRule
public static interface ObjectLockRule.Builder extends SdkPojo, CopyableBuilder<ObjectLockRule.Builder,ObjectLockRule>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ObjectLockRule.Builder
defaultRetention(Consumer<DefaultRetention.Builder> defaultRetention)
The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket.ObjectLockRule.Builder
defaultRetention(DefaultRetention defaultRetention)
The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket.-
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 Detail
-
defaultRetention
ObjectLockRule.Builder defaultRetention(DefaultRetention defaultRetention)
The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket. Bucket settings require both a mode and a period. The period can be either
Days
orYears
but you must select one. You cannot specifyDays
andYears
at the same time.- Parameters:
defaultRetention
- The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket. Bucket settings require both a mode and a period. The period can be eitherDays
orYears
but you must select one. You cannot specifyDays
andYears
at the same time.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
defaultRetention
default ObjectLockRule.Builder defaultRetention(Consumer<DefaultRetention.Builder> defaultRetention)
The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket. Bucket settings require both a mode and a period. The period can be either
This is a convenience method that creates an instance of theDays
orYears
but you must select one. You cannot specifyDays
andYears
at the same time.DefaultRetention.Builder
avoiding the need to create one manually viaDefaultRetention.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed todefaultRetention(DefaultRetention)
.- Parameters:
defaultRetention
- a consumer that will call methods onDefaultRetention.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
defaultRetention(DefaultRetention)
-
-