Class StackDeployment

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.pipelines.StackDeployment
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:15.300Z") @Stability(Stable) public class StackDeployment extends software.amazon.jsii.JsiiObject
Deployment of a single Stack.

You don't need to instantiate this class -- it will be automatically instantiated as necessary when you add a Stage to a pipeline.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.cxapi.*;
 import software.amazon.awscdk.pipelines.*;
 CloudFormationStackArtifact cloudFormationStackArtifact;
 StackDeployment stackDeployment = StackDeployment.fromArtifact(cloudFormationStackArtifact);
 
  • Constructor Details

    • StackDeployment

      protected StackDeployment(software.amazon.jsii.JsiiObjectRef objRef)
    • StackDeployment

      protected StackDeployment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • fromArtifact

      @Stability(Stable) @NotNull public static StackDeployment fromArtifact(@NotNull CloudFormationStackArtifact stackArtifact)
      Build a StackDeployment from a Stack Artifact in a Cloud Assembly.

      Parameters:
      stackArtifact - This parameter is required.
    • addStackDependency

      @Stability(Stable) public void addStackDependency(@NotNull StackDeployment stackDeployment)
      Add a dependency on another stack.

      Parameters:
      stackDeployment - This parameter is required.
    • addStackSteps

      @Stability(Stable) public void addStackSteps(@NotNull List<Step> pre, @NotNull List<Step> changeSet, @NotNull List<Step> post)
      Adds steps to each phase of the stack.

      Parameters:
      pre - steps executed before stack.prepare. This parameter is required.
      changeSet - steps executed after stack.prepare and before stack.deploy. This parameter is required.
      post - steps executed after stack.deploy. This parameter is required.
    • getAbsoluteTemplatePath

      @Stability(Stable) @NotNull public String getAbsoluteTemplatePath()
      Template path on disk to CloudAssembly.
    • getAssets

      @Stability(Stable) @NotNull public List<StackAsset> getAssets()
      Assets referenced by this stack.
    • getChangeSet

      @Stability(Stable) @NotNull public List<Step> getChangeSet()
      Steps that take place after stack is prepared but before stack deploys.

      Your pipeline engine may not disable prepareStep.

    • getConstructPath

      @Stability(Stable) @NotNull public String getConstructPath()
      Construct path for this stack.
    • getPost

      @Stability(Stable) @NotNull public List<Step> getPost()
      Steps to execute after stack deploys.
    • getPre

      @Stability(Stable) @NotNull public List<Step> getPre()
      Steps that take place before stack is prepared.

      If your pipeline engine disables 'prepareStep', then this will happen before stack deploys

    • getStackArtifactId

      @Stability(Stable) @NotNull public String getStackArtifactId()
      Artifact ID for this stack.
    • getStackDependencies

      @Stability(Stable) @NotNull public List<StackDeployment> getStackDependencies()
      Other stacks this stack depends on.
    • getStackName

      @Stability(Stable) @NotNull public String getStackName()
      Name for this stack.
    • getTags

      @Stability(Stable) @NotNull public Map<String,String> getTags()
      Tags to apply to the stack.
    • getAccount

      @Stability(Stable) @Nullable public String getAccount()
      Account where the stack should be deployed.

      Default: - Pipeline account

    • getAssumeRoleArn

      @Stability(Stable) @Nullable public String getAssumeRoleArn()
      Role to assume before deploying this stack.

      Default: - Don't assume any role

    • getExecutionRoleArn

      @Stability(Stable) @Nullable public String getExecutionRoleArn()
      Execution role to pass to CloudFormation.

      Default: - No execution role

    • getRegion

      @Stability(Stable) @Nullable public String getRegion()
      Region where the stack should be deployed.

      Default: - Pipeline region

    • getTemplateAsset

      @Stability(Stable) @Nullable public StackAsset getTemplateAsset()
      The asset that represents the CloudFormation template for this stack.
    • getTemplateUrl

      @Stability(Stable) @Nullable public String getTemplateUrl()
      The S3 URL which points to the template asset location in the publishing bucket.

      This is undefined if the stack template is not published. Use the DefaultStackSynthesizer to ensure it is.

      Example value: https://bucket.s3.amazonaws.com/object/key