Package software.amazon.awscdk.core
Class LegacyStackSynthesizer
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.core.StackSynthesizer
software.amazon.awscdk.core.LegacyStackSynthesizer
- All Implemented Interfaces:
IStackSynthesizer
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:29:55.088Z")
@Stability(Stable)
public class LegacyStackSynthesizer
extends StackSynthesizer
Use the CDK classic way of referencing assets.
This synthesizer will generate CloudFormation parameters for every referenced asset, and use the CLI's current credentials to deploy the stack.
- It does not support cross-account deployment (the CLI must have credentials to the account you are trying to deploy to).
- It cannot be used with CDK Pipelines. To deploy using CDK Pipelines,
you must use the
DefaultStackSynthesizer
. - Each asset will take up a CloudFormation Parameter in your template. Keep in
mind that there is a maximum of 200 parameters in a CloudFormation template.
To use determinstic asset locations instead, use
CliCredentialsStackSynthesizer
.
Be aware that your CLI credentials must be valid for the duration of the entire deployment. If you are using session credentials, make sure the session lifetime is long enough.
This is the only StackSynthesizer that supports customizing asset behavior
by overriding Stack.addFileAsset()
and Stack.addDockerImageAsset()
.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.core.*; LegacyStackSynthesizer legacyStackSynthesizer = new LegacyStackSynthesizer();
-
Nested Class Summary
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
-
Constructor Summary
ModifierConstructorDescriptionprotected
LegacyStackSynthesizer
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
LegacyStackSynthesizer
(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.void
synthesize
(ISynthesisSession session) Synthesize the associated stack to the session.Methods inherited from class software.amazon.awscdk.core.StackSynthesizer
emitStackArtifact, emitStackArtifact, synthesizeStackTemplate
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
-
Constructor Details
-
LegacyStackSynthesizer
protected LegacyStackSynthesizer(software.amazon.jsii.JsiiObjectRef objRef) -
LegacyStackSynthesizer
protected LegacyStackSynthesizer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
LegacyStackSynthesizer
@Stability(Stable) public LegacyStackSynthesizer()
-
-
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.
-