Class: AWSCDK::DLM::CfnLifecyclePolicy::ScheduleProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::DLM::CfnLifecyclePolicy::ScheduleProperty
- Defined in:
- dlm/cfn_lifecycle_policy.rb
Overview
[Custom snapshot and AMI policies only] Specifies a schedule for a snapshot or AMI lifecycle policy.
Instance Attribute Summary collapse
-
#archive_rule ⇒ AWSCDK::IResolvable, ...
readonly
[Custom snapshot policies that target volumes only] The snapshot archiving rule for the schedule.
-
#copy_tags ⇒ Boolean, ...
readonly
Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
-
#create_rule ⇒ AWSCDK::IResolvable, ...
readonly
The creation rule.
-
#cross_region_copy_rules ⇒ AWSCDK::IResolvable, ...
readonly
Specifies a rule for copying snapshots or AMIs across Regions.
-
#deprecate_rule ⇒ AWSCDK::IResolvable, ...
readonly
[Custom AMI policies only] The AMI deprecation rule for the schedule.
-
#fast_restore_rule ⇒ AWSCDK::IResolvable, ...
readonly
[Custom snapshot policies only] The rule for enabling fast snapshot restore.
-
#name ⇒ String?
readonly
The name of the schedule.
-
#retain_rule ⇒ AWSCDK::IResolvable, ...
readonly
The retention rule for snapshots or AMIs created by the policy.
-
#share_rules ⇒ AWSCDK::IResolvable, ...
readonly
[Custom snapshot policies only] The rule for sharing snapshots with other AWS accounts .
-
#tags_to_add ⇒ AWSCDK::IResolvable, ...
readonly
The tags to apply to policy-created resources.
-
#variable_tags ⇒ AWSCDK::IResolvable, ...
readonly
[AMI policies and snapshot policies that target instances only] A collection of key/value pairs with values determined dynamically when the policy is executed.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(archive_rule: nil, copy_tags: nil, create_rule: nil, cross_region_copy_rules: nil, deprecate_rule: nil, fast_restore_rule: nil, name: nil, retain_rule: nil, share_rules: nil, tags_to_add: nil, variable_tags: nil) ⇒ ScheduleProperty
constructor
A new instance of ScheduleProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(archive_rule: nil, copy_tags: nil, create_rule: nil, cross_region_copy_rules: nil, deprecate_rule: nil, fast_restore_rule: nil, name: nil, retain_rule: nil, share_rules: nil, tags_to_add: nil, variable_tags: nil) ⇒ ScheduleProperty
Returns a new instance of ScheduleProperty.
1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 |
# File 'dlm/cfn_lifecycle_policy.rb', line 1969 def initialize(archive_rule: nil, copy_tags: nil, create_rule: nil, cross_region_copy_rules: nil, deprecate_rule: nil, fast_restore_rule: nil, name: nil, retain_rule: nil, share_rules: nil, tags_to_add: nil, variable_tags: nil) @archive_rule = archive_rule.is_a?(Hash) ? ::AWSCDK::DLM::CfnLifecyclePolicy::ArchiveRuleProperty.new(**archive_rule.transform_keys(&:to_sym)) : archive_rule Jsii::Type.check_type(@archive_rule, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19kbG0uQ2ZuTGlmZWN5Y2xlUG9saWN5LkFyY2hpdmVSdWxlUHJvcGVydHkifV19fQ==")), "archiveRule") unless @archive_rule.nil? @copy_tags = Jsii::Type.check_type(@copy_tags, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "copyTags") unless @copy_tags.nil? @create_rule = create_rule.is_a?(Hash) ? ::AWSCDK::DLM::CfnLifecyclePolicy::CreateRuleProperty.new(**create_rule.transform_keys(&:to_sym)) : create_rule Jsii::Type.check_type(@create_rule, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19kbG0uQ2ZuTGlmZWN5Y2xlUG9saWN5LkNyZWF0ZVJ1bGVQcm9wZXJ0eSJ9XX19")), "createRule") unless @create_rule.nil? @cross_region_copy_rules = cross_region_copy_rules Jsii::Type.check_type(@cross_region_copy_rules, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZGxtLkNmbkxpZmVjeWNsZVBvbGljeS5Dcm9zc1JlZ2lvbkNvcHlSdWxlUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "crossRegionCopyRules") unless @cross_region_copy_rules.nil? @deprecate_rule = deprecate_rule.is_a?(Hash) ? ::AWSCDK::DLM::CfnLifecyclePolicy::DeprecateRuleProperty.new(**deprecate_rule.transform_keys(&:to_sym)) : deprecate_rule Jsii::Type.check_type(@deprecate_rule, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19kbG0uQ2ZuTGlmZWN5Y2xlUG9saWN5LkRlcHJlY2F0ZVJ1bGVQcm9wZXJ0eSJ9XX19")), "deprecateRule") unless @deprecate_rule.nil? @fast_restore_rule = fast_restore_rule.is_a?(Hash) ? ::AWSCDK::DLM::CfnLifecyclePolicy::FastRestoreRuleProperty.new(**fast_restore_rule.transform_keys(&:to_sym)) : fast_restore_rule Jsii::Type.check_type(@fast_restore_rule, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19kbG0uQ2ZuTGlmZWN5Y2xlUG9saWN5LkZhc3RSZXN0b3JlUnVsZVByb3BlcnR5In1dfX0=")), "fastRestoreRule") unless @fast_restore_rule.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? @retain_rule = retain_rule.is_a?(Hash) ? ::AWSCDK::DLM::CfnLifecyclePolicy::RetainRuleProperty.new(**retain_rule.transform_keys(&:to_sym)) : retain_rule Jsii::Type.check_type(@retain_rule, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19kbG0uQ2ZuTGlmZWN5Y2xlUG9saWN5LlJldGFpblJ1bGVQcm9wZXJ0eSJ9XX19")), "retainRule") unless @retain_rule.nil? @share_rules = share_rules Jsii::Type.check_type(@share_rules, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZGxtLkNmbkxpZmVjeWNsZVBvbGljeS5TaGFyZVJ1bGVQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "shareRules") unless @share_rules.nil? @tags_to_add = Jsii::Type.check_type(@tags_to_add, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5UYWcifV19fSwia2luZCI6ImFycmF5In19XX19")), "tagsToAdd") unless @tags_to_add.nil? @variable_tags = Jsii::Type.check_type(@variable_tags, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5UYWcifV19fSwia2luZCI6ImFycmF5In19XX19")), "variableTags") unless @variable_tags.nil? end |
Instance Attribute Details
#archive_rule ⇒ AWSCDK::IResolvable, ... (readonly)
[Custom snapshot policies that target volumes only] The snapshot archiving rule for the schedule.
When you specify an archiving rule, snapshots are automatically moved from the standard tier to the archive tier once the schedule's retention threshold is met. Snapshots are then retained in the archive tier for the archive retention period that you specify.
For more information about using snapshot archiving, see Considerations for snapshot lifecycle policies .
2002 2003 2004 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2002 def archive_rule @archive_rule end |
#copy_tags ⇒ Boolean, ... (readonly)
Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
2007 2008 2009 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2007 def @copy_tags end |
#create_rule ⇒ AWSCDK::IResolvable, ... (readonly)
The creation rule.
2012 2013 2014 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2012 def create_rule @create_rule end |
#cross_region_copy_rules ⇒ AWSCDK::IResolvable, ... (readonly)
Specifies a rule for copying snapshots or AMIs across Regions.
You can't specify cross-Region copy rules for policies that create snapshots on an Outpost or in a Local Zone. If the policy creates snapshots in a Region, then snapshots can be copied to up to three Regions or Outposts.
2019 2020 2021 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2019 def cross_region_copy_rules @cross_region_copy_rules end |
#deprecate_rule ⇒ AWSCDK::IResolvable, ... (readonly)
[Custom AMI policies only] The AMI deprecation rule for the schedule.
2024 2025 2026 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2024 def deprecate_rule @deprecate_rule end |
#fast_restore_rule ⇒ AWSCDK::IResolvable, ... (readonly)
[Custom snapshot policies only] The rule for enabling fast snapshot restore.
2029 2030 2031 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2029 def fast_restore_rule @fast_restore_rule end |
#name ⇒ String? (readonly)
The name of the schedule.
2034 2035 2036 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2034 def name @name end |
#retain_rule ⇒ AWSCDK::IResolvable, ... (readonly)
The retention rule for snapshots or AMIs created by the policy.
2039 2040 2041 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2039 def retain_rule @retain_rule end |
#share_rules ⇒ AWSCDK::IResolvable, ... (readonly)
[Custom snapshot policies only] The rule for sharing snapshots with other AWS accounts .
2044 2045 2046 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2044 def share_rules @share_rules end |
#tags_to_add ⇒ AWSCDK::IResolvable, ... (readonly)
The tags to apply to policy-created resources.
These user-defined tags are in addition to the AWS -added lifecycle tags.
2051 2052 2053 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2051 def @tags_to_add end |
#variable_tags ⇒ AWSCDK::IResolvable, ... (readonly)
[AMI policies and snapshot policies that target instances only] A collection of key/value pairs with values determined dynamically when the policy is executed.
Keys may be any valid Amazon EC2 tag key. Values must be in one of the two following formats: $(instance-id) or $(timestamp) . Variable tags are only valid for EBS Snapshot Management – Instance policies.
2058 2059 2060 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2058 def @variable_tags end |
Class Method Details
.jsii_properties ⇒ Object
2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2060 def self.jsii_properties { :archive_rule => "archiveRule", :copy_tags => "copyTags", :create_rule => "createRule", :cross_region_copy_rules => "crossRegionCopyRules", :deprecate_rule => "deprecateRule", :fast_restore_rule => "fastRestoreRule", :name => "name", :retain_rule => "retainRule", :share_rules => "shareRules", :tags_to_add => "tagsToAdd", :variable_tags => "variableTags", } end |
Instance Method Details
#to_jsii ⇒ Object
2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2076 def to_jsii result = {} result.merge!({ "archiveRule" => @archive_rule, "copyTags" => @copy_tags, "createRule" => @create_rule, "crossRegionCopyRules" => @cross_region_copy_rules, "deprecateRule" => @deprecate_rule, "fastRestoreRule" => @fast_restore_rule, "name" => @name, "retainRule" => @retain_rule, "shareRules" => @share_rules, "tagsToAdd" => @tags_to_add, "variableTags" => @variable_tags, }) result.compact end |