# StepFunctionsInvokeActionProps

Construction properties of the `StepFunctionsInvokeAction StepFunction Invoke Action`.

Extends: [CommonAwsActionProps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline.CommonAwsActionProps.html)
Used as props by: [StepFunctionInvokeAction](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline_actions.StepFunctionInvokeAction.html)

- Source: [`aws-codepipeline-actions/lib/stepfunctions/invoke-action.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-codepipeline-actions/lib/stepfunctions/invoke-action.ts#L68)

## Example

TypeScript:

```ts
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],
});
```

Python:

```python
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]
)
```

Java:

```java
import software.amazon.awscdk.services.stepfunctions.*;

Pipeline pipeline = new Pipeline(this, "MyPipeline");
Pass startState = new Pass(this, "StartState");
StateMachine simpleStateMachine = StateMachine.Builder.create(this, "SimpleStateMachine")
        .definition(startState)
        .build();
StepFunctionInvokeAction stepFunctionAction = StepFunctionInvokeAction.Builder.create()
        .actionName("Invoke")
        .stateMachine(simpleStateMachine)
        .stateMachineInput(StateMachineInput.literal(Map.of("IsHelloWorldExample", true)))
        .build();
pipeline.addStage(StageOptions.builder()
        .stageName("StepFunctions")
        .actions(List.of(stepFunctionAction))
        .build());
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
using Amazon.CDK.AWS.StepFunctions;

var pipeline = new Pipeline(this, "MyPipeline");
var startState = new Pass(this, "StartState");
var simpleStateMachine = new StateMachine(this, "SimpleStateMachine", new StateMachineProps {
    Definition = startState
});
var stepFunctionAction = new StepFunctionInvokeAction(new StepFunctionsInvokeActionProps {
    ActionName = "Invoke",
    StateMachine = simpleStateMachine,
    StateMachineInput = StateMachineInput.Literal(new Dictionary<string, boolean> { { "IsHelloWorldExample", true } })
});
pipeline.AddStage(new StageOptions {
    StageName = "StepFunctions",
    Actions = new [] { stepFunctionAction }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
import "github.com/aws/aws-cdk-go/awscdk"

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
startState := stepfunctions.NewPass(this, jsii.String("StartState"))
simpleStateMachine := stepfunctions.NewStateMachine(this, jsii.String("SimpleStateMachine"), &StateMachineProps{
	Definition: startState,
})
stepFunctionAction := codepipeline_actions.NewStepFunctionInvokeAction(&StepFunctionsInvokeActionProps{
	ActionName: jsii.String("Invoke"),
	StateMachine: simpleStateMachine,
	StateMachineInput: codepipeline_actions.StateMachineInput_Literal(map[string]*bool{
		"IsHelloWorldExample": jsii.Boolean(true),
	}),
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("StepFunctions"),
	Actions: []IAction{
		stepFunctionAction,
	},
})
```

## Properties

- `actionName`: string (required) — The physical, human-readable name of the Action.

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

- `executionNamePrefix`: string — Prefix (optional).

  **Default:** action execution ID

  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.

- `output`: [Artifact](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline.Artifact.html) — The optional output Artifact of the Action.

  **Default:** the Action will not have any outputs

- `role`: [IRole](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The Role in which context's this Action will be executing in.

  **Default:** a new Role will be generated

  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.

- `runOrder`: number = 1 — The runOrder property for this Action.

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

- `stateMachine`: [IStateMachine](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.IStateMachine.html) (required) — The state machine to invoke.

- `stateMachineInput`: [StateMachineInput](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline_actions.StateMachineInput.html) = none — Represents the input to the StateMachine.

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

- `variablesNamespace`: string — The name of the namespace to use for variables emitted by this action.

  **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
