aws-cdk-lib.pipelines.StageDeployment

class StageDeployment

LanguageType name
.NETAmazon.CDK.Pipelines.StageDeployment
Gogithub.com/aws/aws-cdk-go/awscdk/v2/pipelines#StageDeployment
Javasoftware.amazon.awscdk.pipelines.StageDeployment
Pythonaws_cdk.pipelines.StageDeployment
TypeScript (source)aws-cdk-lib » pipelines » StageDeployment

Deployment of a single Stage.

A Stage consists of one or more Stacks, which will be deployed in dependency order.

Example

// 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 stage: cdk.Stage;
declare const step: pipelines.Step;
const stageDeployment = pipelines.StageDeployment.fromStage(stage, /* all optional props */ {
  post: [step],
  pre: [step],
  stackSteps: [{
    stack: stack,

    // the properties below are optional
    changeSet: [step],
    post: [step],
    pre: [step],
  }],
  stageName: 'stageName',
});

Properties

NameTypeDescription
postStep[]Additional steps that are run after all of the stacks in the stage.
preStep[]Additional steps that are run before any of the stacks in the stage.
stackStepsStackSteps[]Instructions for additional steps that are run at stack level.
stacksStackDeployment[]The stacks deployed in this stage.
stageNamestringThe display name of this stage.
prepareStep?booleanDetermine if all stacks in stage should be deployed with prepare step or not.

post

Type: Step[]

Additional steps that are run after all of the stacks in the stage.


pre

Type: Step[]

Additional steps that are run before any of the stacks in the stage.


stackSteps

Type: StackSteps[]

Instructions for additional steps that are run at stack level.


stacks

Type: StackDeployment[]

The stacks deployed in this stage.


stageName

Type: string

The display name of this stage.


prepareStep?

Type: boolean (optional)

Determine if all stacks in stage should be deployed with prepare step or not.

Methods

NameDescription
addPost(...steps)Add an additional step to run after all of the stacks in this stage.
addPre(...steps)Add an additional step to run before any of the stacks in this stage.
static fromStage(stage, props?)Create a new StageDeployment from a Stage.

addPost(...steps)

public addPost(...steps: Step[]): void

Parameters

  • steps Step

Add an additional step to run after all of the stacks in this stage.


addPre(...steps)

public addPre(...steps: Step[]): void

Parameters

  • steps Step

Add an additional step to run before any of the stacks in this stage.


static fromStage(stage, props?)

public static fromStage(stage: Stage, props?: StageDeploymentProps): StageDeployment

Parameters

  • stage Stage
  • props StageDeploymentProps

Returns

  • StageDeployment

Create a new StageDeployment from a Stage.

Synthesizes the target stage, and deployes the stacks found inside in dependency order.