Show / Hide Table of Contents

Class StageProps

Initialization props for a stage.

Inheritance
object
StageProps
Implements
IStageProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class StageProps : IStageProps
Syntax (vb)
Public Class StageProps Implements IStageProps
Remarks

ExampleMetadata: infused

Examples
App app;


            new Stage(app, "DevStage");

            new Stage(app, "BetaStage", new StageProps {
                PermissionsBoundary = PermissionsBoundary.FromName("beta-permissions-boundary")
            });

            new Stage(app, "GammaStage", new StageProps {
                PermissionsBoundary = PermissionsBoundary.FromName("prod-permissions-boundary")
            });

            new Stage(app, "ProdStage", new StageProps {
                PermissionsBoundary = PermissionsBoundary.FromName("prod-permissions-boundary")
            });

Synopsis

Constructors

StageProps()

Initialization props for a stage.

Properties

Env

Default AWS environment (account/region) for Stacks in this Stage.

Outdir

The output directory into which to emit synthesized artifacts.

PermissionsBoundary

Options for applying a permissions boundary to all IAM Roles and Users created within this Stage.

PolicyValidationBeta1

Validation plugins to run during synthesis.

PropertyInjectors

A list of IPropertyInjector attached to this Stage.

StageName

Name of this stage.

Constructors

StageProps()

Initialization props for a stage.

public StageProps()
Remarks

ExampleMetadata: infused

Examples
App app;


            new Stage(app, "DevStage");

            new Stage(app, "BetaStage", new StageProps {
                PermissionsBoundary = PermissionsBoundary.FromName("beta-permissions-boundary")
            });

            new Stage(app, "GammaStage", new StageProps {
                PermissionsBoundary = PermissionsBoundary.FromName("prod-permissions-boundary")
            });

            new Stage(app, "ProdStage", new StageProps {
                PermissionsBoundary = PermissionsBoundary.FromName("prod-permissions-boundary")
            });

Properties

Env

Default AWS environment (account/region) for Stacks in this Stage.

public IEnvironment? Env { get; set; }
Property Value

IEnvironment

Remarks

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

Examples
// Use a concrete account and region to deploy this Stage to
             // Use a concrete account and region to deploy this Stage to
             new Stage(app, "Stage1", new StageProps {
                 Env = new Environment { Account = "123456789012", Region = "us-east-1" }
             });

             // Use the CLI's current credentials to determine the target environment
             // Use the CLI's current credentials to determine the target environment
             new Stage(app, "Stage2", new StageProps {
                 Env = new Environment { Account = process.Env.CDK_DEFAULT_ACCOUNT, Region = process.Env.CDK_DEFAULT_REGION }
             });

Outdir

The output directory into which to emit synthesized artifacts.

public string? Outdir { get; set; }
Property Value

string

Remarks

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.

PermissionsBoundary

Options for applying a permissions boundary to all IAM Roles and Users created within this Stage.

public PermissionsBoundary? PermissionsBoundary { get; set; }
Property Value

PermissionsBoundary

Remarks

Be aware that this feature uses Aspects, and the Aspects are applied at the Stack level with a priority of MUTATING (if the feature flag @aws-cdk/core:aspectPrioritiesMutating is set) or DEFAULT (if the flag is not set). This is relevant if you are both using your own Aspects to assign Permissions Boundaries, as well as specifying this property. The Aspect added by this property will overwrite the Permissions Boundary assigned by your own Aspect if both: (a) your Aspect has a lower or equal priority to the automatic Aspect, and (b) your Aspect is applied above the Stack level. If either of those conditions are not true, your own Aspect will win.

We recommend assigning Permissions Boundaries only using the provided APIs, and not using custom Aspects.

Default: - no permissions boundary is applied

PolicyValidationBeta1

Validation plugins to run during synthesis.

public IPolicyValidationPluginBeta1[]? PolicyValidationBeta1 { get; set; }
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

PropertyInjectors

A list of IPropertyInjector attached to this Stage.

public IPropertyInjector[]? PropertyInjectors { get; set; }
Property Value

IPropertyInjector[]

Remarks

Default: - no PropertyInjectors

StageName

Name of this stage.

public string? StageName { get; set; }
Property Value

string

Remarks

Default: - Derived from the id.

Implements

IStageProps
Back to top Generated by DocFX