Class StackSynthesizer
- All Implemented Interfaces:
- IStackSynthesizer,- software.amazon.jsii.JsiiSerializable
- Direct Known Subclasses:
- AppStagingSynthesizer,- CliCredentialsStackSynthesizer,- DefaultStackSynthesizer,- LegacyStackSynthesizer,- NestedStackSynthesizer
This class needs to exist to provide public surface area for external implementations of stack synthesizers. The protected methods give access to functions that are otherwise
- 
Nested Class SummaryNested classes/interfaces inherited from class software.amazon.jsii.JsiiObjectsoftware.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.IStackSynthesizerIStackSynthesizer.Jsii$Default
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedprotectedStackSynthesizer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedStackSynthesizer(software.amazon.jsii.JsiiObjectRef objRef) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidaddBootstrapVersionRule(Number requiredVersion, String bootstrapStackVersionSsmParameter) Add a CfnRule to the bound stack that checks whether an SSM parameter exceeds a given version.abstract DockerImageAssetLocationRegister a Docker Image Asset.abstract FileAssetLocationaddFileAsset(FileAssetSource asset) Register a File Asset.voidBind to the stack this environment is going to be used on.protected DockerImageAssetLocationTurn a docker asset location into a CloudFormation representation of that location.protected FileAssetLocationTurn a file asset location into a CloudFormation representation of that location.protected voidemitArtifact(ISynthesisSession session) Write the CloudFormation stack artifact to the session.protected voidemitArtifact(ISynthesisSession session, SynthesizeStackArtifactOptions options) Write the CloudFormation stack artifact to the session.protected voidemitStackArtifact(Stack stack, ISynthesisSession session) Deprecated.protected voidemitStackArtifact(Stack stack, ISynthesisSession session, SynthesizeStackArtifactOptions options) Deprecated.UseemitArtifactinsteadThe qualifier used to bootstrap this stack.protected StackRetrieve the bound stack.The role used to lookup for this stack.abstract voidsynthesize(ISynthesisSession session) Synthesize the associated stack to the session.protected voidsynthesizeStackTemplate(Stack stack, ISynthesisSession session) Deprecated.UsesynthesizeTemplateinsteadprotected FileAssetSourcesynthesizeTemplate(ISynthesisSession session) Write the stack template to the given session.protected FileAssetSourcesynthesizeTemplate(ISynthesisSession session, String lookupRoleArn) Write the stack template to the given session.protected FileAssetSourcesynthesizeTemplate(ISynthesisSession session, String lookupRoleArn, String lookupRoleExternalId) Write the stack template to the given session.protected FileAssetSourcesynthesizeTemplate(ISynthesisSession session, String lookupRoleArn, String lookupRoleExternalId, Map<String, Object> lookupRoleAdditionalOptions) Write the stack template to the given session.Methods inherited from class software.amazon.jsii.JsiiObjectjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable$jsii$toJson
- 
Constructor Details- 
StackSynthesizerprotected StackSynthesizer(software.amazon.jsii.JsiiObjectRef objRef) 
- 
StackSynthesizerprotected StackSynthesizer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) 
- 
StackSynthesizer@Stability(Stable) protected StackSynthesizer()
 
- 
- 
Method Details- 
addBootstrapVersionRule@Stability(Stable) protected void addBootstrapVersionRule(@NotNull Number requiredVersion, @NotNull String bootstrapStackVersionSsmParameter) Add a CfnRule to the bound stack that checks whether an SSM parameter exceeds a given version.This will modify the template, so must be called before the stack is synthesized. - Parameters:
- requiredVersion- This parameter is required.
- bootstrapStackVersionSsmParameter- This parameter is required.
 
- 
addDockerImageAsset@Stability(Stable) @NotNull public abstract 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. 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-assetstool), by relying on the CLI to upload files (legacy behavior), or some other operator controlled mechanism.- Specified by:
- addDockerImageAssetin interface- IStackSynthesizer
- Parameters:
- asset- This parameter is required.
 
- 
addFileAsset@Stability(Stable) @NotNull public abstract FileAssetLocation addFileAsset(@NotNull FileAssetSource asset) Register a File Asset.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-assetstool), by relying on the CLI to upload files (legacy behavior), or some other operator controlled mechanism.- Specified by:
- addFileAssetin interface- IStackSynthesizer
- Parameters:
- asset- This parameter is required.
 
- 
bindBind 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 interface- IStackSynthesizer
- Parameters:
- stack- This parameter is required.
 
- 
cloudFormationLocationFromDockerImageAsset@Stability(Stable) @NotNull protected DockerImageAssetLocation cloudFormationLocationFromDockerImageAsset(@NotNull DockerImageDestination dest) Turn a docker asset location into a CloudFormation representation of that location.If any of the fields contain placeholders, the result will be wrapped in a Fn.sub.- Parameters:
- dest- This parameter is required.
 
- 
cloudFormationLocationFromFileAsset@Stability(Stable) @NotNull protected FileAssetLocation cloudFormationLocationFromFileAsset(@NotNull FileDestination location) Turn a file asset location into a CloudFormation representation of that location.If any of the fields contain placeholders, the result will be wrapped in a Fn.sub.- Parameters:
- location- This parameter is required.
 
- 
emitArtifact@Stability(Stable) protected void emitArtifact(@NotNull ISynthesisSession session, @Nullable SynthesizeStackArtifactOptions options) Write the CloudFormation stack artifact to the session.Use default settings to add a CloudFormationStackArtifact artifact to the given synthesis session. The Stack artifact will control the settings for the CloudFormation deployment. - Parameters:
- session- This parameter is required.
- options-
 
