Class: AWSCDK::Rbin::CfnRule::RetentionPeriodProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
rbin/cfn_rule.rb

Overview

Information about the retention period for which the retention rule is to retain resources.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(retention_period_unit:, retention_period_value:) ⇒ RetentionPeriodProperty

Returns a new instance of RetentionPeriodProperty.

Parameters:

  • retention_period_unit (String)

    The unit of time in which the retention period is measured.

  • retention_period_value (Numeric)

    The period value for which the retention rule is to retain resources, measured in days.



680
681
682
683
684
685
# File 'rbin/cfn_rule.rb', line 680

def initialize(retention_period_unit:, retention_period_value:)
  @retention_period_unit = retention_period_unit
  Jsii::Type.check_type(@retention_period_unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "retentionPeriodUnit")
  @retention_period_value = retention_period_value
  Jsii::Type.check_type(@retention_period_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "retentionPeriodValue")
end

Instance Attribute Details

#retention_period_unitString (readonly)

The unit of time in which the retention period is measured.

Currently, only DAYS is supported.



693
694
695
# File 'rbin/cfn_rule.rb', line 693

def retention_period_unit
  @retention_period_unit
end

#retention_period_valueNumeric (readonly)

The period value for which the retention rule is to retain resources, measured in days.

The supported retention periods are:

  • EBS volumes: 1 - 7 days
  • EBS snapshots and EBS-backed AMIs: 1 - 365 days


703
704
705
# File 'rbin/cfn_rule.rb', line 703

def retention_period_value
  @retention_period_value
end

Class Method Details

.jsii_propertiesObject



705
706
707
708
709
710
# File 'rbin/cfn_rule.rb', line 705

def self.jsii_properties
  {
    :retention_period_unit => "retentionPeriodUnit",
    :retention_period_value => "retentionPeriodValue",
  }
end

Instance Method Details

#to_jsiiObject



712
713
714
715
716
717
718
719
# File 'rbin/cfn_rule.rb', line 712

def to_jsii
  result = {}
  result.merge!({
    "retentionPeriodUnit" => @retention_period_unit,
    "retentionPeriodValue" => @retention_period_value,
  })
  result.compact
end