StageDeployment

class aws_cdk.pipelines.StageDeployment(*args: Any, **kwargs)

Bases: object

Deployment of a single Stage.

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

ExampleMetadata:

fixture=_generated

Example:

# 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
# stage: cdk.Stage
# step: pipelines.Step

stage_deployment = pipelines.StageDeployment.from_stage(stage,
    post=[step],
    pre=[step],
    stack_steps=[pipelines.StackSteps(
        stack=stack,

        # the properties below are optional
        change_set=[step],
        post=[step],
        pre=[step]
    )],
    stage_name="stageName"
)

Methods

add_post(*steps)

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

Parameters:

steps (Step) –

Return type:

None

add_pre(*steps)

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

Parameters:

steps (Step) –

Return type:

None

Attributes

post

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

pre

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

prepare_step

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

stack_steps

Instructions for additional steps that are run at stack level.

stacks

The stacks deployed in this stage.

stage_name

The display name of this stage.

Static Methods

classmethod from_stage(stage, *, post=None, pre=None, stack_steps=None, stage_name=None)

Create a new StageDeployment from a Stage.

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

Parameters:
  • stage (Stage) –

  • post (Optional[Sequence[Step]]) – Additional steps to run after all of the stacks in the stage. Default: - No additional steps

  • pre (Optional[Sequence[Step]]) – Additional steps to run before any of the stacks in the stage. Default: - No additional steps

  • stack_steps (Optional[Sequence[Union[StackSteps, Dict[str, Any]]]]) – Instructions for additional steps that are run at the stack level. Default: - No additional instructions

  • stage_name (Optional[str]) – Stage name to use in the pipeline. Default: - Use Stage’s construct ID

Return type:

StageDeployment