Class CfnBucket.ObjectLockRuleProperty
Specifies the Object Lock rule for the specified object.
Inheritance
System.Object
CfnBucket.ObjectLockRuleProperty
Implements
Namespace: Amazon.CDK.AWS.S3
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ObjectLockRuleProperty : Object, CfnBucket.IObjectLockRuleProperty
Syntax (vb)
Public Class ObjectLockRuleProperty
Inherits Object
Implements CfnBucket.IObjectLockRuleProperty
Remarks
Enable the this rule when you apply ObjectLockConfiguration
to a bucket.
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.AWS.S3;
var objectLockRuleProperty = new ObjectLockRuleProperty {
DefaultRetention = new DefaultRetentionProperty {
Days = 123,
Mode = "mode",
Years = 123
}
};
Synopsis
Constructors
ObjectLockRuleProperty() |
Properties
DefaultRetention | The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket. |
Constructors
ObjectLockRuleProperty()
public ObjectLockRuleProperty()
Properties
DefaultRetention
The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket.
public object DefaultRetention { get; set; }
Property Value
System.Object
Remarks
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 about allowable values for mode and period, see DefaultRetention .