StateMachineInput

class aws_cdk.aws_codepipeline_actions.StateMachineInput(*args: Any, **kwargs)

Bases: object

Represents the input for the StateMachine.

ExampleMetadata:

infused

Example:

import aws_cdk.aws_stepfunctions as stepfunctions

pipeline = codepipeline.Pipeline(self, "MyPipeline")
start_state = stepfunctions.Pass(self, "StartState")
simple_state_machine = stepfunctions.StateMachine(self, "SimpleStateMachine",
    definition=start_state
)
step_function_action = codepipeline_actions.StepFunctionInvokeAction(
    action_name="Invoke",
    state_machine=simple_state_machine,
    state_machine_input=codepipeline_actions.StateMachineInput.literal({"IsHelloWorldExample": True})
)
pipeline.add_stage(
    stage_name="StepFunctions",
    actions=[step_function_action]
)

Attributes

input

When InputType is set to Literal (default), the Input field is used directly as the input for the state machine execution.

Otherwise, the state machine is invoked with an empty JSON object {}.

When InputType is set to FilePath, this field is required. An input artifact is also required when InputType is set to FilePath.

Default:
  • none

input_artifact

The optional input Artifact of the Action.

If InputType is set to FilePath, this artifact is required and is used to source the input for the state machine execution.

Default:
  • the Action will not have any inputs

See:

https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-StepFunctions.html#action-reference-StepFunctions-example

input_type

Optional StateMachine InputType InputType can be Literal or FilePath.

Default:
  • Literal

Static Methods

classmethod file_path(input_file)

When the input type is FilePath, input artifact and filepath must be specified.

Parameters:

input_file (ArtifactPath) –

Return type:

StateMachineInput

classmethod literal(object)

When the input type is Literal, input value is passed directly to the state machine input.

Parameters:

object (Mapping[Any, Any]) –

Return type:

StateMachineInput