Class: AWSCDK::Events::EventBusProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
events/event_bus_props.rb

Overview

Properties to define an event bus.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dead_letter_queue: nil, description: nil, event_bus_name: nil, event_source_name: nil, kms_key: nil, log_config: nil) ⇒ EventBusProps

Returns a new instance of EventBusProps.

Parameters:

  • dead_letter_queue (AWSCDK::SQS::IQueue, nil) (defaults to: nil)

    Dead-letter queue for the event bus.

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

    The event bus description.

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

    The name of the event bus you are creating Note: If 'eventSourceName' is passed in, you cannot set this.

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

    The partner event source to associate with this event bus resource Note: If 'eventBusName' is passed in, you cannot set this.

  • kms_key (AWSCDK::KMS::IKey, nil) (defaults to: nil)

    The customer managed key that encrypt events on this event bus.

  • log_config (AWSCDK::Events::LogConfig, nil) (defaults to: nil)

    The Logging Configuration of the Èvent Bus.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'events/event_bus_props.rb', line 13

def initialize(dead_letter_queue: nil, description: nil, event_bus_name: nil, event_source_name: nil, kms_key: nil, log_config: nil)
  @dead_letter_queue = dead_letter_queue
  Jsii::Type.check_type(@dead_letter_queue, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3FzLklRdWV1ZSJ9")), "deadLetterQueue") unless @dead_letter_queue.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @event_bus_name = event_bus_name
  Jsii::Type.check_type(@event_bus_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "eventBusName") unless @event_bus_name.nil?
  @event_source_name = event_source_name
  Jsii::Type.check_type(@event_source_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "eventSourceName") unless @event_source_name.nil?
  @kms_key = kms_key
  Jsii::Type.check_type(@kms_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "kmsKey") unless @kms_key.nil?
  @log_config = log_config.is_a?(Hash) ? ::AWSCDK::Events::LogConfig.new(**log_config.transform_keys(&:to_sym)) : log_config
  Jsii::Type.check_type(@log_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLkxvZ0NvbmZpZyJ9")), "logConfig") unless @log_config.nil?
end

Instance Attribute Details

#dead_letter_queueAWSCDK::SQS::IQueue? (readonly)

Note:

Default: - no dead-letter queue

Dead-letter queue for the event bus.



33
34
35
# File 'events/event_bus_props.rb', line 33

def dead_letter_queue
  @dead_letter_queue
end

#descriptionString? (readonly)

Note:

Default: - no description

The event bus description.

The description can be up to 512 characters long.



41
42
43
# File 'events/event_bus_props.rb', line 41

def description
  @description
end

#event_bus_nameString? (readonly)

Note:

Default: - automatically generated name

The name of the event bus you are creating Note: If 'eventSourceName' is passed in, you cannot set this.

Returns:

  • (String, nil)


46
47
48
# File 'events/event_bus_props.rb', line 46

def event_bus_name
  @event_bus_name
end

#event_source_nameString? (readonly)

Note:

Default: - no partner event source

The partner event source to associate with this event bus resource Note: If 'eventBusName' is passed in, you cannot set this.

Returns:

  • (String, nil)


51
52
53
# File 'events/event_bus_props.rb', line 51

def event_source_name
  @event_source_name
end

#kms_keyAWSCDK::KMS::IKey? (readonly)

Note:

Default: - Use an AWS managed key

The customer managed key that encrypt events on this event bus.

Returns:



56
57
58
# File 'events/event_bus_props.rb', line 56

def kms_key
  @kms_key
end

#log_configAWSCDK::Events::LogConfig? (readonly)

Note:

Default: - no logging

The Logging Configuration of the Èvent Bus.

Returns:



61
62
63
# File 'events/event_bus_props.rb', line 61

def log_config
  @log_config
end

Class Method Details

.jsii_propertiesObject



63
64
65
66
67
68
69
70
71
72
# File 'events/event_bus_props.rb', line 63

def self.jsii_properties
  {
    :dead_letter_queue => "deadLetterQueue",
    :description => "description",
    :event_bus_name => "eventBusName",
    :event_source_name => "eventSourceName",
    :kms_key => "kmsKey",
    :log_config => "logConfig",
  }
end

Instance Method Details

#to_jsiiObject



74
75
76
77
78
79
80
81
82
83
84
85
# File 'events/event_bus_props.rb', line 74

def to_jsii
  result = {}
  result.merge!({
    "deadLetterQueue" => @dead_letter_queue,
    "description" => @description,
    "eventBusName" => @event_bus_name,
    "eventSourceName" => @event_source_name,
    "kmsKey" => @kms_key,
    "logConfig" => @log_config,
  })
  result.compact
end