Table of Contents

Class DefaultStackSynthesizer

Namespace
Amazon.CDK
Assembly
Amazon.CDK.dll

Uses conventionally named roles and asset storage locations.

public class DefaultStackSynthesizer : StackSynthesizer, IStackSynthesizer
Inheritance
DefaultStackSynthesizer
Implements
Derived
Inherited Members

Examples

new MyStack(app, "MyStack", new StackProps {
                 Synthesizer = new DefaultStackSynthesizer(new DefaultStackSynthesizerProps {
                     FileAssetsBucketName = "my-orgs-asset-bucket"
                 })
             });

Remarks

This synthesizer:

    Requires the environment to have been bootstrapped with Bootstrap Stack V2 (also known as "modern bootstrap stack"). The synthesizer adds a version check to the template, to make sure the bootstrap stack is recent enough to support all features expected by this synthesizer.

    ExampleMetadata: infused

    Constructors

    DefaultStackSynthesizer(IDefaultStackSynthesizerProps?)

    public DefaultStackSynthesizer(IDefaultStackSynthesizerProps? props = null)

    Parameters

    props IDefaultStackSynthesizerProps

    Properties

    CloudFormationExecutionRoleArn

    Returns the ARN of the CFN execution Role.

    public virtual string CloudFormationExecutionRoleArn { get; }

    Property Value

    string

    DEFAULT_BOOTSTRAP_STACK_VERSION_SSM_PARAMETER

    Default bootstrap stack version SSM parameter.

    public static string DEFAULT_BOOTSTRAP_STACK_VERSION_SSM_PARAMETER { get; }

    Property Value

    string

    DEFAULT_CLOUDFORMATION_ROLE_ARN

    Default CloudFormation role ARN.

    public static string DEFAULT_CLOUDFORMATION_ROLE_ARN { get; }

    Property Value

    string

    DEFAULT_DEPLOY_ROLE_ARN

    Default deploy role ARN.

    public static string DEFAULT_DEPLOY_ROLE_ARN { get; }

    Property Value

    string

    DEFAULT_DOCKER_ASSET_PREFIX

    Default Docker asset prefix.

    public static string DEFAULT_DOCKER_ASSET_PREFIX { get; }

    Property Value

    string

    DEFAULT_FILE_ASSETS_BUCKET_NAME

    Default file assets bucket name.

    public static string DEFAULT_FILE_ASSETS_BUCKET_NAME { get; }

    Property Value

    string

    DEFAULT_FILE_ASSET_KEY_ARN_EXPORT_NAME

    Name of the CloudFormation Export with the asset key name.

    public static string DEFAULT_FILE_ASSET_KEY_ARN_EXPORT_NAME { get; }

    Property Value

    string

    DEFAULT_FILE_ASSET_PREFIX

    Default file asset prefix.

    public static string DEFAULT_FILE_ASSET_PREFIX { get; }

    Property Value

    string

    DEFAULT_FILE_ASSET_PUBLISHING_ROLE_ARN

    Default asset publishing role ARN for file (S3) assets.

    public static string DEFAULT_FILE_ASSET_PUBLISHING_ROLE_ARN { get; }

    Property Value

    string

    DEFAULT_IMAGE_ASSETS_REPOSITORY_NAME

    Default image assets repository name.

    public static string DEFAULT_IMAGE_ASSETS_REPOSITORY_NAME { get; }

    Property Value

    string

    DEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARN

    Default asset publishing role ARN for image (ECR) assets.

    public static string DEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARN { get; }

    Property Value

    string

    DEFAULT_LOOKUP_ROLE_ARN

    Default lookup role ARN for missing values.

    public static string DEFAULT_LOOKUP_ROLE_ARN { get; }

    Property Value

    string

    DEFAULT_QUALIFIER

    Default ARN qualifier.

    public static string DEFAULT_QUALIFIER { get; }

    Property Value

    string

    DeployRoleArn

    Returns the ARN of the deploy Role.

    public virtual string DeployRoleArn { get; }

    Property Value

    string

    Stack

    protected virtual Stack? Stack { get; }

    Property Value

    Stack

    Methods

    AddDockerImageAsset(IDockerImageAssetSource)

    Register a Docker Image Asset.

    public override IDockerImageAssetLocation AddDockerImageAsset(IDockerImageAssetSource asset)

    Parameters

    asset IDockerImageAssetSource

    Returns

    IDockerImageAssetLocation

    Remarks

    Returns the parameters that can be used to refer to the asset inside the template.

    AddFileAsset(IFileAssetSource)

    Register a File Asset.

    public override IFileAssetLocation AddFileAsset(IFileAssetSource asset)

    Parameters

    asset IFileAssetSource

    Returns

    IFileAssetLocation

    Remarks

    Returns the parameters that can be used to refer to the asset inside the template.

    Bind(Stack)

    Bind to the stack this environment is going to be used on.

    public override void Bind(Stack stack)

    Parameters

    stack Stack

    Remarks

    Must be called before any of the other methods are called.

    Synthesize(ISynthesisSession)

    Synthesize the associated stack to the session.

    public override void Synthesize(ISynthesisSession session)

    Parameters

    session ISynthesisSession

    SynthesizeStackTemplate(Stack, ISynthesisSession)

    Have the stack write out its template.

    protected override void SynthesizeStackTemplate(Stack stack, ISynthesisSession session)

    Parameters

    stack Stack
    session ISynthesisSession