StepFunctionInvokeAction Class
StepFunctionInvokeAction that is provided by an AWS CodePipeline.
Example
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
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
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());
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 }
});
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,
},
})
Initializer
ts
new StepFunctionInvokeAction(props: StepFunctionsInvokeActionProps)
python
StepFunctionInvokeAction(props: StepFunctionsInvokeActionProps)
java
new StepFunctionInvokeAction(StepFunctionsInvokeActionProps props)
csharp
new StepFunctionInvokeAction(StepFunctionsInvokeActionProps props)
go
NewStepFunctionInvokeAction(Props StepFunctionsInvokeActionProps)
Properties
actionPropertiesActionPropertiesaction_propertiesActionPropertiesactionPropertiesActionPropertiesActionPropertiesActionPropertiesActionPropertiesActionPropertiesrequired#The simple properties of the Action, like its Owner, name, etc.
Note that this accessor will be called before the bind callback.
Methods
bind(scope: Construct, stage: IStage, options: ActionBindOptions): ActionConfigdef bind(self, scope: Construct, stage: IStage, options: ActionBindOptions) -> ActionConfigpublic ActionConfig bind(Construct scope, IStage stage, ActionBindOptions options)public ActionConfig Bind(Construct scope, IStage stage, ActionBindOptions options)func Bind(Scope Construct, Stage IStage, Options ActionBindOptions) ActionConfig#The callback invoked when this Action is added to a Pipeline.
onStateChange(name: string, target?: IRuleTarget, options?: RuleProps): Ruledef on_state_change(self, name: str, target: typing.Optional[IRuleTarget] = None, options: typing.Optional[RuleProps] = None) -> Rulepublic Rule onStateChange(String name, IRuleTarget target, RuleProps options)public Rule OnStateChange(string name, IRuleTarget? target = null, RuleProps? options = null)func OnStateChange(Name *string, Target IRuleTarget, Options RuleProps) Rule#Creates an Event that will be triggered whenever the state of this Action changes.