Skip to content
v2.278.0

StackSteps Struct ​

Instructions for additional steps that are run at stack level.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { pipelines } from 'aws-cdk-lib';

declare const stack: cdk.Stack;
declare const step: pipelines.Step;
const stackSteps: pipelines.StackSteps = {
  stack: stack,

  // the properties below are optional
  changeSet: [step],
  post: [step],
  pre: [step],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import pipelines

# stack: cdk.Stack
# step: pipelines.Step

stack_steps = pipelines.StackSteps(
    stack=stack,

    # the properties below are optional
    change_set=[step],
    post=[step],
    pre=[step]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.pipelines.*;

Stack stack;
Step step;

StackSteps stackSteps = StackSteps.builder()
        .stack(stack)

        // the properties below are optional
        .changeSet(List.of(step))
        .post(List.of(step))
        .pre(List.of(step))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.Pipelines;

Stack stack;
Step step;

var stackSteps = new StackSteps {
    Stack = stack,

    // the properties below are optional
    ChangeSet = new [] { step },
    Post = new [] { step },
    Pre = new [] { step }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var stack Stack
var step Step

stackSteps := &StackSteps{
	Stack: stack,

	// the properties below are optional
	ChangeSet: []Step{
		step,
	},
	Post: []Step{
		step,
	},
	Pre: []Step{
		step,
	},
}

Properties ​

changeSetoptionalStep[]change_setoptionaltyping.List[Step]changeSetoptionalList<Step>ChangeSetoptionalStep[]ChangeSetoptional*[]Step #
Steps that execute after stack is prepared but before stack is deployed.

Default: no additional steps

postoptionalStep[]postoptionaltyping.List[Step]postoptionalList<Step>PostoptionalStep[]Postoptional*[]Step #
Steps that execute after stack is deployed.

Default: no additional steps

preoptionalStep[]preoptionaltyping.List[Step]preoptionalList<Step>PreoptionalStep[]Preoptional*[]Step #
Steps that execute before stack is prepared.

Default: no additional steps

stackStackstackStackstackStackStackStackStackStack required #
The stack you want the steps to run in.