aws-cdk-lib.aws_codepipeline_actions.StateMachineInput

class StateMachineInput

LanguageType name
.NETAmazon.CDK.AWS.CodePipeline.Actions.StateMachineInput
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscodepipelineactions#StateMachineInput
Javasoftware.amazon.awscdk.services.codepipeline.actions.StateMachineInput
Pythonaws_cdk.aws_codepipeline_actions.StateMachineInput
TypeScript (source)aws-cdk-lib » aws_codepipeline_actions » StateMachineInput

Represents the input for the StateMachine.

Example

import * as stepfunctions from 'aws-cdk-lib/aws-stepfunctions';
const pipeline = new codepipeline.Pipeline(this, 'MyPipeline');
const startState = new stepfunctions.Pass(this, 'StartState');
const simpleStateMachine  = new stepfunctions.StateMachine(this, 'SimpleStateMachine', {
  definition: startState,
});
const stepFunctionAction = new codepipeline_actions.StepFunctionInvokeAction({
  actionName: 'Invoke',
  stateMachine: simpleStateMachine,
  stateMachineInput: codepipeline_actions.StateMachineInput.literal({ IsHelloWorldExample: true }),
});
pipeline.addStage({
  stageName: 'StepFunctions',
  actions: [stepFunctionAction],
});

Properties

NameTypeDescription
inputanyWhen InputType is set to Literal (default), the Input field is used directly as the input for the state machine execution.
inputArtifact?ArtifactThe optional input Artifact of the Action.
inputType?stringOptional StateMachine InputType InputType can be Literal or FilePath.

input

Type: any

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.


inputArtifact?

Type: Artifact (optional, default: the Action will not have any inputs)

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.

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


inputType?

Type: string (optional, default: Literal)

Optional StateMachine InputType InputType can be Literal or FilePath.

Methods

NameDescription
static filePath(inputFile)When the input type is FilePath, input artifact and filepath must be specified.
static literal(object)When the input type is Literal, input value is passed directly to the state machine input.

static filePath(inputFile)

public static filePath(inputFile: ArtifactPath): StateMachineInput

Parameters

  • inputFile ArtifactPath

Returns

  • StateMachineInput

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


static literal(object)

public static literal(object: json): StateMachineInput

Parameters

  • object json

Returns

  • StateMachineInput

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