Class: AWSCDK::S3::CfnBucket::ObjectLockRuleProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3::CfnBucket::ObjectLockRuleProperty
- Defined in:
- s3/cfn_bucket.rb
Overview
Specifies the Object Lock rule for the specified object.
Enable the this rule when you apply ObjectLockConfiguration to a bucket.
Instance Attribute Summary collapse
-
#default_retention ⇒ AWSCDK::IResolvable, ...
readonly
The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(default_retention: nil) ⇒ ObjectLockRuleProperty
constructor
A new instance of ObjectLockRuleProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(default_retention: nil) ⇒ ObjectLockRuleProperty
Returns a new instance of ObjectLockRuleProperty.
2834 2835 2836 2837 |
# File 's3/cfn_bucket.rb', line 2834 def initialize(default_retention: nil) @default_retention = default_retention.is_a?(Hash) ? ::AWSCDK::S3::CfnBucket::DefaultRetentionProperty.new(**default_retention.transform_keys(&:to_sym)) : default_retention Jsii::Type.check_type(@default_retention, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zMy5DZm5CdWNrZXQuRGVmYXVsdFJldGVudGlvblByb3BlcnR5In1dfX0=")), "defaultRetention") unless @default_retention.nil? end |
Instance Attribute Details
#default_retention ⇒ AWSCDK::IResolvable, ... (readonly)
The default Object Lock retention mode and period that you want to apply to new objects placed in the specified 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 about allowable values for mode and period, see DefaultRetention .
2845 2846 2847 |
# File 's3/cfn_bucket.rb', line 2845 def default_retention @default_retention end |
Class Method Details
.jsii_properties ⇒ Object
2847 2848 2849 2850 2851 |
# File 's3/cfn_bucket.rb', line 2847 def self.jsii_properties { :default_retention => "defaultRetention", } end |
Instance Method Details
#to_jsii ⇒ Object
2853 2854 2855 2856 2857 2858 2859 |
# File 's3/cfn_bucket.rb', line 2853 def to_jsii result = {} result.merge!({ "defaultRetention" => @default_retention, }) result.compact end |