StagePlacement

class aws_cdk.aws_codepipeline.StagePlacement(*, just_after=None, right_before=None)

Bases: object

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.

Parameters:
  • just_after (Optional[IStage]) – Inserts the new Stage as a child of the given Stage (changing its current child Stage, if it had one).

  • right_before (Optional[IStage]) – Inserts the new Stage as a parent of the given Stage (changing its current parent Stage, if it had one).

See:

#justAfter

ExampleMetadata:

infused

Example:

# Insert a new Stage at an arbitrary point
# pipeline: codepipeline.Pipeline
# another_stage: codepipeline.IStage
# yet_another_stage: codepipeline.IStage


some_stage = pipeline.add_stage(
    stage_name="SomeStage",
    placement=codepipeline.StagePlacement(
        # note: you can only specify one of the below properties
        right_before=another_stage,
        just_after=yet_another_stage
    )
)

Attributes

just_after

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

right_before

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