Interface ObjectLockConfiguration.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<ObjectLockConfiguration.Builder,
,ObjectLockConfiguration> SdkBuilder<ObjectLockConfiguration.Builder,
,ObjectLockConfiguration> SdkPojo
- Enclosing class:
ObjectLockConfiguration
-
Method Summary
Modifier and TypeMethodDescriptionobjectLockEnabled
(String objectLockEnabled) Indicates whether this bucket has an Object Lock configuration enabled.objectLockEnabled
(ObjectLockEnabled objectLockEnabled) Indicates whether this bucket has an Object Lock configuration enabled.default ObjectLockConfiguration.Builder
rule
(Consumer<ObjectLockRule.Builder> rule) Specifies the Object Lock rule for the specified object.rule
(ObjectLockRule rule) Specifies the Object Lock rule for the specified object.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
-
objectLockEnabled
Indicates whether this bucket has an Object Lock configuration enabled. Enable
ObjectLockEnabled
when you applyObjectLockConfiguration
to a bucket.- Parameters:
objectLockEnabled
- Indicates whether this bucket has an Object Lock configuration enabled. EnableObjectLockEnabled
when you applyObjectLockConfiguration
to a bucket.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
objectLockEnabled
Indicates whether this bucket has an Object Lock configuration enabled. Enable
ObjectLockEnabled
when you applyObjectLockConfiguration
to a bucket.- Parameters:
objectLockEnabled
- Indicates whether this bucket has an Object Lock configuration enabled. EnableObjectLockEnabled
when you applyObjectLockConfiguration
to a bucket.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
rule
Specifies the Object Lock rule for the specified object. Enable the this rule when you apply
ObjectLockConfiguration
to a 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.- Parameters:
rule
- Specifies the Object Lock rule for the specified object. Enable the this rule when you applyObjectLockConfiguration
to a 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.
-
rule
Specifies the Object Lock rule for the specified object. Enable the this rule when you apply
This is a convenience method that creates an instance of theObjectLockConfiguration
to a 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.ObjectLockRule.Builder
avoiding the need to create one manually viaObjectLockRule.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed torule(ObjectLockRule)
.- Parameters:
rule
- a consumer that will call methods onObjectLockRule.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-