Class: AWSCDK::DLM::CfnLifecyclePolicy::CrossRegionCopyRetainRuleProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
dlm/cfn_lifecycle_policy.rb

Overview

Specifies a retention rule for cross-Region snapshot copies created by snapshot or event-based policies, or cross-Region AMI copies created by AMI policies.

After the retention period expires, the cross-Region copy is deleted.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(interval:, interval_unit:) ⇒ CrossRegionCopyRetainRuleProperty

Returns a new instance of CrossRegionCopyRetainRuleProperty.

Parameters:

  • interval (Numeric)

    The amount of time to retain a cross-Region snapshot or AMI copy.

  • interval_unit (String)

    The unit of time for time-based retention.



998
999
1000
1001
1002
1003
# File 'dlm/cfn_lifecycle_policy.rb', line 998

def initialize(interval:, interval_unit:)
  @interval = interval
  Jsii::Type.check_type(@interval, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "interval")
  @interval_unit = interval_unit
  Jsii::Type.check_type(@interval_unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "intervalUnit")
end

Instance Attribute Details

#intervalNumeric (readonly)

The amount of time to retain a cross-Region snapshot or AMI copy.

The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.



1011
1012
1013
# File 'dlm/cfn_lifecycle_policy.rb', line 1011

def interval
  @interval
end

#interval_unitString (readonly)

The unit of time for time-based retention.

For example, to retain a cross-Region copy for 3 months, specify Interval=3 and IntervalUnit=MONTHS .



1018
1019
1020
# File 'dlm/cfn_lifecycle_policy.rb', line 1018

def interval_unit
  @interval_unit
end

Class Method Details

.jsii_propertiesObject



1020
1021
1022
1023
1024
1025
# File 'dlm/cfn_lifecycle_policy.rb', line 1020

def self.jsii_properties
  {
    :interval => "interval",
    :interval_unit => "intervalUnit",
  }
end

Instance Method Details

#to_jsiiObject



1027
1028
1029
1030
1031
1032
1033
1034
# File 'dlm/cfn_lifecycle_policy.rb', line 1027

def to_jsii
  result = {}
  result.merge!({
    "interval" => @interval,
    "intervalUnit" => @interval_unit,
  })
  result.compact
end