AssetManifestBuilder Class
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.
| Source | core/lib/stack-synthesizers/asset-manifest-builder.ts |
|---|---|
| Type last changed |
Example
ts
// 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();
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
asset_manifest_builder = cdk.AssetManifestBuilder()
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
AssetManifestBuilder assetManifestBuilder = new AssetManifestBuilder();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
var assetManifestBuilder = new AssetManifestBuilder();
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
assetManifestBuilder := cdk.NewAssetManifestBuilder()
Initializer
ts
new AssetManifestBuilder()
python
AssetManifestBuilder()
java
new AssetManifestBuilder()
csharp
new AssetManifestBuilder()
go
NewAssetManifestBuilder()
Properties
Whether there are any assets registered in the manifest.
Methods
addDockerImageAsset(stack: Stack, sourceHash: string, source: DockerImageSource, dest: DockerImageDestination, options?: AddDockerImageAssetOptions): DockerImageDestinationdef add_docker_image_asset(self, stack: Stack, source_hash: str, source: DockerImageSource, dest: DockerImageDestination, options: typing.Optional[AddDockerImageAssetOptions] = None) -> DockerImageDestinationpublic DockerImageDestination addDockerImageAsset(Stack stack, String sourceHash, DockerImageSource source, DockerImageDestination dest, AddDockerImageAssetOptions options)public DockerImageDestination AddDockerImageAsset(Stack stack, string sourceHash, DockerImageSource source, DockerImageDestination dest, AddDockerImageAssetOptions? options = null)func AddDockerImageAsset(Stack Stack, SourceHash *string, Source DockerImageSource, Dest DockerImageDestination, Options AddDockerImageAssetOptions) DockerImageDestination #Add a docker asset source and destination to the manifest.
sourceHash should be unique for every source.
addFileAsset(stack: Stack, sourceHash: string, source: FileSource, dest: FileDestination, options?: AddFileAssetOptions): FileDestinationdef add_file_asset(self, stack: Stack, source_hash: str, source: FileSource, dest: FileDestination, options: typing.Optional[AddFileAssetOptions] = None) -> FileDestinationpublic FileDestination addFileAsset(Stack stack, String sourceHash, FileSource source, FileDestination dest, AddFileAssetOptions options)public FileDestination AddFileAsset(Stack stack, string sourceHash, FileSource source, FileDestination dest, AddFileAssetOptions? options = null)func AddFileAsset(Stack Stack, SourceHash *string, Source FileSource, Dest FileDestination, Options AddFileAssetOptions) FileDestination #Add a file asset source and destination to the manifest.
sourceHash should be unique for every source.
defaultAddDockerImageAsset(stack: Stack, asset: DockerImageAssetSource, target: AssetManifestDockerImageDestination, options?: AddDockerImageAssetOptions): DockerImageDestinationdef default_add_docker_image_asset(self, stack: Stack, asset: DockerImageAssetSource, target: AssetManifestDockerImageDestination, options: typing.Optional[AddDockerImageAssetOptions] = None) -> DockerImageDestinationpublic DockerImageDestination defaultAddDockerImageAsset(Stack stack, DockerImageAssetSource asset, AssetManifestDockerImageDestination target, AddDockerImageAssetOptions options)public DockerImageDestination DefaultAddDockerImageAsset(Stack stack, DockerImageAssetSource asset, AssetManifestDockerImageDestination target, AddDockerImageAssetOptions? options = null)func DefaultAddDockerImageAsset(Stack Stack, Asset DockerImageAssetSource, Target AssetManifestDockerImageDestination, Options AddDockerImageAssetOptions) DockerImageDestination #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: Stack, asset: FileAssetSource, target: AssetManifestFileDestination, options?: AddFileAssetOptions): FileDestinationdef default_add_file_asset(self, stack: Stack, asset: FileAssetSource, target: AssetManifestFileDestination, options: typing.Optional[AddFileAssetOptions] = None) -> FileDestinationpublic FileDestination defaultAddFileAsset(Stack stack, FileAssetSource asset, AssetManifestFileDestination target, AddFileAssetOptions options)public FileDestination DefaultAddFileAsset(Stack stack, FileAssetSource asset, AssetManifestFileDestination target, AddFileAssetOptions? options = null)func DefaultAddFileAsset(Stack Stack, Asset FileAssetSource, Target AssetManifestFileDestination, Options AddFileAssetOptions) FileDestination #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: Stack, session: ISynthesisSession, options?: AssetManifestOptions, dependencies?: string[]): stringdef emit_manifest(self, stack: Stack, session: ISynthesisSession, options: typing.Optional[AssetManifestOptions] = None, dependencies: typing.Optional[typing.List[str]] = None) -> strpublic String emitManifest(Stack stack, ISynthesisSession session, AssetManifestOptions options, List<String> dependencies)public string EmitManifest(Stack stack, ISynthesisSession session, AssetManifestOptions? options = null, string[]? dependencies = null)func EmitManifest(Stack Stack, Session ISynthesisSession, Options AssetManifestOptions, Dependencies *[]*string) *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.