Class Stage

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Stage
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable
Direct Known Subclasses:
App

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-12-06T14:43:13.019Z") @Stability(Stable) public class Stage extends software.constructs.Construct
An abstract application modeling unit consisting of Stacks that should be deployed together.

Derive a subclass of Stage and use it to model a single instance of your application.

You can then instantiate your subclass multiple times to model multiple copies of your application which should be be deployed to different environments.

Example:

 CodePipeline pipeline;
 MyApplicationStage preprod = new MyApplicationStage(this, "PreProd");
 MyApplicationStage prod = new MyApplicationStage(this, "Prod");
 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(new ManualApprovalStep("PromoteToProd")))
         .build());
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A fluent builder for Stage.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.constructs.IConstruct

    software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Stage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    Stage(software.amazon.jsii.JsiiObjectRef objRef)
     
     
    Stage(software.constructs.Construct scope, String id)
     
     
    Stage(software.constructs.Construct scope, String id, StageProps props)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The default account for all resources defined within this stage.
    Artifact ID of the assembly if it is a nested stage.
    The cloud assembly asset output directory.
    The cloud assembly output directory.
    The parent stage or undefined if this is the app.
    Validation plugins to run during synthesis.
    The default region for all resources defined within this stage.
    The name of the stage.
    static Boolean
    Test whether the given construct is a stage.
    static Stage
    of(software.constructs.IConstruct construct)
    Return the stage this construct is contained with, if available.
    Synthesize this stage into a cloud assembly.
    Synthesize this stage into a cloud assembly.

    Methods inherited from class software.constructs.Construct

    getNode, isConstruct, toString

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • Stage

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

      protected Stage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Stage

      @Stability(Stable) public Stage(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable StageProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • Stage

      @Stability(Stable) public Stage(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
  • Method Details

    • isStage

      @Stability(Stable) @NotNull public static Boolean isStage(@NotNull Object x)
      Test whether the given construct is a stage.

      Parameters:
      x - This parameter is required.
    • of

      @Stability(Stable) @Nullable public static Stage of(@NotNull software.constructs.IConstruct construct)
      Return the stage this construct is contained with, if available.

      If called on a nested stage, returns its parent.

      Parameters:
      construct - This parameter is required.
    • synth

      @Stability(Stable) @NotNull public CloudAssembly synth(@Nullable StageSynthesisOptions options)
      Synthesize this stage into a cloud assembly.

      Once an assembly has been synthesized, it cannot be modified. Subsequent calls will return the same assembly.

      Parameters:
      options -
    • synth

      @Stability(Stable) @NotNull public CloudAssembly synth()
      Synthesize this stage into a cloud assembly.

      Once an assembly has been synthesized, it cannot be modified. Subsequent calls will return the same assembly.

    • getArtifactId

      @Stability(Stable) @NotNull public String getArtifactId()
      Artifact ID of the assembly if it is a nested stage. The root stage (app) will return an empty string.

      Derived from the construct path.

    • getAssetOutdir

      @Stability(Stable) @NotNull public String getAssetOutdir()
      The cloud assembly asset output directory.
    • getOutdir

      @Stability(Stable) @NotNull public String getOutdir()
      The cloud assembly output directory.
    • getPolicyValidationBeta1

      @Stability(Stable) @NotNull public List<IPolicyValidationPluginBeta1> getPolicyValidationBeta1()
      Validation plugins to run during synthesis.

      If any plugin reports any violation, synthesis will be interrupted and the report displayed to the user.

      Default: - no validation plugins are used

    • getStageName

      @Stability(Stable) @NotNull public String getStageName()
      The name of the stage.

      Based on names of the parent stages separated by hypens.

    • getAccount

      @Stability(Stable) @Nullable public String getAccount()
      The default account for all resources defined within this stage.
    • getParentStage

      @Stability(Stable) @Nullable public Stage getParentStage()
      The parent stage or undefined if this is the app.

    • getRegion

      @Stability(Stable) @Nullable public String getRegion()
      The default region for all resources defined within this stage.