Class: AWSCDK::Events::CfnEventBusProps

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

Overview

Properties for defining a CfnEventBus.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, dead_letter_config: nil, description: nil, event_source_name: nil, kms_key_identifier: nil, log_config: nil, policy: nil, tags: nil) ⇒ CfnEventBusProps

Returns a new instance of CfnEventBusProps.

Parameters:

  • name (String)

    The name of the new event bus.

  • dead_letter_config (AWSCDK::IResolvable, AWSCDK::Events::CfnEventBus::DeadLetterConfigProperty, nil) (defaults to: nil)

    Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).

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

    The event bus description.

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

    If you are creating a partner event bus, this specifies the partner event source that the new event bus will be matched with.

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

    The identifier of the AWS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus.

  • log_config (AWSCDK::IResolvable, AWSCDK::Events::CfnEventBus::LogConfigProperty, nil) (defaults to: nil)

    The logging configuration settings for the event bus.

  • policy (Object, nil) (defaults to: nil)

    The permissions policy of the event bus, describing which other AWS accounts can write events to this event bus.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    Tags to associate with the event bus.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'events/cfn_event_bus_props.rb', line 17

def initialize(name:, dead_letter_config: nil, description: nil, event_source_name: nil, kms_key_identifier: nil, log_config: nil, policy: nil, tags: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @dead_letter_config = dead_letter_config.is_a?(Hash) ? ::AWSCDK::Events::CfnEventBus::DeadLetterConfigProperty.new(**dead_letter_config.transform_keys(&:to_sym)) : dead_letter_config
  Jsii::Type.check_type(@dead_letter_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHMuQ2ZuRXZlbnRCdXMuRGVhZExldHRlckNvbmZpZ1Byb3BlcnR5In1dfX0=")), "deadLetterConfig") unless @dead_letter_config.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.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_identifier = kms_key_identifier
  Jsii::Type.check_type(@kms_key_identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "kmsKeyIdentifier") unless @kms_key_identifier.nil?
  @log_config = log_config.is_a?(Hash) ? ::AWSCDK::Events::CfnEventBus::LogConfigProperty.new(**log_config.transform_keys(&:to_sym)) : log_config
  Jsii::Type.check_type(@log_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHMuQ2ZuRXZlbnRCdXMuTG9nQ29uZmlnUHJvcGVydHkifV19fQ==")), "logConfig") unless @log_config.nil?
  @policy = policy
  Jsii::Type.check_type(@policy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "policy") unless @policy.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#dead_letter_configAWSCDK::IResolvable, ... (readonly)

Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).

For more information, see Using dead-letter queues to process undelivered events in the EventBridge User Guide .



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

def dead_letter_config
  @dead_letter_config
end

#descriptionString? (readonly)

The event bus description.



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

def description
  @description
end

#event_source_nameString? (readonly)

If you are creating a partner event bus, this specifies the partner event source that the new event bus will be matched with.



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

def event_source_name
  @event_source_name
end

#kms_key_identifierString? (readonly)

The identifier of the AWS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus.

The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.

If you do not specify a customer managed key identifier, EventBridge uses an AWS owned key to encrypt events on the event bus.

For more information, see Identify and view keys in the AWS Key Management Service Developer Guide .

Schema discovery is not supported for event buses encrypted using a customer managed key. EventBridge returns an error if:

  • You call [CreateDiscoverer](https://docs.aws.amazon.com/eventbridge/latest/schema-reference/v1-discoverers.html#CreateDiscoverer) on an event bus set to use a customer managed key for encryption.
  • You call [UpdatedEventBus](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_UpdatedEventBus.html) to set a customer managed key on an event bus with schema discovery enabled.

To enable schema discovery on an event bus, choose to use an AWS owned key . For more information, see Encrypting events in the Amazon EventBridge User Guide . > If you have specified that EventBridge use a customer managed key for encrypting the source event bus, we strongly recommend you also specify a customer managed key for any archives for the event bus as well.

For more information, see Encrypting archives in the Amazon EventBridge User Guide .



81
82
83
# File 'events/cfn_event_bus_props.rb', line 81

def kms_key_identifier
  @kms_key_identifier
end

#log_configAWSCDK::IResolvable, ... (readonly)

The logging configuration settings for the event bus.

For more information, see Configuring logs for event buses in the EventBridge User Guide .



88
89
90
# File 'events/cfn_event_bus_props.rb', line 88

def log_config
  @log_config
end

#nameString (readonly)

The name of the new event bus.

Custom event bus names can't contain the / character, but you can use the / character in partner event bus names. In addition, for partner event buses, the name must exactly match the name of the partner event source that this event bus is matched to.

You can't use the name default for a custom event bus, as this name is already used for your account's default event bus.



44
45
46
# File 'events/cfn_event_bus_props.rb', line 44

def name
  @name
end

#policyObject? (readonly)

The permissions policy of the event bus, describing which other AWS accounts can write events to this event bus.



93
94
95
# File 'events/cfn_event_bus_props.rb', line 93

def policy
  @policy
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

Tags to associate with the event bus.



98
99
100
# File 'events/cfn_event_bus_props.rb', line 98

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



100
101
102
103
104
105
106
107
108
109
110
111
# File 'events/cfn_event_bus_props.rb', line 100

def self.jsii_properties
  {
    :name => "name",
    :dead_letter_config => "deadLetterConfig",
    :description => "description",
    :event_source_name => "eventSourceName",
    :kms_key_identifier => "kmsKeyIdentifier",
    :log_config => "logConfig",
    :policy => "policy",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'events/cfn_event_bus_props.rb', line 113

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "deadLetterConfig" => @dead_letter_config,
    "description" => @description,
    "eventSourceName" => @event_source_name,
    "kmsKeyIdentifier" => @kms_key_identifier,
    "logConfig" => @log_config,
    "policy" => @policy,
    "tags" => @tags,
  })
  result.compact
end