Module: CycloneLariat::Generators::Topic

Included in:
CycloneLariat, Clients::Sns
Defined in:
lib/cyclone_lariat/generators/topic.rb

Instance Method Summary collapse

Instance Method Details

#custom_topic(name) ⇒ Object



24
25
26
# File 'lib/cyclone_lariat/generators/topic.rb', line 24

def custom_topic(name)
  Resources::Topic.from_name(name, account_id: config., region: config.aws_region)
end

#topic(type, fifo:, kind: :event, content_based_deduplication: nil, **options) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/cyclone_lariat/generators/topic.rb', line 8

def topic(type, fifo:, kind: :event, content_based_deduplication: nil, **options)
  options = CycloneLariat::Options.wrap(options)
  options.merge!(config)

  Resources::Topic.new(
    instance: options.instance,
    publisher: options.publisher,
    region: options.aws_region,
    account_id: options.,
    kind: kind,
    type: type,
    fifo: fifo,
    content_based_deduplication: content_based_deduplication
  )
end