Interface CloudFormationExecuteChangeSetActionProps

All Superinterfaces:
CommonActionProps, CommonAwsActionProps, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CloudFormationExecuteChangeSetActionProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:23:58.958Z") @Stability(Stable) public interface CloudFormationExecuteChangeSetActionProps extends software.amazon.jsii.JsiiSerializable, CommonAwsActionProps
Properties for the CloudFormationExecuteChangeSetAction.

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();
 
  • Method Details

    • getChangeSetName

      @Stability(Stable) @NotNull String getChangeSetName()
      Name of the change set to execute.
    • getStackName

      @Stability(Stable) @NotNull String getStackName()
      The name of the stack to apply this action to.
    • getAccount

      @Stability(Stable) @Nullable default String getAccount()
      The AWS account this Action is supposed to operate in.

      Note: if you specify the role property, 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

      @Stability(Stable) @Nullable default Artifact getOutput()
      The name of the output artifact to generate.

      Only applied if outputFileName is set as well.

      Default: Automatically generated artifact name.

    • getOutputFileName

      @Stability(Stable) @Nullable default String 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

      @Stability(Stable) @Nullable default String 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#crossRegionReplicationBuckets property. If you don't, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets, that you will need to cdk deploy before deploying the main, Pipeline-containing Stack.

      Default: the Action resides in the same region as the Pipeline

    • builder

      @Stability(Stable) static CloudFormationExecuteChangeSetActionProps.Builder builder()
      Returns:
      a CloudFormationExecuteChangeSetActionProps.Builder of CloudFormationExecuteChangeSetActionProps