Class: AWSCDK::Events::BaseArchiveProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Events::BaseArchiveProps
- Defined in:
- events/base_archive_props.rb
Overview
The event archive base properties.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#archive_name ⇒ String?
readonly
The name of the archive.
-
#description ⇒ String?
readonly
A description for the archive.
-
#event_pattern ⇒ AWSCDK::Events::EventPattern
readonly
An event pattern to use to filter events sent to the archive.
-
#kms_key ⇒ AWSCDK::KMS::IKey?
readonly
The customer managed key that encrypts this archive.
-
#retention ⇒ AWSCDK::Duration?
readonly
The number of days to retain events for.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(event_pattern:, archive_name: nil, description: nil, kms_key: nil, retention: nil) ⇒ BaseArchiveProps
constructor
A new instance of BaseArchiveProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(event_pattern:, archive_name: nil, description: nil, kms_key: nil, retention: nil) ⇒ BaseArchiveProps
Returns a new instance of BaseArchiveProps.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'events/base_archive_props.rb', line 12 def initialize(event_pattern:, archive_name: nil, description: nil, kms_key: nil, retention: nil) @event_pattern = event_pattern.is_a?(Hash) ? ::AWSCDK::Events::EventPattern.new(**event_pattern.transform_keys(&:to_sym)) : event_pattern Jsii::Type.check_type(@event_pattern, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLkV2ZW50UGF0dGVybiJ9")), "eventPattern") @archive_name = archive_name Jsii::Type.check_type(@archive_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "archiveName") unless @archive_name.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @kms_key = kms_key Jsii::Type.check_type(@kms_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "kmsKey") unless @kms_key.nil? @retention = retention Jsii::Type.check_type(@retention, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "retention") unless @retention.nil? end |
Instance Attribute Details
#archive_name ⇒ String? (readonly)
Note:
Default: - Automatically generated
The name of the archive.
33 34 35 |
# File 'events/base_archive_props.rb', line 33 def archive_name @archive_name end |
#description ⇒ String? (readonly)
Note:
Default: - none
A description for the archive.
38 39 40 |
# File 'events/base_archive_props.rb', line 38 def description @description end |
#event_pattern ⇒ AWSCDK::Events::EventPattern (readonly)
An event pattern to use to filter events sent to the archive.
28 29 30 |
# File 'events/base_archive_props.rb', line 28 def event_pattern @event_pattern end |
#kms_key ⇒ AWSCDK::KMS::IKey? (readonly)
Note:
Default: - Use an AWS managed key
The customer managed key that encrypts this archive.
43 44 45 |
# File 'events/base_archive_props.rb', line 43 def kms_key @kms_key end |
#retention ⇒ AWSCDK::Duration? (readonly)
Note:
Default: - Infinite
The number of days to retain events for.
Default value is 0. If set to 0, events are retained indefinitely.
50 51 52 |
# File 'events/base_archive_props.rb', line 50 def retention @retention end |
Class Method Details
.jsii_properties ⇒ Object
52 53 54 55 56 57 58 59 60 |
# File 'events/base_archive_props.rb', line 52 def self.jsii_properties { :event_pattern => "eventPattern", :archive_name => "archiveName", :description => "description", :kms_key => "kmsKey", :retention => "retention", } end |
Instance Method Details
#to_jsii ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 |
# File 'events/base_archive_props.rb', line 62 def to_jsii result = {} result.merge!({ "eventPattern" => @event_pattern, "archiveName" => @archive_name, "description" => @description, "kmsKey" => @kms_key, "retention" => @retention, }) result.compact end |