Module: AWSCDK::Codepipeline::IAction

Included in:
Action
Defined in:
codepipeline/i_action.rb

Overview

A Pipeline Action.

If you want to implement this interface, consider extending the Action class, which contains some common logic.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.jsii_overridable_methodsObject



48
49
50
51
52
53
54
# File 'codepipeline/i_action.rb', line 48

def self.jsii_overridable_methods
  {
    :action_properties => { kind: :property, name: "actionProperties", is_optional: false },
    :bind => { kind: :method, name: "bind", is_optional: false },
    :on_state_change => { kind: :method, name: "onStateChange", is_optional: false },
  }
end

Instance Method Details

#action_propertiesAWSCDK::Codepipeline::ActionProperties

The simple properties of the Action, like its Owner, name, etc.

Note that this accessor will be called before the bind callback.



16
17
18
# File 'codepipeline/i_action.rb', line 16

def action_properties()
  jsii_get_property("actionProperties")
end

#bind(scope, stage, options) ⇒ AWSCDK::Codepipeline::ActionConfig

The callback invoked when this Action is added to a Pipeline.

Parameters:

  • scope (Constructs::Construct)

    the Construct tree scope the Action can use if it needs to create any resources.

  • stage (AWSCDK::Codepipeline::IStage)

    the IStage this Action is being added to.

  • options (AWSCDK::Codepipeline::ActionBindOptions)

    additional options the Action can use, like the artifact Bucket of the pipeline it's being added to.

Returns:



26
27
28
29
30
31
32
# File 'codepipeline/i_action.rb', line 26

def bind(scope, stage, options)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  Jsii::Type.check_type(stage, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lLklTdGFnZSJ9")), "stage")
  options = options.is_a?(Hash) ? ::AWSCDK::Codepipeline::ActionBindOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lLkFjdGlvbkJpbmRPcHRpb25zIn0=")), "options")
  jsii_call_method("bind", [scope, stage, options])
end

#on_state_change(name, target = nil, options = nil) ⇒ AWSCDK::Events::Rule

Creates an Event that will be triggered whenever the state of this Action changes.

Parameters:

  • name (String)

    the name to use for the new Event.

  • target (AWSCDK::Events::IRuleTarget, nil) (defaults to: nil)

    the optional target for the Event.

  • options (AWSCDK::Events::RuleProps, nil) (defaults to: nil)

    additional options that can be used to customize the created Event.

Returns:



40
41
42
43
44
45
46
# File 'codepipeline/i_action.rb', line 40

def on_state_change(name, target = nil, options = nil)
  Jsii::Type.check_type(name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLklSdWxlVGFyZ2V0In0=")), "target") unless target.nil?
  options = options.is_a?(Hash) ? ::AWSCDK::Events::RuleProps.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLlJ1bGVQcm9wcyJ9")), "options") unless options.nil?
  jsii_call_method("onStateChange", [name, target, options])
end