ManualApprovalStep

class aws_cdk.pipelines.ManualApprovalStep(id, *, comment=None, notification_topic=None, review_url=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")
topic = sns.Topic(self, "ChangeApprovalTopic")

pipeline.add_stage(preprod,
    post=[
        pipelines.ShellStep("Validate Endpoint",
            commands=["curl -Ssf https://my.webservice.com/"]
        )
    ]
)
pipeline.add_stage(prod,
    pre=[pipelines.ManualApprovalStep("PromoteToProd",
        # All options below are optional
        comment="Please validate changes",
        review_url="https://my.webservice.com/",
        notification_topic=topic
    )]
)
Parameters:
  • id (str) – Identifier for this step.

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

  • notification_topic (Optional[ITopic]) – Optional SNS topic to send notifications to when an approval is pending. Default: - No notifications

  • review_url (Optional[str]) – The URL for review associated with this manual approval. Default: - No URL

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

consumed_stack_outputs

StackOutputReferences this step consumes.

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.

notification_topic

Optional SNS topic to send notifications.

Default:
  • No notifications

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.

review_url

The URL for review associated with this manual approval.

Default:
  • No URL

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]