Class: AWSCDK::CodePipelineActions::StepFunctionsInvokeActionProps

Inherits:
AWSCDK::Codepipeline::CommonAWSActionProps
  • Object
show all
Defined in:
code_pipeline_actions/step_functions_invoke_action_props.rb

Overview

Construction properties of the StepFunctionsInvokeAction StepFunction Invoke Action.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action_name:, run_order: nil, variables_namespace: nil, role: nil, state_machine:, execution_name_prefix: nil, output: nil, state_machine_input: nil) ⇒ StepFunctionsInvokeActionProps

Returns a new instance of StepFunctionsInvokeActionProps.

Parameters:

  • action_name (String)

    The physical, human-readable name of the Action.

  • run_order (Numeric, nil) (defaults to: nil)

    The runOrder property for this Action.

  • variables_namespace (String, nil) (defaults to: nil)

    The name of the namespace to use for variables emitted by this action.

  • role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    The Role in which context's this Action will be executing in.

  • state_machine (AWSCDK::StepFunctions::IStateMachine)

    The state machine to invoke.

  • execution_name_prefix (String, nil) (defaults to: nil)

    Prefix (optional).

  • output (AWSCDK::Codepipeline::Artifact, nil) (defaults to: nil)

    The optional output Artifact of the Action.

  • state_machine_input (AWSCDK::CodePipelineActions::StateMachineInput, nil) (defaults to: nil)

    Represents the input to the StateMachine.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'code_pipeline_actions/step_functions_invoke_action_props.rb', line 15

def initialize(action_name:, run_order: nil, variables_namespace: nil, role: nil, state_machine:, execution_name_prefix: nil, output: nil, state_machine_input: nil)
  @action_name = action_name
  Jsii::Type.check_type(@action_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actionName")
  @run_order = run_order
  Jsii::Type.check_type(@run_order, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "runOrder") unless @run_order.nil?
  @variables_namespace = variables_namespace
  Jsii::Type.check_type(@variables_namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "variablesNamespace") unless @variables_namespace.nil?
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil?
  @state_machine = state_machine
  Jsii::Type.check_type(@state_machine, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9ucy5JU3RhdGVNYWNoaW5lIn0=")), "stateMachine")
  @execution_name_prefix = execution_name_prefix
  Jsii::Type.check_type(@execution_name_prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "executionNamePrefix") unless @execution_name_prefix.nil?
  @output = output
  Jsii::Type.check_type(@output, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lLkFydGlmYWN0In0=")), "output") unless @output.nil?
  @state_machine_input = state_machine_input
  Jsii::Type.check_type(@state_machine_input, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lX2FjdGlvbnMuU3RhdGVNYWNoaW5lSW5wdXQifQ==")), "stateMachineInput") unless @state_machine_input.nil?
end

Instance Attribute Details

#action_nameString (readonly)

The physical, human-readable name of the Action.

Note that Action names must be unique within a single Stage.

Returns:

  • (String)


39
40
41
# File 'code_pipeline_actions/step_functions_invoke_action_props.rb', line 39

def action_name
  @action_name
end

#execution_name_prefixString? (readonly)

Note:

Default: - action execution ID

Prefix (optional).

By default, the action execution ID is used as the state machine execution name. If a prefix is provided, it is prepended to the action execution ID with a hyphen and together used as the state machine execution name.

Returns:

  • (String, nil)


76
77
78
# File 'code_pipeline_actions/step_functions_invoke_action_props.rb', line 76

def execution_name_prefix
  @execution_name_prefix
end

#outputAWSCDK::Codepipeline::Artifact? (readonly)

Note:

Default: the Action will not have any outputs

The optional output Artifact of the Action.



81
82
83
# File 'code_pipeline_actions/step_functions_invoke_action_props.rb', line 81

def output
  @output
end

#roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: a new Role will be generated

The Role in which context's this Action will be executing in.

The Pipeline's Role will assume this Role (the required permissions for that will be granted automatically) right before executing this Action. This Action will be passed into your IAction.bind method in the ActionBindOptions.role property.

Returns:



63
64
65
# File 'code_pipeline_actions/step_functions_invoke_action_props.rb', line 63

def role
  @role
end

#run_orderNumeric? (readonly)

Note:

Default: 1

The runOrder property for this Action.

RunOrder determines the relative order in which multiple Actions in the same Stage execute.



47
48
49
# File 'code_pipeline_actions/step_functions_invoke_action_props.rb', line 47

def run_order
  @run_order
end

#state_machineAWSCDK::StepFunctions::IStateMachine (readonly)

The state machine to invoke.



67
68
69
# File 'code_pipeline_actions/step_functions_invoke_action_props.rb', line 67

def state_machine
  @state_machine
end

#state_machine_inputAWSCDK::CodePipelineActions::StateMachineInput? (readonly)

Note:

Default: - none

Represents the input to the StateMachine.

This includes input artifact, input type and the statemachine input.



88
89
90
# File 'code_pipeline_actions/step_functions_invoke_action_props.rb', line 88

def state_machine_input
  @state_machine_input
end

#variables_namespaceString? (readonly)

Note:

Default: - a name will be generated, based on the stage and action names, if any of the action's variables were referenced - otherwise, no namespace will be set

The name of the namespace to use for variables emitted by this action.

Returns:

  • (String, nil)


52
53
54
# File 'code_pipeline_actions/step_functions_invoke_action_props.rb', line 52

def variables_namespace
  @variables_namespace
end

Class Method Details

.jsii_propertiesObject



90
91
92
93
94
95
96
97
98
99
100
101
# File 'code_pipeline_actions/step_functions_invoke_action_props.rb', line 90

def self.jsii_properties
  {
    :action_name => "actionName",
    :run_order => "runOrder",
    :variables_namespace => "variablesNamespace",
    :role => "role",
    :state_machine => "stateMachine",
    :execution_name_prefix => "executionNamePrefix",
    :output => "output",
    :state_machine_input => "stateMachineInput",
  }
end

Instance Method Details

#to_jsiiObject



103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'code_pipeline_actions/step_functions_invoke_action_props.rb', line 103

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "actionName" => @action_name,
    "runOrder" => @run_order,
    "variablesNamespace" => @variables_namespace,
    "role" => @role,
    "stateMachine" => @state_machine,
    "executionNamePrefix" => @execution_name_prefix,
    "output" => @output,
    "stateMachineInput" => @state_machine_input,
  })
  result.compact
end