Class: AWSCDK::EventsTargets::SfnStateMachine
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::EventsTargets::SfnStateMachine
- Includes:
- AWSCDK::Events::IRuleTarget
- Defined in:
- events_targets/sfn_state_machine.rb
Overview
Use a StepFunctions state machine as a target for Amazon EventBridge rules.
Class Method Summary collapse
Instance Method Summary collapse
-
#bind(rule, _id = nil) ⇒ AWSCDK::Events::RuleTargetConfig
Returns a properties that are used in an Rule to trigger this State Machine.
-
#initialize(machine, props = nil) ⇒ SfnStateMachine
constructor
A new instance of SfnStateMachine.
- #machine ⇒ AWSCDK::StepFunctions::IStateMachine
Constructor Details
#initialize(machine, props = nil) ⇒ SfnStateMachine
Returns a new instance of SfnStateMachine.
11 12 13 14 15 16 |
# File 'events_targets/sfn_state_machine.rb', line 11 def initialize(machine, props = nil) props = props.is_a?(Hash) ? ::AWSCDK::EventsTargets::SfnStateMachineProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(machine, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9ucy5JU3RhdGVNYWNoaW5lIn0=")), "machine") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzX3RhcmdldHMuU2ZuU3RhdGVNYWNoaW5lUHJvcHMifQ==")), "props") unless props.nil? Jsii::Object.instance_method(:initialize).bind(self).call(machine, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
18 19 20 21 22 23 |
# File 'events_targets/sfn_state_machine.rb', line 18 def self.jsii_overridable_methods { :machine => { kind: :property, name: "machine", is_optional: false }, :bind => { kind: :method, name: "bind", is_optional: false }, } end |
Instance Method Details
#bind(rule, _id = nil) ⇒ AWSCDK::Events::RuleTargetConfig
Returns a properties that are used in an Rule to trigger this State Machine.
36 37 38 39 40 |
# File 'events_targets/sfn_state_machine.rb', line 36 def bind(rule, _id = nil) Jsii::Type.check_type(rule, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19ldmVudHMuSVJ1bGVSZWYifQ==")), "rule") Jsii::Type.check_type(_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "_id") unless _id.nil? jsii_call_method("bind", [rule, _id]) end |
#machine ⇒ AWSCDK::StepFunctions::IStateMachine
26 27 28 |
# File 'events_targets/sfn_state_machine.rb', line 26 def machine() jsii_get_property("machine") end |