Package software.amazon.awscdk.core
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();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forDefaultStackSynthesizer
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IStackSynthesizer
IStackSynthesizer.Jsii$Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Default bootstrap stack version SSM parameter.static final String
Default CloudFormation role ARN.static final String
Default deploy role ARN.static final String
Default Docker asset prefix.static final String
Name of the CloudFormation Export with the asset key name.static final String
Default file asset prefix.static final String
Default asset publishing role ARN for file (S3) assets.static final String
Default file assets bucket name.static final String
Default asset publishing role ARN for image (ECR) assets.static final String
Default image assets repository name.static final String
Default lookup role ARN for missing values.static final String
Default ARN qualifier. -
Constructor Summary
ModifierConstructorDescriptionprotected
DefaultStackSynthesizer
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
DefaultStackSynthesizer
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionRegister a Docker Image Asset.addFileAsset
(FileAssetSource asset) Register a File Asset.void
Bind to the stack this environment is going to be used on.Returns the ARN of the CFN execution Role.Returns the ARN of the deploy Role.protected Stack
getStack()
void
synthesize
(ISynthesisSession session) Synthesize the associated stack to the session.protected void
synthesizeStackTemplate
(Stack stack, ISynthesisSession session) Have the stack write out its template.Methods inherited from class software.amazon.awscdk.core.StackSynthesizer
emitStackArtifact, emitStackArtifact
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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_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_FILE_ASSETS_BUCKET_NAME
Default file assets bucket name. -
DEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARN
Default asset publishing role ARN for image (ECR) assets. -
DEFAULT_IMAGE_ASSETS_REPOSITORY_NAME
Default image assets repository name. -
DEFAULT_LOOKUP_ROLE_ARN
Default lookup role ARN for missing values. -
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
- 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 interfaceIStackSynthesizer
- Specified by:
addDockerImageAsset
in classStackSynthesizer
- Parameters:
asset
- This parameter is required.
-
addFileAsset
Register a File Asset.Returns the parameters that can be used to refer to the asset inside the template.
- Specified by:
addFileAsset
in interfaceIStackSynthesizer
- Specified by:
addFileAsset
in classStackSynthesizer
- Parameters:
asset
- This parameter is required.
-
bind
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 interfaceIStackSynthesizer
- Specified by:
bind
in classStackSynthesizer
- Parameters:
stack
- This parameter is required.
-
synthesize
Synthesize the associated stack to the session.- Specified by:
synthesize
in interfaceIStackSynthesizer
- Specified by:
synthesize
in classStackSynthesizer
- 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 classStackSynthesizer
- Parameters:
stack
- This parameter is required.session
- This parameter is required.
-
getCloudFormationExecutionRoleArn
Returns the ARN of the CFN execution Role. -
getDeployRoleArn
Returns the ARN of the deploy Role. -
getStack
-