Class: AWSCDK::DLM::CfnLifecyclePolicy::RetentionArchiveTierProperty

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

Overview

[Custom snapshot policies only] Describes the retention rule for archived snapshots.

Once the archive retention threshold is met, the snapshots are permanently deleted from the archive tier.

The archive retention rule must retain snapshots in the archive tier for a minimum of 90 days.

For count-based schedules , you must specify Count . For age-based schedules , you must specify Interval and IntervalUnit .

For more information about using snapshot archiving, see Considerations for snapshot lifecycle policies .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(count: nil, interval: nil, interval_unit: nil) ⇒ RetentionArchiveTierProperty

Returns a new instance of RetentionArchiveTierProperty.

Parameters:

  • count (Numeric, nil) (defaults to: nil)

    The maximum number of snapshots to retain in the archive storage tier for each volume.

  • interval (Numeric, nil) (defaults to: nil)

    Specifies the period of time to retain snapshots in the archive tier.

  • interval_unit (String, nil) (defaults to: nil)

    The unit of time in which to measure the Interval .



1902
1903
1904
1905
1906
1907
1908
1909
# File 'dlm/cfn_lifecycle_policy.rb', line 1902

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

Instance Attribute Details

#countNumeric? (readonly)

The maximum number of snapshots to retain in the archive storage tier for each volume.

The count must ensure that each snapshot remains in the archive tier for at least 90 days. For example, if the schedule creates snapshots every 30 days, you must specify a count of 3 or more to ensure that each snapshot is archived for at least 90 days.



1917
1918
1919
# File 'dlm/cfn_lifecycle_policy.rb', line 1917

def count
  @count
end

#intervalNumeric? (readonly)

Specifies the period of time to retain snapshots in the archive tier.

After this period expires, the snapshot is permanently deleted.



1924
1925
1926
# File 'dlm/cfn_lifecycle_policy.rb', line 1924

def interval
  @interval
end

#interval_unitString? (readonly)

The unit of time in which to measure the Interval .

For example, to retain a snapshots in the archive tier for 6 months, specify Interval=6 and IntervalUnit=MONTHS .



1931
1932
1933
# File 'dlm/cfn_lifecycle_policy.rb', line 1931

def interval_unit
  @interval_unit
end

Class Method Details

.jsii_propertiesObject



1933
1934
1935
1936
1937
1938
1939
# File 'dlm/cfn_lifecycle_policy.rb', line 1933

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

Instance Method Details

#to_jsiiObject



1941
1942
1943
1944
1945
1946
1947
1948
1949
# File 'dlm/cfn_lifecycle_policy.rb', line 1941

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