Module: AWSCDK::Triggers::ITrigger

Includes:
Constructs::IConstruct
Included in:
Trigger, TriggerFunction
Defined in:
triggers/i_trigger.rb

Overview

Interface for triggers.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.jsii_overridable_methodsObject



57
58
59
60
61
62
63
64
# File 'triggers/i_trigger.rb', line 57

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :with => { kind: :method, name: "with", is_optional: false },
    :execute_after => { kind: :method, name: "executeAfter", is_optional: false },
    :execute_before => { kind: :method, name: "executeBefore", is_optional: false },
  }
end

Instance Method Details

#execute_after(*scopes) ⇒ void

This method returns an undefined value.

Adds trigger dependencies.

Execute this trigger only after these construct scopes have been provisioned.

Parameters:

  • scopes (Array<Constructs::Construct>)

    A list of construct scopes which this trigger will depend on.



36
37
38
39
40
41
# File 'triggers/i_trigger.rb', line 36

def execute_after(*scopes)
  scopes.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scopes[#{index}]")
  end
  jsii_call_method("executeAfter", [*scopes])
end

#execute_before(*scopes) ⇒ void

This method returns an undefined value.

Adds this trigger as a dependency on other constructs.

This means that this trigger will get executed before the given construct(s).

Parameters:

  • scopes (Array<Constructs::Construct>)

    A list of construct scopes which will take a dependency on this trigger.



50
51
52
53
54
55
# File 'triggers/i_trigger.rb', line 50

def execute_before(*scopes)
  scopes.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scopes[#{index}]")
  end
  jsii_call_method("executeBefore", [*scopes])
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


11
12
13
# File 'triggers/i_trigger.rb', line 11

def node()
  jsii_get_property("node")
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.

Parameters:

  • mixins (Array<Constructs::IMixin>)

    The mixins to apply.

Returns:

  • (Constructs::IConstruct)

    This construct for chaining



22
23
24
25
26
27
# File 'triggers/i_trigger.rb', line 22

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