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 ros_cdk_core
ros_cdk_core.Stage(
  scope: Construct,
  id: str,
  outdir: str = None
)
Name Type Description
scope Construct No description.
id str No description.
outdir str The output directory into which to emit synthesized artifacts.

scopeRequired


idRequired

  • Type: str

outdirOptional

  • Type: str

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
to_string 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.

to_string

def to_string() -> str

Returns a string representation of this construct.

synthesize

def synthesize(
  session: ISynthesisSession
) -> None

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

def synth(
  skip_validation: bool = None
) -> CloudAssembly

Synthesize this stage into a cloud assembly.

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

skip_validationOptional

  • Type: bool
  • Default: false

Should we skip construct validation.


Static Functions

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

is_construct

import ros_cdk_core
ros_cdk_core.Stage.is_construct(
  x: typing.Any
)

Return whether the given object is a Construct.

xRequired

  • Type: typing.Any

is_stage

import ros_cdk_core
ros_cdk_core.Stage.is_stage(
  x: typing.Any
)

Test whether the given construct is a stage.

xRequired

  • Type: typing.Any

of

import ros_cdk_core
ros_cdk_core.Stage.of(
  construct: IConstruct
)

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.
artifact_id str Artifact ID of the assembly if it is a nested stage. The root stage app will return an empty string.
asset_outdir str The cloud assembly asset output directory.
outdir str The cloud assembly output directory.
stage_name str The name of the stage.
account str The default account for all resources defined within this stage.
parent_stage Stage The parent stage or 'undefined' if this is the app.
region str The default region for all resources defined within this stage.

nodeRequired

node: ConstructNode

The construct tree node associated with this construct.


artifact_idRequired

artifact_id: str
  • Type: str

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.


asset_outdirRequired

asset_outdir: str
  • Type: str

The cloud assembly asset output directory.


outdirRequired

outdir: str
  • Type: str

The cloud assembly output directory.


stage_nameRequired

stage_name: str
  • Type: str

The name of the stage.

Based on names of the parent stages separated by hypens.


accountOptional

account: str
  • Type: str

The default account for all resources defined within this stage.


parent_stageOptional

parent_stage: Stage

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

*


regionOptional

region: str
  • Type: str

The default region for all resources defined within this stage.


Structs