Interface CloudFormationExecuteChangeSetActionProps
- All Superinterfaces:
CommonActionProps,CommonAwsActionProps,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CloudFormationExecuteChangeSetActionProps.Jsii$Proxy
Example:
// Source stage: read from repository
Repository repo = Repository.Builder.create(stack, "TemplateRepo")
.repositoryName("template-repo")
.build();
Artifact sourceOutput = new Artifact("SourceArtifact");
CodeCommitSourceAction source = CodeCommitSourceAction.Builder.create()
.actionName("Source")
.repository(repo)
.output(sourceOutput)
.trigger(CodeCommitTrigger.POLL)
.build();
Map<String, Object> sourceStage = Map.of(
"stageName", "Source",
"actions", List.of(source));
// Deployment stage: create and deploy changeset with manual approval
String stackName = "OurStack";
String changeSetName = "StagedChangeSet";
Map<String, Object> prodStage = Map.of(
"stageName", "Deploy",
"actions", List.of(
CloudFormationCreateReplaceChangeSetAction.Builder.create()
.actionName("PrepareChanges")
.stackName(stackName)
.changeSetName(changeSetName)
.adminPermissions(true)
.templatePath(sourceOutput.atPath("template.yaml"))
.runOrder(1)
.build(),
ManualApprovalAction.Builder.create()
.actionName("ApproveChanges")
.runOrder(2)
.build(),
CloudFormationExecuteChangeSetAction.Builder.create()
.actionName("ExecuteChanges")
.stackName(stackName)
.changeSetName(changeSetName)
.runOrder(3)
.build()));
Pipeline.Builder.create(stack, "Pipeline")
.crossAccountKeys(true)
.stages(List.of(sourceStage, prodStage))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCloudFormationExecuteChangeSetActionPropsstatic final classAn implementation forCloudFormationExecuteChangeSetActionProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default StringThe AWS account this Action is supposed to operate in.Name of the change set to execute.default ArtifactThe name of the output artifact to generate.default StringA name for the filename in the output artifact to store the AWS CloudFormation call's result.default StringThe AWS region the given Action resides in.The name of the stack to apply this action to.Methods inherited from interface software.amazon.awscdk.services.codepipeline.CommonActionProps
getActionName, getRunOrder, getVariablesNamespaceMethods inherited from interface software.amazon.awscdk.services.codepipeline.CommonAwsActionProps
getRoleMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getChangeSetName
Name of the change set to execute. -
getStackName
The name of the stack to apply this action to. -
getAccount
The AWS account this Action is supposed to operate in.Note: if you specify the
roleproperty, this is ignored - the action will operate in the same region the passed role does.Default: - action resides in the same account as the pipeline
-
getOutput
The name of the output artifact to generate.Only applied if
outputFileNameis set as well.Default: Automatically generated artifact name.
-
getOutputFileName
A name for the filename in the output artifact to store the AWS CloudFormation call's result.The file will contain the result of the call to AWS CloudFormation (for example the call to UpdateStack or CreateChangeSet).
AWS CodePipeline adds the file to the output artifact after performing the specified action.
Default: No output artifact generated
-
getRegion
The AWS region the given Action resides in.Note that a cross-region Pipeline requires replication buckets to function correctly. You can provide their names with the
PipelineProps#crossRegionReplicationBucketsproperty. If you don't, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets, that you will need tocdk deploybefore deploying the main, Pipeline-containing Stack.Default: the Action resides in the same region as the Pipeline
-
builder
-