Class: AWSCDK::CustomResources::WaiterStateMachine
- Inherits:
-
Constructs::Construct
- Object
- Constructs::Construct
- AWSCDK::CustomResources::WaiterStateMachine
- Defined in:
- custom_resources/waiter_state_machine.rb
Overview
A very simple StateMachine construct highly customized to the provider framework.
We previously used CfnResource instead of CfnStateMachine to avoid depending
on aws-stepfunctions module, but now it is okay.
The state machine continuously calls the isCompleteHandler, until it succeeds or times out.
The handler is called max_attempts times with an interval duration and a backoff_rate rate.
Class Method Summary collapse
- .jsii_overridable_methods ⇒ Object
-
.PROPERTY_INJECTION_ID ⇒ String
Uniquely identifies this class.
Instance Method Summary collapse
-
#grant_start_execution(identity) ⇒ AWSCDK::IAM::Grant
Grant the given identity permissions on StartExecution of the state machine.
-
#initialize(scope, id, props) ⇒ WaiterStateMachine
constructor
A new instance of WaiterStateMachine.
-
#node ⇒ Constructs::Node
The tree node.
-
#state_machine_arn ⇒ String
The ARN of the state machine.
-
#to_string ⇒ String
Returns a string representation of this construct.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Constructor Details
#initialize(scope, id, props) ⇒ WaiterStateMachine
Returns a new instance of WaiterStateMachine.
17 18 19 20 21 22 23 |
# File 'custom_resources/waiter_state_machine.rb', line 17 def initialize(scope, id, props) props = props.is_a?(Hash) ? ::AWSCDK::CustomResources::WaiterStateMachineProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5jdXN0b21fcmVzb3VyY2VzLldhaXRlclN0YXRlTWFjaGluZVByb3BzIn0=")), "props") Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'custom_resources/waiter_state_machine.rb', line 25 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :state_machine_arn => { kind: :property, name: "stateMachineArn", is_optional: false }, :to_string => { kind: :method, name: "toString", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, :grant_start_execution => { kind: :method, name: "grantStartExecution", is_optional: false }, } end |
.PROPERTY_INJECTION_ID ⇒ String
Uniquely identifies this class.
45 46 47 |
# File 'custom_resources/waiter_state_machine.rb', line 45 def self.PROPERTY_INJECTION_ID() Jsii::Kernel.instance.get_static("aws-cdk-lib.custom_resources.WaiterStateMachine", "PROPERTY_INJECTION_ID") end |
Instance Method Details
#grant_start_execution(identity) ⇒ AWSCDK::IAM::Grant
Grant the given identity permissions on StartExecution of the state machine.
[disable-awslint:no-grants]
85 86 87 88 |
# File 'custom_resources/waiter_state_machine.rb', line 85 def grant_start_execution(identity) Jsii::Type.check_type(identity, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "identity") jsii_call_method("grantStartExecution", [identity]) end |
#node ⇒ Constructs::Node
The tree node.
38 39 40 |
# File 'custom_resources/waiter_state_machine.rb', line 38 def node() jsii_get_property("node") end |
#state_machine_arn ⇒ String
The ARN of the state machine.
52 53 54 |
# File 'custom_resources/waiter_state_machine.rb', line 52 def state_machine_arn() jsii_get_property("stateMachineArn") end |
#to_string ⇒ String
Returns a string representation of this construct.
59 60 61 |
# File 'custom_resources/waiter_state_machine.rb', line 59 def to_string() jsii_call_method("toString", []) end |
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
72 73 74 75 76 77 |
# File 'custom_resources/waiter_state_machine.rb', line 72 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |