Class: AWSCDK::Events::ArchiveProps
- Inherits:
-
BaseArchiveProps
- Object
- BaseArchiveProps
- AWSCDK::Events::ArchiveProps
- Defined in:
- events/archive_props.rb
Overview
The event archive properties.
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.
-
#source_event_bus ⇒ AWSCDK::Interfaces::AWSEvents::IEventBusRef
readonly
The event source associated with the archive.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(event_pattern:, archive_name: nil, description: nil, kms_key: nil, retention: nil, source_event_bus:) ⇒ ArchiveProps
constructor
A new instance of ArchiveProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(event_pattern:, archive_name: nil, description: nil, kms_key: nil, retention: nil, source_event_bus:) ⇒ ArchiveProps
Returns a new instance of ArchiveProps.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'events/archive_props.rb', line 13 def initialize(event_pattern:, archive_name: nil, description: nil, kms_key: nil, retention: nil, source_event_bus:) @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? @source_event_bus = source_event_bus Jsii::Type.check_type(@source_event_bus, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19ldmVudHMuSUV2ZW50QnVzUmVmIn0=")), "sourceEventBus") end |
Instance Attribute Details
#archive_name ⇒ String? (readonly)
Default: - Automatically generated
The name of the archive.
36 37 38 |
# File 'events/archive_props.rb', line 36 def archive_name @archive_name end |
#description ⇒ String? (readonly)
Default: - none
A description for the archive.
41 42 43 |
# File 'events/archive_props.rb', line 41 def description @description end |
#event_pattern ⇒ AWSCDK::Events::EventPattern (readonly)
An event pattern to use to filter events sent to the archive.
31 32 33 |
# File 'events/archive_props.rb', line 31 def event_pattern @event_pattern end |
#kms_key ⇒ AWSCDK::KMS::IKey? (readonly)
Default: - Use an AWS managed key
The customer managed key that encrypts this archive.
46 47 48 |
# File 'events/archive_props.rb', line 46 def kms_key @kms_key end |
#retention ⇒ AWSCDK::Duration? (readonly)
Default: - Infinite
The number of days to retain events for.
Default value is 0. If set to 0, events are retained indefinitely.
53 54 55 |
# File 'events/archive_props.rb', line 53 def retention @retention end |
#source_event_bus ⇒ AWSCDK::Interfaces::AWSEvents::IEventBusRef (readonly)
The event source associated with the archive.
57 58 59 |
# File 'events/archive_props.rb', line 57 def source_event_bus @source_event_bus end |
Class Method Details
.jsii_properties ⇒ Object
59 60 61 62 63 64 65 66 67 68 |
# File 'events/archive_props.rb', line 59 def self.jsii_properties { :event_pattern => "eventPattern", :archive_name => "archiveName", :description => "description", :kms_key => "kmsKey", :retention => "retention", :source_event_bus => "sourceEventBus", } end |
Instance Method Details
#to_jsii ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'events/archive_props.rb', line 70 def to_jsii result = {} result.merge!(super) result.merge!({ "eventPattern" => @event_pattern, "archiveName" => @archive_name, "description" => @description, "kmsKey" => @kms_key, "retention" => @retention, "sourceEventBus" => @source_event_bus, }) result.compact end |