Class: AWSCDK::S3::CfnBucket::DefaultRetentionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3::CfnBucket::DefaultRetentionProperty
- Defined in:
- s3/cfn_bucket.rb
Overview
The container element for optionally specifying the default Object Lock retention settings for new objects placed in the specified bucket.
- The
DefaultRetentionsettings require both a mode and a period.- The
DefaultRetentionperiod can be eitherDaysorYearsbut you must select one. You cannot specifyDaysandYearsat the same time.
Instance Attribute Summary collapse
-
#days ⇒ Numeric?
readonly
The number of days that you want to specify for the default retention period.
-
#mode ⇒ String?
readonly
The default Object Lock retention mode you want to apply to new objects placed in the specified bucket.
-
#years ⇒ Numeric?
readonly
The number of years that you want to specify for the default retention period.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(days: nil, mode: nil, years: nil) ⇒ DefaultRetentionProperty
constructor
A new instance of DefaultRetentionProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(days: nil, mode: nil, years: nil) ⇒ DefaultRetentionProperty
Returns a new instance of DefaultRetentionProperty.
1491 1492 1493 1494 1495 1496 1497 1498 |
# File 's3/cfn_bucket.rb', line 1491 def initialize(days: nil, mode: nil, years: nil) @days = days Jsii::Type.check_type(@days, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "days") unless @days.nil? @mode = mode Jsii::Type.check_type(@mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "mode") unless @mode.nil? @years = years Jsii::Type.check_type(@years, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "years") unless @years.nil? end |
Instance Attribute Details
#days ⇒ Numeric? (readonly)
The number of days that you want to specify for the default retention period.
If Object Lock is turned on, you must specify Mode and specify either Days or Years .
1506 1507 1508 |
# File 's3/cfn_bucket.rb', line 1506 def days @days end |
#mode ⇒ String? (readonly)
The default Object Lock retention mode you want to apply to new objects placed in the specified bucket.
If Object Lock is turned on, you must specify Mode and specify either Days or Years .
1513 1514 1515 |
# File 's3/cfn_bucket.rb', line 1513 def mode @mode end |
#years ⇒ Numeric? (readonly)
The number of years that you want to specify for the default retention period.
If Object Lock is turned on, you must specify Mode and specify either Days or Years .
1520 1521 1522 |
# File 's3/cfn_bucket.rb', line 1520 def years @years end |
Class Method Details
.jsii_properties ⇒ Object
1522 1523 1524 1525 1526 1527 1528 |
# File 's3/cfn_bucket.rb', line 1522 def self.jsii_properties { :days => "days", :mode => "mode", :years => "years", } end |
Instance Method Details
#to_jsii ⇒ Object
1530 1531 1532 1533 1534 1535 1536 1537 1538 |
# File 's3/cfn_bucket.rb', line 1530 def to_jsii result = {} result.merge!({ "days" => @days, "mode" => @mode, "years" => @years, }) result.compact end |