Class CfnBucket.ObjectLockConfigurationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.s3.CfnBucket.ObjectLockConfigurationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnBucket.ObjectLockConfigurationProperty>
- Enclosing interface:
CfnBucket.ObjectLockConfigurationProperty
@Stability(Stable)
public static final class CfnBucket.ObjectLockConfigurationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnBucket.ObjectLockConfigurationProperty>
A builder for
CfnBucket.ObjectLockConfigurationProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.objectLockEnabled(String objectLockEnabled) Sets the value ofCfnBucket.ObjectLockConfigurationProperty.getObjectLockEnabled()rule(IResolvable rule) Sets the value ofCfnBucket.ObjectLockConfigurationProperty.getRule()Sets the value ofCfnBucket.ObjectLockConfigurationProperty.getRule()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
objectLockEnabled
@Stability(Stable) public CfnBucket.ObjectLockConfigurationProperty.Builder objectLockEnabled(String objectLockEnabled) Sets the value ofCfnBucket.ObjectLockConfigurationProperty.getObjectLockEnabled()- Parameters:
objectLockEnabled- Indicates whether this bucket has an Object Lock configuration enabled. EnableObjectLockEnabledwhen you applyObjectLockConfigurationto a bucket.- Returns:
this
-
rule
Sets the value ofCfnBucket.ObjectLockConfigurationProperty.getRule()- Parameters:
rule- Specifies the Object Lock rule for the specified object. Enable this rule when you applyObjectLockConfigurationto a bucket. If Object Lock is turned on, bucket settings require bothModeand a period of eitherDaysorYears. You cannot specifyDaysandYearsat the same time. For more information, see ObjectLockRule and DefaultRetention .- Returns:
this
-
rule
@Stability(Stable) public CfnBucket.ObjectLockConfigurationProperty.Builder rule(CfnBucket.ObjectLockRuleProperty rule) Sets the value ofCfnBucket.ObjectLockConfigurationProperty.getRule()- Parameters:
rule- Specifies the Object Lock rule for the specified object. Enable this rule when you applyObjectLockConfigurationto a bucket. If Object Lock is turned on, bucket settings require bothModeand a period of eitherDaysorYears. You cannot specifyDaysandYearsat the same time. For more information, see ObjectLockRule and DefaultRetention .- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnBucket.ObjectLockConfigurationProperty>- Returns:
- a new instance of
CfnBucket.ObjectLockConfigurationProperty - Throws:
NullPointerException- if any required attribute was not provided
-