class AssetManifestBuilder
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AssetManifestBuilder |
Go | github.com/aws/aws-cdk-go/awscdk/v2#AssetManifestBuilder |
Java | software.amazon.awscdk.AssetManifestBuilder |
Python | aws_cdk.AssetManifestBuilder |
TypeScript (source) | aws-cdk-lib » AssetManifestBuilder |
Build an asset manifest from assets added to a stack.
This class does not need to be used by app builders; it is only necessary for building Stack Synthesizers.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const assetManifestBuilder = new cdk.AssetManifestBuilder();
Initializer
new AssetManifestBuilder()
Properties
| Name | Type | Description |
|---|---|---|
| has | boolean | Whether there are any assets registered in the manifest. |
hasAssets
Type:
boolean
Whether there are any assets registered in the manifest.
Methods
| Name | Description |
|---|---|
| add | Add a docker asset source and destination to the manifest. |
| add | Add a file asset source and destination to the manifest. |
| default | Add a docker image asset to the manifest with default settings. |
| default | Add a file asset to the manifest with default settings. |
| emit | Write the manifest to disk, and add it to the synthesis session. |
addDockerImageAsset(stack, sourceHash, source, dest, options?)
public addDockerImageAsset(stack: Stack, sourceHash: string, source: DockerImageSource, dest: DockerImageDestination, options?: AddDockerImageAssetOptions): DockerImageDestination
Parameters
- stack
Stack - sourceHash
string - source
DockerImage Source - dest
DockerImage Destination - options
AddDocker Image Asset Options
Returns
Add a docker asset source and destination to the manifest.
sourceHash should be unique for every source.
addFileAsset(stack, sourceHash, source, dest, options?)
public addFileAsset(stack: Stack, sourceHash: string, source: FileSource, dest: FileDestination, options?: AddFileAssetOptions): FileDestination
Parameters
- stack
Stack - sourceHash
string - source
FileSource - dest
FileDestination - options
AddFile Asset Options
Returns
Add a file asset source and destination to the manifest.
sourceHash should be unique for every source.
defaultAddDockerImageAsset(stack, asset, target, options?)
public defaultAddDockerImageAsset(stack: Stack, asset: DockerImageAssetSource, target: AssetManifestDockerImageDestination, options?: AddDockerImageAssetOptions): DockerImageDestination
Parameters
- stack
Stack - asset
DockerImage Asset Source - target
AssetManifest Docker Image Destination - options
AddDocker Image Asset Options
Returns
Add a docker image asset to the manifest with default settings.
Derive the region from the stack, use the asset hash as the key, and set the prefix.
defaultAddFileAsset(stack, asset, target, options?)
public defaultAddFileAsset(stack: Stack, asset: FileAssetSource, target: AssetManifestFileDestination, options?: AddFileAssetOptions): FileDestination
Parameters
- stack
Stack - asset
FileAsset Source - target
AssetManifest File Destination - options
AddFile Asset Options
Returns
Add a file asset to the manifest with default settings.
Derive the region from the stack, use the asset hash as the key, copy the file extension over, and set the prefix.
emitManifest(stack, session, options?, dependencies?)
public emitManifest(stack: Stack, session: ISynthesisSession, options?: AssetManifestOptions, dependencies?: string[]): string
Parameters
- stack
Stack - session
ISynthesisSession - options
AssetManifest Options - dependencies
string[]
Returns
string
Write the manifest to disk, and add it to the synthesis session.
Return the artifact id, which should be added to the additionalDependencies
field of the stack artifact.

.NET
Go
Java
Python
TypeScript (