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
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forDefaultStackSynthesizer.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IStackSynthesizer
IStackSynthesizer.Jsii$Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault bootstrap stack version SSM parameter.static final StringDefault CloudFormation role ARN.static final StringDefault deploy role ARN.static final StringDefault Docker asset prefix.static final StringName of the CloudFormation Export with the asset key name.static final StringDefault file asset prefix.static final StringDefault asset publishing role ARN for file (S3) assets.static final StringDefault file assets bucket name.static final StringDefault asset publishing role ARN for image (ECR) assets.static final StringDefault image assets repository name.static final StringDefault lookup role ARN for missing values.static final StringDefault ARN qualifier. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefaultStackSynthesizer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedDefaultStackSynthesizer(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionRegister a Docker Image Asset.addFileAsset(FileAssetSource asset) Register a File Asset.voidBind 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 StackgetStack()voidsynthesize(ISynthesisSession session) Synthesize the associated stack to the session.protected voidsynthesizeStackTemplate(Stack stack, ISynthesisSession session) Have the stack write out its template.Methods inherited from class software.amazon.awscdk.core.StackSynthesizer
emitStackArtifact, emitStackArtifactMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
addDockerImageAssetin interfaceIStackSynthesizer- Specified by:
addDockerImageAssetin 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:
addFileAssetin interfaceIStackSynthesizer- Specified by:
addFileAssetin 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:
bindin interfaceIStackSynthesizer- Specified by:
bindin classStackSynthesizer- Parameters:
stack- This parameter is required.
-
synthesize
Synthesize the associated stack to the session.- Specified by:
synthesizein interfaceIStackSynthesizer- Specified by:
synthesizein 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:
synthesizeStackTemplatein 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
-