Class: AWSCDK::Events::EventBusAttributes

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

Overview

Interface with properties necessary to import a reusable EventBus.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event_bus_arn:, event_bus_name:, event_bus_policy:, event_source_name: nil) ⇒ EventBusAttributes

Returns a new instance of EventBusAttributes.

Parameters:

  • event_bus_arn (String)

    The ARN of this event bus resource.

  • event_bus_name (String)

    The physical ID of this event bus resource.

  • event_bus_policy (String)

    The JSON policy of this event bus resource.

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

    The partner event source to associate with this event bus resource.



11
12
13
14
15
16
17
18
19
20
# File 'events/event_bus_attributes.rb', line 11

def initialize(event_bus_arn:, event_bus_name:, event_bus_policy:, event_source_name: nil)
  @event_bus_arn = event_bus_arn
  Jsii::Type.check_type(@event_bus_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "eventBusArn")
  @event_bus_name = event_bus_name
  Jsii::Type.check_type(@event_bus_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "eventBusName")
  @event_bus_policy = event_bus_policy
  Jsii::Type.check_type(@event_bus_policy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "eventBusPolicy")
  @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?
end

Instance Attribute Details

#event_bus_arnString (readonly)

The ARN of this event bus resource.

Returns:

  • (String)


25
26
27
# File 'events/event_bus_attributes.rb', line 25

def event_bus_arn
  @event_bus_arn
end

#event_bus_nameString (readonly)

The physical ID of this event bus resource.

Returns:

  • (String)


29
30
31
# File 'events/event_bus_attributes.rb', line 29

def event_bus_name
  @event_bus_name
end

#event_bus_policyString (readonly)

The JSON policy of this event bus resource.

Returns:

  • (String)


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

def event_bus_policy
  @event_bus_policy
end

#event_source_nameString? (readonly)

Note:

Default: - no partner event source

The partner event source to associate with this event bus resource.

Returns:

  • (String, nil)


38
39
40
# File 'events/event_bus_attributes.rb', line 38

def event_source_name
  @event_source_name
end

Class Method Details

.jsii_propertiesObject



40
41
42
43
44
45
46
47
# File 'events/event_bus_attributes.rb', line 40

def self.jsii_properties
  {
    :event_bus_arn => "eventBusArn",
    :event_bus_name => "eventBusName",
    :event_bus_policy => "eventBusPolicy",
    :event_source_name => "eventSourceName",
  }
end

Instance Method Details

#to_jsiiObject



49
50
51
52
53
54
55
56
57
58
# File 'events/event_bus_attributes.rb', line 49

def to_jsii
  result = {}
  result.merge!({
    "eventBusArn" => @event_bus_arn,
    "eventBusName" => @event_bus_name,
    "eventBusPolicy" => @event_bus_policy,
    "eventSourceName" => @event_source_name,
  })
  result.compact
end