aws-cdk-lib.aws_codepipeline.StagePlacement

interface StagePlacement

LanguageType name
.NETAmazon.CDK.AWS.CodePipeline.StagePlacement
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscodepipeline#StagePlacement
Javasoftware.amazon.awscdk.services.codepipeline.StagePlacement
Pythonaws_cdk.aws_codepipeline.StagePlacement
TypeScript (source)aws-cdk-lib » aws_codepipeline » StagePlacement

Allows you to control where to place a new Stage when it's added to the Pipeline.

Note that you can provide only one of the below properties - specifying more than one will result in a validation error.

See also: #justAfter

Example

// Insert a new Stage at an arbitrary point
declare const pipeline: codepipeline.Pipeline;
declare const anotherStage: codepipeline.IStage;
declare const yetAnotherStage: codepipeline.IStage;

const someStage = pipeline.addStage({
  stageName: 'SomeStage',
  placement: {
    // note: you can only specify one of the below properties
    rightBefore: anotherStage,
    justAfter: yetAnotherStage,
  }
});

Properties

NameTypeDescription
justAfter?IStageInserts the new Stage as a child of the given Stage (changing its current child Stage, if it had one).
rightBefore?IStageInserts the new Stage as a parent of the given Stage (changing its current parent Stage, if it had one).

justAfter?

Type: IStage (optional)

Inserts the new Stage as a child of the given Stage (changing its current child Stage, if it had one).


rightBefore?

Type: IStage (optional)

Inserts the new Stage as a parent of the given Stage (changing its current parent Stage, if it had one).