Class Stage
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
- Direct Known Subclasses:
App
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/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
ModifierConstructorDescriptionprotected
Stage
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
Stage
(software.amazon.jsii.JsiiObjectRef objRef) Stage
(software.constructs.Construct scope, String id, StageProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe 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 orundefined
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.synth()
Synthesize this stage into a cloud assembly.synth
(StageSynthesisOptions options) 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
- Parameters:
scope
- This parameter is required.id
- This parameter is required.
-
-
Method Details
-
isStage
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
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
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
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
The cloud assembly asset output directory. -
getOutdir
The cloud assembly output directory. -
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
The name of the stage.Based on names of the parent stages separated by hypens.
-
getAccount
The default account for all resources defined within this stage. -
getParentStage
The parent stage orundefined
if this is the app. -
getRegion
The default region for all resources defined within this stage.
-