Class: AWSCDK::DLM::CfnLifecyclePolicy::ShareRuleProperty

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

Overview

[Custom snapshot policies only] Specifies a rule for sharing snapshots across AWS accounts .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target_accounts: nil, unshare_interval: nil, unshare_interval_unit: nil) ⇒ ShareRuleProperty

Returns a new instance of ShareRuleProperty.

Parameters:

  • target_accounts (Array<String>, nil) (defaults to: nil)

    The IDs of the AWS accounts with which to share the snapshots.

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

    The period after which snapshots that are shared with other AWS accounts are automatically unshared.

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

    The unit of time for the automatic unsharing interval.



2228
2229
2230
2231
2232
2233
2234
2235
# File 'dlm/cfn_lifecycle_policy.rb', line 2228

def initialize(target_accounts: nil, unshare_interval: nil, unshare_interval_unit: nil)
  @target_accounts = target_accounts
  Jsii::Type.check_type(@target_accounts, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "targetAccounts") unless @target_accounts.nil?
  @unshare_interval = unshare_interval
  Jsii::Type.check_type(@unshare_interval, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "unshareInterval") unless @unshare_interval.nil?
  @unshare_interval_unit = unshare_interval_unit
  Jsii::Type.check_type(@unshare_interval_unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "unshareIntervalUnit") unless @unshare_interval_unit.nil?
end

Instance Attribute Details

#target_accountsArray<String>? (readonly)

The IDs of the AWS accounts with which to share the snapshots.



2241
2242
2243
# File 'dlm/cfn_lifecycle_policy.rb', line 2241

def target_accounts
  @target_accounts
end

#unshare_intervalNumeric? (readonly)

The period after which snapshots that are shared with other AWS accounts are automatically unshared.



2246
2247
2248
# File 'dlm/cfn_lifecycle_policy.rb', line 2246

def unshare_interval
  @unshare_interval
end

#unshare_interval_unitString? (readonly)

The unit of time for the automatic unsharing interval.



2251
2252
2253
# File 'dlm/cfn_lifecycle_policy.rb', line 2251

def unshare_interval_unit
  @unshare_interval_unit
end

Class Method Details

.jsii_propertiesObject



2253
2254
2255
2256
2257
2258
2259
# File 'dlm/cfn_lifecycle_policy.rb', line 2253

def self.jsii_properties
  {
    :target_accounts => "targetAccounts",
    :unshare_interval => "unshareInterval",
    :unshare_interval_unit => "unshareIntervalUnit",
  }
end

Instance Method Details

#to_jsiiObject



2261
2262
2263
2264
2265
2266
2267
2268
2269
# File 'dlm/cfn_lifecycle_policy.rb', line 2261

def to_jsii
  result = {}
  result.merge!({
    "targetAccounts" => @target_accounts,
    "unshareInterval" => @unshare_interval,
    "unshareIntervalUnit" => @unshare_interval_unit,
  })
  result.compact
end