- 
emitArtifactWrite the CloudFormation stack artifact to the session.Use default settings to add a CloudFormationStackArtifact artifact to the given synthesis session. The Stack artifact will control the settings for the CloudFormation deployment. - Parameters:
- session- This parameter is required.
 
- 
emitStackArtifact@Stability(Deprecated) @Deprecated protected void emitStackArtifact(@NotNull Stack stack, @NotNull ISynthesisSession session, @Nullable SynthesizeStackArtifactOptions options) Deprecated.UseemitArtifactinstead(deprecated) Write the stack artifact to the session.Use default settings to add a CloudFormationStackArtifact artifact to the given synthesis session. - Parameters:
- stack- This parameter is required.
- session- This parameter is required.
- options-
 
- 
emitStackArtifact@Stability(Deprecated) @Deprecated protected void emitStackArtifact(@NotNull Stack stack, @NotNull ISynthesisSession session) Deprecated.UseemitArtifactinstead(deprecated) Write the stack artifact to the session.Use default settings to add a CloudFormationStackArtifact artifact to the given synthesis session. - Parameters:
- stack- This parameter is required.
- session- This parameter is required.
 
- 
synthesizeSynthesize the associated stack to the session.- Specified by:
- synthesizein interface- IStackSynthesizer
- Parameters:
- session- This parameter is required.
 
- 
synthesizeStackTemplate@Stability(Deprecated) @Deprecated protected void synthesizeStackTemplate(@NotNull Stack stack, @NotNull ISynthesisSession session) Deprecated.UsesynthesizeTemplateinstead(deprecated) Have the stack write out its template.- Parameters:
- stack- This parameter is required.
- session- This parameter is required.
 
- 
synthesizeTemplate@Stability(Stable) @NotNull protected FileAssetSource synthesizeTemplate(@NotNull ISynthesisSession session, @Nullable String lookupRoleArn, @Nullable String lookupRoleExternalId, @Nullable Map<String, Object> lookupRoleAdditionalOptions) Write the stack template to the given session.Return a descriptor that represents the stack template as a file asset source, for adding to an asset manifest (if desired). This can be used to have the asset manifest system ( cdk-assets) upload the template to S3 using the appropriate role, so that afterwards only a CloudFormation deployment is necessary.If the template is uploaded as an asset, the stackTemplateAssetObjectUrlproperty should be set when callingemitArtifact.If the template is NOT uploaded as an asset first and the template turns out to be >50KB, it will need to be uploaded to S3 anyway. At that point the credentials will be the same identity that is doing the UpdateStackcall, which may not have the right permissions to write to S3.- Parameters:
- session- This parameter is required.
- lookupRoleArn-
- lookupRoleExternalId-
- lookupRoleAdditionalOptions-
 
- 
synthesizeTemplate@Stability(Stable) @NotNull protected FileAssetSource synthesizeTemplate(@NotNull ISynthesisSession session, @Nullable String lookupRoleArn, @Nullable String lookupRoleExternalId) Write the stack template to the given session.Return a descriptor that represents the stack template as a file asset source, for adding to an asset manifest (if desired). This can be used to have the asset manifest system ( cdk-assets) upload the template to S3 using the appropriate role, so that afterwards only a CloudFormation deployment is necessary.If the template is uploaded as an asset, the stackTemplateAssetObjectUrlproperty should be set when callingemitArtifact.If the template is NOT uploaded as an asset first and the template turns out to be >50KB, it will need to be uploaded to S3 anyway. At that point the credentials will be the same identity that is doing the UpdateStackcall, which may not have the right permissions to write to S3.- Parameters:
- session- This parameter is required.
- lookupRoleArn-
- lookupRoleExternalId-
 
- 
synthesizeTemplate@Stability(Stable) @NotNull protected FileAssetSource synthesizeTemplate(@NotNull ISynthesisSession session, @Nullable String lookupRoleArn) Write the stack template to the given session.Return a descriptor that represents the stack template as a file asset source, for adding to an asset manifest (if desired). This can be used to have the asset manifest system ( cdk-assets) upload the template to S3 using the appropriate role, so that afterwards only a CloudFormation deployment is necessary.If the template is uploaded as an asset, the stackTemplateAssetObjectUrlproperty should be set when callingemitArtifact.If the template is NOT uploaded as an asset first and the template turns out to be >50KB, it will need to be uploaded to S3 anyway. At that point the credentials will be the same identity that is doing the UpdateStackcall, which may not have the right permissions to write to S3.- Parameters:
- session- This parameter is required.
- lookupRoleArn-
 
- 
synthesizeTemplate@Stability(Stable) @NotNull protected FileAssetSource synthesizeTemplate(@NotNull ISynthesisSession session) Write the stack template to the given session.Return a descriptor that represents the stack template as a file asset source, for adding to an asset manifest (if desired). This can be used to have the asset manifest system ( cdk-assets) upload the template to S3 using the appropriate role, so that afterwards only a CloudFormation deployment is necessary.If the template is uploaded as an asset, the stackTemplateAssetObjectUrlproperty should be set when callingemitArtifact.If the template is NOT uploaded as an asset first and the template turns out to be >50KB, it will need to be uploaded to S3 anyway. At that point the credentials will be the same identity that is doing the UpdateStackcall, which may not have the right permissions to write to S3.- Parameters:
- session- This parameter is required.
 
- 
getBoundStackRetrieve the bound stack.Fails if the stack hasn't been bound yet. 
- 
getBootstrapQualifierThe qualifier used to bootstrap this stack.- Specified by:
- getBootstrapQualifierin interface- IStackSynthesizer
 
- 
getLookupRoleThe role used to lookup for this stack.- Specified by:
- getLookupRolein interface- IStackSynthesizer
 
 
- 
emitArtifactinstead