Class: AWSCDK::DLM::CfnLifecyclePolicy::CrossRegionCopyRuleProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::DLM::CfnLifecyclePolicy::CrossRegionCopyRuleProperty
- Defined in:
- dlm/cfn_lifecycle_policy.rb
Overview
[Custom snapshot and AMI policies only] Specifies a cross-Region copy rule for a snapshot and AMI policies.
To specify a cross-Region copy action for event-based polices, use CrossRegionCopyAction .
Instance Attribute Summary collapse
-
#cmk_arn ⇒ String?
readonly
The Amazon Resource Name (ARN) of the AWS KMS key to use for EBS encryption.
-
#copy_tags ⇒ Boolean, ...
readonly
Indicates whether to copy all user-defined tags from the source snapshot or AMI to the cross-Region copy.
-
#deprecate_rule ⇒ AWSCDK::IResolvable, ...
readonly
[Custom AMI policies only] The AMI deprecation rule for cross-Region AMI copies created by the rule.
-
#encrypted ⇒ Boolean, AWSCDK::IResolvable
readonly
To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter.
-
#retain_rule ⇒ AWSCDK::IResolvable, ...
readonly
The retention rule that indicates how long the cross-Region snapshot or AMI copies are to be retained in the destination Region.
-
#target ⇒ String?
readonly
Use this parameter for snapshot policies only.
-
#target_region ⇒ String?
readonly
Use this parameter for AMI policies only.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(encrypted:, cmk_arn: nil, copy_tags: nil, deprecate_rule: nil, retain_rule: nil, target: nil, target_region: nil) ⇒ CrossRegionCopyRuleProperty
constructor
A new instance of CrossRegionCopyRuleProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(encrypted:, cmk_arn: nil, copy_tags: nil, deprecate_rule: nil, retain_rule: nil, target: nil, target_region: nil) ⇒ CrossRegionCopyRuleProperty
Returns a new instance of CrossRegionCopyRuleProperty.
1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 |
# File 'dlm/cfn_lifecycle_policy.rb', line 1052 def initialize(encrypted:, cmk_arn: nil, copy_tags: nil, deprecate_rule: nil, retain_rule: nil, target: nil, target_region: nil) @encrypted = encrypted Jsii::Type.check_type(@encrypted, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "encrypted") @cmk_arn = cmk_arn Jsii::Type.check_type(@cmk_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cmkArn") unless @cmk_arn.nil? @copy_tags = Jsii::Type.check_type(@copy_tags, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "copyTags") unless @copy_tags.nil? @deprecate_rule = deprecate_rule.is_a?(Hash) ? ::AWSCDK::DLM::CfnLifecyclePolicy::CrossRegionCopyDeprecateRuleProperty.new(**deprecate_rule.transform_keys(&:to_sym)) : deprecate_rule Jsii::Type.check_type(@deprecate_rule, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19kbG0uQ2ZuTGlmZWN5Y2xlUG9saWN5LkNyb3NzUmVnaW9uQ29weURlcHJlY2F0ZVJ1bGVQcm9wZXJ0eSJ9XX19")), "deprecateRule") unless @deprecate_rule.nil? @retain_rule = retain_rule.is_a?(Hash) ? ::AWSCDK::DLM::CfnLifecyclePolicy::CrossRegionCopyRetainRuleProperty.new(**retain_rule.transform_keys(&:to_sym)) : retain_rule Jsii::Type.check_type(@retain_rule, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19kbG0uQ2ZuTGlmZWN5Y2xlUG9saWN5LkNyb3NzUmVnaW9uQ29weVJldGFpblJ1bGVQcm9wZXJ0eSJ9XX19")), "retainRule") unless @retain_rule.nil? @target = target Jsii::Type.check_type(@target, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "target") unless @target.nil? @target_region = target_region Jsii::Type.check_type(@target_region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetRegion") unless @target_region.nil? end |
Instance Attribute Details
#cmk_arn ⇒ String? (readonly)
The Amazon Resource Name (ARN) of the AWS KMS key to use for EBS encryption.
If this parameter is not specified, the default KMS key for the account is used.
1082 1083 1084 |
# File 'dlm/cfn_lifecycle_policy.rb', line 1082 def cmk_arn @cmk_arn end |
#copy_tags ⇒ Boolean, ... (readonly)
Indicates whether to copy all user-defined tags from the source snapshot or AMI to the cross-Region copy.
1087 1088 1089 |
# File 'dlm/cfn_lifecycle_policy.rb', line 1087 def @copy_tags end |
#deprecate_rule ⇒ AWSCDK::IResolvable, ... (readonly)
[Custom AMI policies only] The AMI deprecation rule for cross-Region AMI copies created by the rule.
1092 1093 1094 |
# File 'dlm/cfn_lifecycle_policy.rb', line 1092 def deprecate_rule @deprecate_rule end |
#encrypted ⇒ Boolean, AWSCDK::IResolvable (readonly)
To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter.
Copies of encrypted snapshots are encrypted, even if this parameter is false or if encryption by default is not enabled.
1075 1076 1077 |
# File 'dlm/cfn_lifecycle_policy.rb', line 1075 def encrypted @encrypted end |
#retain_rule ⇒ AWSCDK::IResolvable, ... (readonly)
The retention rule that indicates how long the cross-Region snapshot or AMI copies are to be retained in the destination Region.
1097 1098 1099 |
# File 'dlm/cfn_lifecycle_policy.rb', line 1097 def retain_rule @retain_rule end |
#target ⇒ String? (readonly)
Use this parameter for snapshot policies only. For AMI policies, use TargetRegion instead.
[Custom snapshot policies only] The target Region or the Amazon Resource Name (ARN) of the target Outpost for the snapshot copies.
1104 1105 1106 |
# File 'dlm/cfn_lifecycle_policy.rb', line 1104 def target @target end |
#target_region ⇒ String? (readonly)
Use this parameter for AMI policies only.
For snapshot policies, use Target instead. For snapshot policies created before the Target parameter was introduced, this parameter indicates the target Region for snapshot copies.
[Custom AMI policies only] The target Region or the Amazon Resource Name (ARN) of the target Outpost for the snapshot copies.
1113 1114 1115 |
# File 'dlm/cfn_lifecycle_policy.rb', line 1113 def target_region @target_region end |
Class Method Details
.jsii_properties ⇒ Object
1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 |
# File 'dlm/cfn_lifecycle_policy.rb', line 1115 def self.jsii_properties { :encrypted => "encrypted", :cmk_arn => "cmkArn", :copy_tags => "copyTags", :deprecate_rule => "deprecateRule", :retain_rule => "retainRule", :target => "target", :target_region => "targetRegion", } end |
Instance Method Details
#to_jsii ⇒ Object
1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 |
# File 'dlm/cfn_lifecycle_policy.rb', line 1127 def to_jsii result = {} result.merge!({ "encrypted" => @encrypted, "cmkArn" => @cmk_arn, "copyTags" => @copy_tags, "deprecateRule" => @deprecate_rule, "retainRule" => @retain_rule, "target" => @target, "targetRegion" => @target_region, }) result.compact end |