Class Stage
An abstract application modeling unit consisting of Stacks that should be deployed together.
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Stage : Construct
Syntax (vb)
Public Class Stage
Inherits Construct
Remarks
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.
ExampleMetadata: infused
Examples
CodePipeline pipeline;
var preprod = new MyApplicationStage(this, "PreProd");
var prod = new MyApplicationStage(this, "Prod");
pipeline.AddStage(preprod, new AddStageOpts {
Post = new [] {
new ShellStep("Validate Endpoint", new ShellStepProps {
Commands = new [] { "curl -Ssf https://my.webservice.com/" }
}) }
});
pipeline.AddStage(prod, new AddStageOpts {
Pre = new [] {
new ManualApprovalStep("PromoteToProd") }
});
Synopsis
Constructors
Stage(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Stage(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Stage(Construct, String, IStageProps) |
Properties
Account | The default account for all resources defined within this stage. |
ArtifactId | Artifact ID of the assembly if it is a nested stage. The root stage (app) will return an empty string. |
AssetOutdir | The cloud assembly asset output directory. |
Outdir | The cloud assembly output directory. |
ParentStage | The parent stage or |
PolicyValidationBeta1 | Validation plugins to run during synthesis. |
Region | The default region for all resources defined within this stage. |
StageName | The name of the stage. |
Methods
IsStage(Object) | Test whether the given construct is a stage. |
Of(IConstruct) | Return the stage this construct is contained with, if available. |
Synth(IStageSynthesisOptions) | Synthesize this stage into a cloud assembly. |
Constructors
Stage(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Stage(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Stage(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Stage(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Stage(Construct, String, IStageProps)
public Stage(Construct scope, string id, IStageProps props = null)
Parameters
- scope Constructs.Construct
- id System.String
- props IStageProps
Properties
Account
The default account for all resources defined within this stage.
public virtual string Account { get; }
Property Value
System.String
ArtifactId
Artifact ID of the assembly if it is a nested stage. The root stage (app) will return an empty string.
public virtual string ArtifactId { get; }
Property Value
System.String
Remarks
Derived from the construct path.
AssetOutdir
The cloud assembly asset output directory.
public virtual string AssetOutdir { get; }
Property Value
System.String
Outdir
The cloud assembly output directory.
public virtual string Outdir { get; }
Property Value
System.String
ParentStage
The parent stage or undefined
if this is the app.
public virtual Stage ParentStage { get; }
Property Value
Remarks
PolicyValidationBeta1
Validation plugins to run during synthesis.
public virtual IPolicyValidationPluginBeta1[] PolicyValidationBeta1 { get; }
Property Value
IPolicyValidationPluginBeta1[]
Remarks
If any plugin reports any violation, synthesis will be interrupted and the report displayed to the user.
Default: - no validation plugins are used
Region
The default region for all resources defined within this stage.
public virtual string Region { get; }
Property Value
System.String
StageName
The name of the stage.
public virtual string StageName { get; }
Property Value
System.String
Remarks
Based on names of the parent stages separated by hypens.
Methods
IsStage(Object)
Test whether the given construct is a stage.
public static bool IsStage(object x)
Parameters
- x System.Object
Returns
System.Boolean
Of(IConstruct)
Return the stage this construct is contained with, if available.
public static Stage Of(IConstruct construct)
Parameters
- construct Constructs.IConstruct
Returns
Remarks
If called on a nested stage, returns its parent.
Synth(IStageSynthesisOptions)
Synthesize this stage into a cloud assembly.
public virtual CloudAssembly Synth(IStageSynthesisOptions options = null)
Parameters
- options IStageSynthesisOptions
Returns
Remarks
Once an assembly has been synthesized, it cannot be modified. Subsequent calls will return the same assembly.