CdkStage

class aws_cdk.pipelines.CdkStage(scope, id, *, cloud_assembly_artifact, host, pipeline_stage, stage_name)

Bases: aws_cdk.core.Construct

(experimental) Stage in a CdkPipeline.

You don’t need to instantiate this class directly. Use cdkPipeline.addStage() instead.

Stability

experimental

Parameters
  • scope (Construct) –

  • id (str) –

  • cloud_assembly_artifact (Artifact) – (experimental) The CodePipeline Artifact with the Cloud Assembly.

  • host (IStageHost) – (experimental) Features the Stage needs from its environment.

  • pipeline_stage (IStage) – (experimental) The underlying Pipeline Stage associated with thisCdkStage.

  • stage_name (str) – (experimental) Name of the stage that should be created.

Stability

experimental

Methods

add_actions(*actions)

(experimental) Add one or more CodePipeline Actions.

You need to make sure it is created with the right runOrder. Call nextSequentialRunOrder() for every action to get actions to execute in sequence.

Parameters

actions (IAction) –

Stability

experimental

Return type

None

add_application(app_stage, *, extra_run_order_space=None, manual_approvals=None)

(experimental) Add all stacks in the application Stage to this stage.

The application construct should subclass Stage and can contain any number of Stacks inside it that may have dependency relationships on one another.

All stacks in the application will be deployed in the appropriate order, and all assets found in the application will be added to the asset publishing stage.

Parameters
  • app_stage (Stage) –

  • extra_run_order_space (Union[int, float, None]) – (experimental) Add room for extra actions. You can use this to make extra room in the runOrder sequence between the changeset ‘prepare’ and ‘execute’ actions and insert your own actions there. Default: 0

  • manual_approvals (Optional[bool]) – (experimental) Add manual approvals before executing change sets. This gives humans the opportunity to confirm the change set looks alright before deploying it. Default: false

Stability

experimental

Return type

None

add_manual_approval_action(*, action_name=None, run_order=None)

(experimental) Add a manual approval action.

If you need more flexibility than what this method offers, use addAction with a ManualApprovalAction.

Parameters
  • action_name (Optional[str]) – (experimental) The name of the manual approval action. Default: ‘ManualApproval’ with a rolling counter

  • run_order (Union[int, float, None]) – (experimental) The runOrder for this action. Default: - The next sequential runOrder

Stability

experimental

Return type

None

add_stack_artifact_deployment(stack_artifact, *, execute_run_order=None, run_order=None)

(experimental) Add a deployment action based on a stack artifact.

Parameters
  • stack_artifact (CloudFormationStackArtifact) –

  • execute_run_order (Union[int, float, None]) – (experimental) Base runorder. Default: - runOrder + 1

  • run_order (Union[int, float, None]) – (experimental) Base runorder. Default: - Next sequential runorder

Stability

experimental

Return type

None

deploys_stack(artifact_id)

(experimental) Whether this Stage contains an action to deploy the given stack, identified by its artifact ID.

Parameters

artifact_id (str) –

Stability

experimental

Return type

bool

next_sequential_run_order(count=None)

(experimental) Return the runOrder number necessary to run the next Action in sequence with the rest.

FIXME: This is here because Actions are immutable and can’t be reordered after creation, nor is there a way to specify relative priorities, which is a limitation that we should take away in the base library.

Parameters

count (Union[int, float, None]) –

Stability

experimental

Return type

Union[int, float]

to_string()

Returns a string representation of this construct.

Return type

str

Attributes

node

The construct tree node associated with this construct.

Return type

ConstructNode

Static Methods

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool