ManualApprovalStepProps Struct
Construction properties for a ManualApprovalStep.
| Source | pipelines/lib/blueprint/manual-approval.ts |
|---|---|
| Type last changed |
Example
ts
declare const pipeline: pipelines.CodePipeline;
const preprod = new MyApplicationStage(this, 'PreProd');
const prod = new MyApplicationStage(this, 'Prod');
const topic = new sns.Topic(this, 'ChangeApprovalTopic');
pipeline.addStage(preprod, {
post: [
new pipelines.ShellStep('Validate Endpoint', {
commands: ['curl -Ssf https://my.webservice.com/'],
}),
],
});
pipeline.addStage(prod, {
pre: [new pipelines.ManualApprovalStep('PromoteToProd', {
//All options below are optional
comment: 'Please validate changes',
reviewUrl: 'https://my.webservice.com/',
notificationTopic: topic,
})],
});
python
# 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
)]
)
java
CodePipeline pipeline;
MyApplicationStage preprod = new MyApplicationStage(this, "PreProd");
MyApplicationStage prod = new MyApplicationStage(this, "Prod");
Topic topic = new Topic(this, "ChangeApprovalTopic");
pipeline.addStage(preprod, AddStageOpts.builder()
.post(List.of(
ShellStep.Builder.create("Validate Endpoint")
.commands(List.of("curl -Ssf https://my.webservice.com/"))
.build()))
.build());
pipeline.addStage(prod, AddStageOpts.builder()
.pre(List.of(ManualApprovalStep.Builder.create("PromoteToProd")
//All options below are optional
.comment("Please validate changes")
.reviewUrl("https://my.webservice.com/")
.notificationTopic(topic)
.build()))
.build());
csharp
// Install: dotnet add package Amazon.CDK.Lib
CodePipeline pipeline;
var preprod = new MyApplicationStage(this, "PreProd");
var prod = new MyApplicationStage(this, "Prod");
var topic = new Topic(this, "ChangeApprovalTopic");
pipeline.AddStage(preprod, new AddStageOpts {
Post = new [] {
new ShellStep("Validate Endpoint", new ShellStepProps {
Commands = new [] { "curl -Ssf https://my.webservice.com/" }
}) }
});
pipeline.AddStage(prod, new AddStageOpts {
Pre = new [] { new ManualApprovalStep("PromoteToProd", new ManualApprovalStepProps {
//All options below are optional
Comment = "Please validate changes",
ReviewUrl = "https://my.webservice.com/",
NotificationTopic = topic
}) }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var pipeline CodePipeline
preprod := newMyApplicationStage(this, jsii.String("PreProd"))
prod := newMyApplicationStage(this, jsii.String("Prod"))
topic := sns.NewTopic(this, jsii.String("ChangeApprovalTopic"))
pipeline.AddStage(preprod, &AddStageOpts{
Post: []Step{
pipelines.NewShellStep(jsii.String("Validate Endpoint"), &ShellStepProps{
Commands: []*string{
jsii.String("curl -Ssf https://my.webservice.com/"),
},
}),
},
})
pipeline.AddStage(prod, &AddStageOpts{
Pre: []Step{
pipelines.NewManualApprovalStep(jsii.String("PromoteToProd"), &ManualApprovalStepProps{
//All options below are optional
Comment: jsii.String("Please validate changes"),
ReviewUrl: jsii.String("https://my.webservice.com/"),
NotificationTopic: topic,
}),
},
})
Properties
commentoptionalstringcommentoptionalstrcommentoptionalStringCommentoptionalstringCommentoptional*string #The comment to display with this manual approval.
Default: No comment
notificationTopicoptionalITopicnotification_topicoptionalITopicnotificationTopicoptionalITopicNotificationTopicoptionalITopicNotificationTopicoptionalITopic #Optional SNS topic to send notifications to when an approval is pending.
Default: No notifications
reviewUrloptionalstringreview_urloptionalstrreviewUrloptionalStringReviewUrloptionalstringReviewUrloptional*string #The URL for review associated with this manual approval.
Default: No URL