Interface StageProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
StageProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:55.143Z") @Stability(Stable) public interface StageProps extends software.amazon.jsii.JsiiSerializable
Initialization props for a stage.

Example:

 CodePipeline pipeline;
 public class MyOutputStage extends Stage {
     public final CfnOutput loadBalancerAddress;
     public MyOutputStage(Construct scope, String id) {
         this(scope, id, null);
     }
     public MyOutputStage(Construct scope, String id, StageProps props) {
         super(scope, id, props);
         this.loadBalancerAddress = CfnOutput.Builder.create(this, "Output").value("value").build();
     }
 }
 MyOutputStage lbApp = new MyOutputStage(this, "MyApp");
 pipeline.addStage(lbApp, AddStageOpts.builder()
         .post(List.of(
             ShellStep.Builder.create("HitEndpoint")
                     .envFromCfnOutputs(Map.of(
                             // Make the load balancer address available as $URL inside the commands
                             "URL", lbApp.getLoadBalancerAddress()))
                     .commands(List.of("curl -Ssf $URL"))
                     .build()))
         .build());
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    A builder for StageProps
    static final class 
    An implementation for StageProps
  • Method Summary

    Modifier and Type
    Method
    Description
     
    default Environment
    Default AWS environment (account/region) for Stacks in this Stage.
    default String
    The output directory into which to emit synthesized artifacts.

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Method Details

    • getEnv

      @Stability(Stable) @Nullable default Environment getEnv()
      Default AWS environment (account/region) for Stacks in this Stage.

      Stacks defined inside this Stage with either region or account missing from its env will use the corresponding field given here.

      If either region or accountis is not configured for Stack (either on the Stack itself or on the containing Stage), the Stack will be environment-agnostic.

      Environment-agnostic stacks can be deployed to any environment, may not be able to take advantage of all features of the CDK. For example, they will not be able to use environmental context lookups, will not automatically translate Service Principals to the right format based on the environment's AWS partition, and other such enhancements.

      Default: - The environments should be configured on the `Stack`s.

      Example:

       // Use a concrete account and region to deploy this Stage to
       // Use a concrete account and region to deploy this Stage to
       Stage.Builder.create(app, "Stage1")
               .env(Environment.builder().account("123456789012").region("us-east-1").build())
               .build();
       // Use the CLI's current credentials to determine the target environment
       // Use the CLI's current credentials to determine the target environment
       Stage.Builder.create(app, "Stage2")
               .env(Environment.builder().account(process.getEnv().getCDK_DEFAULT_ACCOUNT()).region(process.getEnv().getCDK_DEFAULT_REGION()).build())
               .build();
       
    • getOutdir

      @Stability(Stable) @Nullable default String getOutdir()
      The output directory into which to emit synthesized artifacts.

      Can only be specified if this stage is the root stage (the app). If this is specified and this stage is nested within another stage, an error will be thrown.

      Default: - for nested stages, outdir will be determined as a relative directory to the outdir of the app. For apps, if outdir is not specified, a temporary directory will be created.

    • builder

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