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.Builderrule(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
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
objectLockEnabled
Indicates whether this bucket has an Object Lock configuration enabled. Enable
ObjectLockEnabledwhen you applyObjectLockConfigurationto a bucket.- Parameters:
objectLockEnabled- Indicates whether this bucket has an Object Lock configuration enabled. EnableObjectLockEnabledwhen you applyObjectLockConfigurationto 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
ObjectLockEnabledwhen you applyObjectLockConfigurationto a bucket.- Parameters:
objectLockEnabled- Indicates whether this bucket has an Object Lock configuration enabled. EnableObjectLockEnabledwhen you applyObjectLockConfigurationto 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
ObjectLockConfigurationto a bucket. Bucket settings require both a mode and a period. The period can be eitherDaysorYearsbut you must select one. You cannot specifyDaysandYearsat the same time.- Parameters:
rule- Specifies the Object Lock rule for the specified object. Enable the this rule when you applyObjectLockConfigurationto a bucket. Bucket settings require both a mode and a period. The period can be eitherDaysorYearsbut you must select one. You cannot specifyDaysandYearsat 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 theObjectLockConfigurationto a bucket. Bucket settings require both a mode and a period. The period can be eitherDaysorYearsbut you must select one. You cannot specifyDaysandYearsat the same time.ObjectLockRule.Builderavoiding the need to create one manually viaObjectLockRule.builder().When the
Consumercompletes,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:
-