Class CfnBucket.ObjectLockConfigurationProperty
Places an Object Lock configuration on the specified bucket.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.S3
Assembly: Amazon.CDK.AWS.S3.dll
Syntax (csharp)
public class ObjectLockConfigurationProperty : Object, CfnBucket.IObjectLockConfigurationProperty
Syntax (vb)
Public Class ObjectLockConfigurationProperty
Inherits Object
Implements CfnBucket.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
Constructors
ObjectLockConfigurationProperty() |
Properties
ObjectLockEnabled | Indicates whether this bucket has an Object Lock configuration enabled. |
Rule | Specifies the Object Lock rule for the specified object. |
Constructors
ObjectLockConfigurationProperty()
public ObjectLockConfigurationProperty()
Properties
ObjectLockEnabled
Indicates whether this bucket has an Object Lock configuration enabled.
public string ObjectLockEnabled { get; set; }
Property Value
System.String
Remarks
Enable ObjectLockEnabled
when you apply ObjectLockConfiguration
to a bucket.
Rule
Specifies the Object Lock rule for the specified object.
public object Rule { get; set; }
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 .