Class DefaultStackSynthesizer

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.core.StackSynthesizer
software.amazon.awscdk.core.DefaultStackSynthesizer
All Implemented Interfaces:
IStackSynthesizer, software.amazon.jsii.JsiiSerializable
Direct Known Subclasses:
BootstraplessSynthesizer

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:55.014Z") @Stability(Stable) public class DefaultStackSynthesizer extends StackSynthesizer
Uses conventionally named roles and asset storage locations.

This synthesizer:

  • Supports cross-account deployments (the CLI can have credentials to one account, and you can still deploy to another account by assuming roles with well-known names in the other account).
  • Supports the CDK Pipelines library.

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.

Example:

 MyStack.Builder.create(app, "MyStack")
         .synthesizer(DefaultStackSynthesizer.Builder.create()
                 .fileAssetsBucketName("my-orgs-asset-bucket")
                 .build())
         .build();
 
  • Field Details

    • DEFAULT_BOOTSTRAP_STACK_VERSION_SSM_PARAMETER

      @Stability(Stable) public static final String DEFAULT_BOOTSTRAP_STACK_VERSION_SSM_PARAMETER
      Default bootstrap stack version SSM parameter.
    • DEFAULT_CLOUDFORMATION_ROLE_ARN

      @Stability(Stable) public static final String DEFAULT_CLOUDFORMATION_ROLE_ARN
      Default CloudFormation role ARN.
    • DEFAULT_DEPLOY_ROLE_ARN

      @Stability(Stable) public static final String DEFAULT_DEPLOY_ROLE_ARN
      Default deploy role ARN.
    • DEFAULT_DOCKER_ASSET_PREFIX

      @Stability(Stable) public static final String DEFAULT_DOCKER_ASSET_PREFIX
      Default Docker asset prefix.
    • DEFAULT_FILE_ASSET_KEY_ARN_EXPORT_NAME

      @Stability(Stable) public static final String DEFAULT_FILE_ASSET_KEY_ARN_EXPORT_NAME
      Name of the CloudFormation Export with the asset key name.
    • DEFAULT_FILE_ASSET_PREFIX

      @Stability(Stable) public static final String DEFAULT_FILE_ASSET_PREFIX
      Default file asset prefix.
    • DEFAULT_FILE_ASSET_PUBLISHING_ROLE_ARN

      @Stability(Stable) public static final String DEFAULT_FILE_ASSET_PUBLISHING_ROLE_ARN
      Default asset publishing role ARN for file (S3) assets.
    • DEFAULT_FILE_ASSETS_BUCKET_NAME

      @Stability(Stable) public static final String DEFAULT_FILE_ASSETS_BUCKET_NAME
      Default file assets bucket name.
    • DEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARN

      @Stability(Stable) public static final String DEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARN
      Default asset publishing role ARN for image (ECR) assets.
    • DEFAULT_IMAGE_ASSETS_REPOSITORY_NAME

      @Stability(Stable) public static final String DEFAULT_IMAGE_ASSETS_REPOSITORY_NAME
      Default image assets repository name.
    • DEFAULT_LOOKUP_ROLE_ARN

      @Stability(Stable) public static final String DEFAULT_LOOKUP_ROLE_ARN
      Default lookup role ARN for missing values.
    • DEFAULT_QUALIFIER

      @Stability(Stable) public static final String DEFAULT_QUALIFIER
      Default ARN qualifier.
  • Constructor Details

    • DefaultStackSynthesizer

      protected DefaultStackSynthesizer(software.amazon.jsii.JsiiObjectRef objRef)
    • DefaultStackSynthesizer

      protected DefaultStackSynthesizer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • DefaultStackSynthesizer

      @Stability(Stable) public DefaultStackSynthesizer(@Nullable DefaultStackSynthesizerProps props)
      Parameters:
      props -
    • DefaultStackSynthesizer

      @Stability(Stable) public DefaultStackSynthesizer()
  • Method Details

    • addDockerImageAsset

      @Stability(Stable) @NotNull public DockerImageAssetLocation addDockerImageAsset(@NotNull DockerImageAssetSource asset)
      Register a Docker Image Asset.

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

      Specified by:
      addDockerImageAsset in interface IStackSynthesizer
      Specified by:
      addDockerImageAsset in class StackSynthesizer
      Parameters:
      asset - This parameter is required.
    • addFileAsset

      @Stability(Stable) @NotNull public FileAssetLocation addFileAsset(@NotNull FileAssetSource asset)
      Register a File Asset.

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

      Specified by:
      addFileAsset in interface IStackSynthesizer
      Specified by:
      addFileAsset in class StackSynthesizer
      Parameters:
      asset - This parameter is required.
    • bind

      @Stability(Stable) public void bind(@NotNull Stack stack)
      Bind to the stack this environment is going to be used on.

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

      Specified by:
      bind in interface IStackSynthesizer
      Specified by:
      bind in class StackSynthesizer
      Parameters:
      stack - This parameter is required.
    • synthesize

      @Stability(Stable) public void synthesize(@NotNull ISynthesisSession session)
      Synthesize the associated stack to the session.

      Specified by:
      synthesize in interface IStackSynthesizer
      Specified by:
      synthesize in class StackSynthesizer
      Parameters:
      session - This parameter is required.
    • synthesizeStackTemplate

      @Stability(Stable) protected void synthesizeStackTemplate(@NotNull Stack stack, @NotNull ISynthesisSession session)
      Have the stack write out its template.

      Overrides:
      synthesizeStackTemplate in class StackSynthesizer
      Parameters:
      stack - This parameter is required.
      session - This parameter is required.
    • getCloudFormationExecutionRoleArn

      @Stability(Stable) @NotNull public String getCloudFormationExecutionRoleArn()
      Returns the ARN of the CFN execution Role.
    • getDeployRoleArn

      @Stability(Stable) @NotNull public String getDeployRoleArn()
      Returns the ARN of the deploy Role.
    • getStack

      @Stability(Stable) @Nullable protected Stack getStack()