Show / Hide Table of Contents

Class DefaultStackSynthesizer

Uses conventionally named roles and asset storage locations.

Inheritance
object
StackSynthesizer
DefaultStackSynthesizer
BootstraplessSynthesizer
Implements
IReusableStackSynthesizer
IBoundStackSynthesizer
IStackSynthesizer
Inherited Members
StackSynthesizer.AddBootstrapVersionRule(double, string)
StackSynthesizer.CloudFormationLocationFromDockerImageAsset(IDockerImageDestination)
StackSynthesizer.CloudFormationLocationFromFileAsset(IFileDestination)
StackSynthesizer.EmitArtifact(ISynthesisSession, ISynthesizeStackArtifactOptions)
StackSynthesizer.EmitStackArtifact(Stack, ISynthesisSession, ISynthesizeStackArtifactOptions)
StackSynthesizer.SynthesizeTemplate(ISynthesisSession, string, string, IDictionary<string, object>)
StackSynthesizer.BoundStack
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DefaultStackSynthesizer : StackSynthesizer, IReusableStackSynthesizer, IBoundStackSynthesizer, IStackSynthesizer
Syntax (vb)
Public Class DefaultStackSynthesizer Inherits StackSynthesizer Implements IReusableStackSynthesizer, IBoundStackSynthesizer, IStackSynthesizer
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

    Examples
    App app;
    
    
                 var prodStage = new Stage(app, "ProdStage", new StageProps {
                     PermissionsBoundary = PermissionsBoundary.FromName("cdk-${Qualifier}-PermissionsBoundary-${AWS::AccountId}-${AWS::Region}")
                 });
    
                 new Stack(prodStage, "ProdStack", new StackProps {
                     Synthesizer = new DefaultStackSynthesizer(new DefaultStackSynthesizerProps {
                         Qualifier = "custom"
                     })
                 });

    Synopsis

    Constructors

    DefaultStackSynthesizer(IDefaultStackSynthesizerProps?)

    Uses conventionally named roles and asset storage locations.

    Properties

    BootstrapQualifier

    The qualifier used to bootstrap this stack.

    CloudFormationExecutionRoleArn

    Returns the ARN of the CFN execution Role.

    DEFAULT_BOOTSTRAP_STACK_VERSION_SSM_PARAMETER

    Default bootstrap stack version SSM parameter.

    DEFAULT_CLOUDFORMATION_ROLE_ARN

    Default CloudFormation role ARN.

    DEFAULT_DEPLOY_ROLE_ARN

    Default deploy role ARN.

    DEFAULT_DOCKER_ASSET_PREFIX

    Default Docker asset prefix.

    DEFAULT_FILE_ASSETS_BUCKET_NAME

    Default file assets bucket name.

    DEFAULT_FILE_ASSET_KEY_ARN_EXPORT_NAME

    Name of the CloudFormation Export with the asset key name.

    DEFAULT_FILE_ASSET_PREFIX

    Default file asset prefix.

    DEFAULT_FILE_ASSET_PUBLISHING_ROLE_ARN

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

    DEFAULT_IMAGE_ASSETS_REPOSITORY_NAME

    Default image assets repository name.

    DEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARN

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

    DEFAULT_LOOKUP_ROLE_ARN

    Default lookup role ARN for missing values.

    DEFAULT_QUALIFIER

    Default ARN qualifier.

    DeployRoleArn

    Returns the ARN of the deploy Role.

    LookupRole

    The role used to lookup for this stack.

    Stack

    (deprecated) Return the currently bound stack.

    Methods

    AddDockerImageAsset(IDockerImageAssetSource)

    Register a Docker Image Asset.

    AddFileAsset(IFileAssetSource)

    Register a File Asset.

    Bind(Stack)

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

    ReusableBind(Stack)

    Produce a bound Stack Synthesizer for the given stack.

    Synthesize(ISynthesisSession)

    Synthesize the associated stack to the session.

    SynthesizeStackTemplate(Stack, ISynthesisSession)

    Synthesize the stack template to the given session, passing the configured lookup role ARN.

    Constructors

    DefaultStackSynthesizer(IDefaultStackSynthesizerProps?)

    Uses conventionally named roles and asset storage locations.

    public DefaultStackSynthesizer(IDefaultStackSynthesizerProps? props = null)
    Parameters
    props IDefaultStackSynthesizerProps
    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

      Examples
      App app;
      
      
                   var prodStage = new Stage(app, "ProdStage", new StageProps {
                       PermissionsBoundary = PermissionsBoundary.FromName("cdk-${Qualifier}-PermissionsBoundary-${AWS::AccountId}-${AWS::Region}")
                   });
      
                   new Stack(prodStage, "ProdStack", new StackProps {
                       Synthesizer = new DefaultStackSynthesizer(new DefaultStackSynthesizerProps {
                           Qualifier = "custom"
                       })
                   });

      Properties

      BootstrapQualifier

      The qualifier used to bootstrap this stack.

      public override string? BootstrapQualifier { get; }
      Property Value

      string

      Overrides
      StackSynthesizer.BootstrapQualifier
      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

        CloudFormationExecutionRoleArn

        Returns the ARN of the CFN execution Role.

        public virtual string CloudFormationExecutionRoleArn { get; }
        Property Value

        string

        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

          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

          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

            DEFAULT_CLOUDFORMATION_ROLE_ARN

            Default CloudFormation role ARN.

            public static string DEFAULT_CLOUDFORMATION_ROLE_ARN { get; }
            Property Value

            string

            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

              DEFAULT_DEPLOY_ROLE_ARN

              Default deploy role ARN.

              public static string DEFAULT_DEPLOY_ROLE_ARN { get; }
              Property Value

              string

              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

                DEFAULT_DOCKER_ASSET_PREFIX

                Default Docker asset prefix.

                public static string DEFAULT_DOCKER_ASSET_PREFIX { get; }
                Property Value

                string

                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

                  DEFAULT_FILE_ASSETS_BUCKET_NAME

                  Default file assets bucket name.

                  public static string DEFAULT_FILE_ASSETS_BUCKET_NAME { get; }
                  Property Value

                  string

                  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

                    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

                    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

                      DEFAULT_FILE_ASSET_PREFIX

                      Default file asset prefix.

                      public static string DEFAULT_FILE_ASSET_PREFIX { get; }
                      Property Value

                      string

                      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

                        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

                        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

                          DEFAULT_IMAGE_ASSETS_REPOSITORY_NAME

                          Default image assets repository name.

                          public static string DEFAULT_IMAGE_ASSETS_REPOSITORY_NAME { get; }
                          Property Value

                          string

                          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

                            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

                            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

                              DEFAULT_LOOKUP_ROLE_ARN

                              Default lookup role ARN for missing values.

                              public static string DEFAULT_LOOKUP_ROLE_ARN { get; }
                              Property Value

                              string

                              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

                                DEFAULT_QUALIFIER

                                Default ARN qualifier.

                                public static string DEFAULT_QUALIFIER { get; }
                                Property Value

                                string

                                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

                                  DeployRoleArn

                                  Returns the ARN of the deploy Role.

                                  public virtual string DeployRoleArn { get; }
                                  Property Value

                                  string

                                  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

                                    LookupRole

                                    The role used to lookup for this stack.

                                    public override string? LookupRole { get; }
                                    Property Value

                                    string

                                    Overrides
                                    StackSynthesizer.LookupRole
                                    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

                                      Stack

                                      (deprecated) Return the currently bound stack.

                                      [Obsolete("Use `boundStack` instead.")]
                                      protected virtual Stack? Stack { get; }
                                      Property Value

                                      Stack

                                      Remarks

                                      Stability: Deprecated

                                      Methods

                                      AddDockerImageAsset(IDockerImageAssetSource)

                                      Register a Docker Image Asset.

                                      public override IDockerImageAssetLocation AddDockerImageAsset(IDockerImageAssetSource asset)
                                      Parameters
                                      asset IDockerImageAssetSource
                                      Returns

                                      IDockerImageAssetLocation

                                      Overrides
                                      StackSynthesizer.AddDockerImageAsset(IDockerImageAssetSource)
                                      Remarks

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

                                      The synthesizer must rely on some out-of-band mechanism to make sure the given files are actually placed in the returned location before the deployment happens. This can be by writing the instructions to the asset manifest (for use by the cdk-assets tool), by relying on the CLI to upload files (legacy behavior), or some other operator controlled mechanism.

                                      AddFileAsset(IFileAssetSource)

                                      Register a File Asset.

                                      public override IFileAssetLocation AddFileAsset(IFileAssetSource asset)
                                      Parameters
                                      asset IFileAssetSource
                                      Returns

                                      IFileAssetLocation

                                      Overrides
                                      StackSynthesizer.AddFileAsset(IFileAssetSource)
                                      Remarks

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

                                      The synthesizer must rely on some out-of-band mechanism to make sure the given files are actually placed in the returned location before the deployment happens. This can be by writing the instructions to the asset manifest (for use by the cdk-assets tool), by relying on the CLI to upload files (legacy behavior), or some other operator controlled mechanism.

                                      Bind(Stack)

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

                                      public override void Bind(Stack stack)
                                      Parameters
                                      stack Stack
                                      Overrides
                                      StackSynthesizer.Bind(Stack)
                                      Remarks

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

                                      ReusableBind(Stack)

                                      Produce a bound Stack Synthesizer for the given stack.

                                      public virtual IBoundStackSynthesizer ReusableBind(Stack stack)
                                      Parameters
                                      stack Stack
                                      Returns

                                      IBoundStackSynthesizer

                                      Remarks

                                      This method may be called more than once on the same object.

                                      Synthesize(ISynthesisSession)

                                      Synthesize the associated stack to the session.

                                      public override void Synthesize(ISynthesisSession session)
                                      Parameters
                                      session ISynthesisSession
                                      Overrides
                                      StackSynthesizer.Synthesize(ISynthesisSession)
                                      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

                                        SynthesizeStackTemplate(Stack, ISynthesisSession)

                                        Synthesize the stack template to the given session, passing the configured lookup role ARN.

                                        protected override void SynthesizeStackTemplate(Stack stack, ISynthesisSession session)
                                        Parameters
                                        stack Stack
                                        session ISynthesisSession
                                        Overrides
                                        StackSynthesizer.SynthesizeStackTemplate(Stack, ISynthesisSession)
                                        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

                                          Implements

                                          IReusableStackSynthesizer
                                          IBoundStackSynthesizer
                                          IStackSynthesizer
                                          Back to top Generated by DocFX