ManualApprovalStep

class aws_cdk.pipelines.ManualApprovalStep(id, *, comment=None)

Bases: Step

A manual approval step.

If this step is added to a Pipeline, the Pipeline will be paused waiting for a human to resume it

Only engines that support pausing the deployment will support this step type.

ExampleMetadata:

infused

Example:

# pipeline: pipelines.CodePipeline

preprod = MyApplicationStage(self, "PreProd")
prod = MyApplicationStage(self, "Prod")

pipeline.add_stage(preprod,
    post=[
        pipelines.ShellStep("Validate Endpoint",
            commands=["curl -Ssf https://my.webservice.com/"]
        )
    ]
)
pipeline.add_stage(prod,
    pre=[
        pipelines.ManualApprovalStep("PromoteToProd")
    ]
)
Parameters:
  • id (str) –

  • comment (Optional[str]) – The comment to display with this manual approval. Default: - No comment

Methods

add_step_dependency(step)

Add a dependency on another step.

Parameters:

step (Step) –

Return type:

None

to_string()

Return a string representation of this Step.

Return type:

str

Attributes

comment

The comment associated with this manual approval.

Default:
  • No comment

dependencies

Return the steps this step depends on, based on the FileSets it requires.

dependency_file_sets

The list of FileSets consumed by this Step.

id

Identifier for this step.

is_source

Whether or not this is a Source step.

What it means to be a Source step depends on the engine.

primary_output

The primary FileSet produced by this Step.

Not all steps produce an output FileSet–if they do you can substitute the Step object for the FileSet object.

Static Methods

classmethod sequence(steps)

Define a sequence of steps to be executed in order.

If you need more fine-grained step ordering, use the addStepDependency() API. For example, if you want secondStep to occur after firstStep, call secondStep.addStepDependency(firstStep).

Parameters:

steps (Sequence[Step]) –

Return type:

List[Step]