Skip to content

Stage

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.

Initializers

import com.aliyun.ros.cdk.core.Stage;
Stage.Builder.create(Construct scope, java.lang.String id)
//  .outdir(java.lang.String)
    .build();
Name Type Description
scope Construct No description.
id java.lang.String No description.
outdir java.lang.String The output directory into which to emit synthesized artifacts.

scopeRequired


idRequired

  • Type: java.lang.String

outdirOptional

  • Type: java.lang.String

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.


Methods

Name Description
toString Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
synth Synthesize this stage into a cloud assembly.

toString

public java.lang.String toString()

Returns a string representation of this construct.

synthesize

public void synthesize(ISynthesisSession session)

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

sessionRequired

The synthesis session.


synth

public CloudAssembly synth()
public CloudAssembly synth(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.

optionsOptional


Static Functions

Name Description
isConstruct Return whether the given object is a Construct.
isStage Test whether the given construct is a stage.
of Return the stage this construct is contained with, if available.

isConstruct

import com.aliyun.ros.cdk.core.Stage;
Stage.isConstruct(java.lang.Object x)

Return whether the given object is a Construct.

xRequired

  • Type: java.lang.Object

isStage

import com.aliyun.ros.cdk.core.Stage;
Stage.isStage(java.lang.Object x)

Test whether the given construct is a stage.

xRequired

  • Type: java.lang.Object

of

import com.aliyun.ros.cdk.core.Stage;
Stage.of(IConstruct construct)

Return the stage this construct is contained with, if available.

If called on a nested stage, returns its parent.

constructRequired


Properties

Name Type Description
node ConstructNode The construct tree node associated with this construct.
artifactId java.lang.String Artifact ID of the assembly if it is a nested stage. The root stage app will return an empty string.
assetOutdir java.lang.String The cloud assembly asset output directory.
outdir java.lang.String The cloud assembly output directory.
stageName java.lang.String The name of the stage.
account java.lang.String The default account for all resources defined within this stage.
parentStage Stage The parent stage or 'undefined' if this is the app.
region java.lang.String The default region for all resources defined within this stage.

nodeRequired

public ConstructNode getNode();

The construct tree node associated with this construct.


artifactIdRequired

public java.lang.String getArtifactId();
  • Type: java.lang.String

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.


assetOutdirRequired

public java.lang.String getAssetOutdir();
  • Type: java.lang.String

The cloud assembly asset output directory.


outdirRequired

public java.lang.String getOutdir();
  • Type: java.lang.String

The cloud assembly output directory.


stageNameRequired

public java.lang.String getStageName();
  • Type: java.lang.String

The name of the stage.

Based on names of the parent stages separated by hypens.


accountOptional

public java.lang.String getAccount();
  • Type: java.lang.String

The default account for all resources defined within this stage.


parentStageOptional

public Stage getParentStage();

The parent stage or 'undefined' if this is the app.

*


regionOptional

public java.lang.String getRegion();
  • Type: java.lang.String

The default region for all resources defined within this stage.


Structs