Interface CfnBucket.IObjectLockConfigurationProperty
Places an Object Lock configuration on the specified bucket.
Namespace: Amazon.CDK.AWS.S3
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IObjectLockConfigurationProperty
Syntax (vb)
Public Interface 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.AWS.S3;
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.
virtual string ObjectLockEnabled { get; }
Property Value
System.String
Remarks
Enable ObjectLockEnabled
when you apply ObjectLockConfiguration
to a bucket.
Rule
Specifies the Object Lock rule for the specified object.
virtual object Rule { get; }
Property Value
System.Object
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 .