Class: AWSCDK::SchedulerTargets::SNSPublish

Inherits:
ScheduleTargetBase
  • Object
show all
Includes:
AWSCDK::Scheduler::IScheduleTarget
Defined in:
scheduler_targets/sns_publish.rb

Overview

Use an Amazon SNS topic as a target for AWS EventBridge Scheduler.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(topic, props = nil) ⇒ SNSPublish

Returns a new instance of SNSPublish.

Parameters:



11
12
13
14
15
16
# File 'scheduler_targets/sns_publish.rb', line 11

def initialize(topic, props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::SchedulerTargets::ScheduleTargetBaseProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(topic, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc25zLklUb3BpYyJ9")), "topic")
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2NoZWR1bGVyX3RhcmdldHMuU2NoZWR1bGVUYXJnZXRCYXNlUHJvcHMifQ==")), "props") unless props.nil?
  Jsii::Object.instance_method(:initialize).bind(self).call(topic, props)
end

Class Method Details

.jsii_overridable_methodsObject



18
19
20
21
22
23
24
25
# File 'scheduler_targets/sns_publish.rb', line 18

def self.jsii_overridable_methods
  {
    :target_arn => { kind: :property, name: "targetArn", is_optional: false },
    :add_target_action_to_role => { kind: :method, name: "addTargetActionToRole", is_optional: false },
    :bind => { kind: :method, name: "bind", is_optional: false },
    :bind_base_target_config => { kind: :method, name: "bindBaseTargetConfig", is_optional: false },
  }
end

Instance Method Details

#add_target_action_to_role(role) ⇒ void

This method returns an undefined value.

Parameters:



34
35
36
37
# File 'scheduler_targets/sns_publish.rb', line 34

def add_target_action_to_role(role)
  Jsii::Type.check_type(role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role")
  jsii_call_method("addTargetActionToRole", [role])
end

#bind(schedule) ⇒ AWSCDK::Scheduler::ScheduleTargetConfig

Create a return a Schedule Target Configuration for the given schedule.

Parameters:

Returns:



43
44
45
46
# File 'scheduler_targets/sns_publish.rb', line 43

def bind(schedule)
  Jsii::Type.check_type(schedule, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2NoZWR1bGVyLklTY2hlZHVsZSJ9")), "schedule")
  jsii_call_method("bind", [schedule])
end

#bind_base_target_config(_schedule) ⇒ AWSCDK::Scheduler::ScheduleTargetConfig



50
51
52
53
# File 'scheduler_targets/sns_publish.rb', line 50

def bind_base_target_config(_schedule)
  Jsii::Type.check_type(_schedule, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2NoZWR1bGVyLklTY2hlZHVsZSJ9")), "_schedule")
  jsii_call_method("bindBaseTargetConfig", [_schedule])
end

#target_arnString

Returns:

  • (String)


28
29
30
# File 'scheduler_targets/sns_publish.rb', line 28

def target_arn()
  jsii_get_property("targetArn")
end