Interface CfnBucketPropsMixin.IObjectLockConfigurationProperty
Places an Object Lock configuration on the specified bucket.
Namespace: Amazon.CDK.Mixins.Preview.AWS.S3.Mixins
Assembly: Amazon.CDK.Mixins.Preview.dll
Syntax (csharp)
public interface CfnBucketPropsMixin.IObjectLockConfigurationProperty
Syntax (vb)
Public Interface CfnBucketPropsMixin.IObjectLockConfigurationProperty
Remarks
The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket. For more information, see Locking Objects .
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.Mixins.Preview.AWS.S3.Mixins;
var objectLockConfigurationProperty = new ObjectLockConfigurationProperty {
ObjectLockEnabled = "objectLockEnabled",
Rule = new ObjectLockRuleProperty {
DefaultRetention = new DefaultRetentionProperty {
Days = 123,
Mode = "mode",
Years = 123
}
}
};
Synopsis
Properties
| ObjectLockEnabled | Indicates whether this bucket has an Object Lock configuration enabled. |
| Rule | Specifies the Object Lock rule for the specified object. |
Properties
ObjectLockEnabled
Indicates whether this bucket has an Object Lock configuration enabled.
string? ObjectLockEnabled { get; }
Property Value
Remarks
Enable ObjectLockEnabled when you apply ObjectLockConfiguration to a bucket.
Rule
Specifies the Object Lock rule for the specified object.
object? Rule { get; }
Property Value
Remarks
Enable this rule when you apply ObjectLockConfiguration to a bucket. If Object Lock is turned on, bucket settings require both Mode and a period of either Days or Years . You cannot specify Days and Years at the same time. For more information, see ObjectLockRule and DefaultRetention .
Type union: either IResolvable or CfnBucketPropsMixin.IObjectLockRuleProperty