Class AssetManifestBuilder
Build an asset manifest from assets added to a stack.
Inheritance
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class AssetManifestBuilder : DeputyBase
Syntax (vb)
Public Class AssetManifestBuilder
Inherits DeputyBase
Remarks
This class does not need to be used by app builders; it is only necessary for building Stack Synthesizers.
ExampleMetadata: fixture=_generated
Examples
// 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();
Synopsis
Constructors
AssetManifestBuilder() | |
AssetManifestBuilder(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
AssetManifestBuilder(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
HasAssets | Whether there are any assets registered in the manifest. |
Methods
AddDockerImageAsset(Stack, String, IDockerImageSource, IDockerImageDestination) | Add a docker asset source and destination to the manifest. |
AddFileAsset(Stack, String, IFileSource, IFileDestination) | Add a file asset source and destination to the manifest. |
DefaultAddDockerImageAsset(Stack, IDockerImageAssetSource, IAssetManifestDockerImageDestination) | Add a docker image asset to the manifest with default settings. |
DefaultAddFileAsset(Stack, IFileAssetSource, IAssetManifestFileDestination) | Add a file asset to the manifest with default settings. |
EmitManifest(Stack, ISynthesisSession, IAssetManifestOptions, String[]) | Write the manifest to disk, and add it to the synthesis session. |
Constructors
AssetManifestBuilder()
public AssetManifestBuilder()
AssetManifestBuilder(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected AssetManifestBuilder(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
AssetManifestBuilder(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected AssetManifestBuilder(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
HasAssets
Whether there are any assets registered in the manifest.
public virtual bool HasAssets { get; }
Property Value
System.Boolean
Methods
AddDockerImageAsset(Stack, String, IDockerImageSource, IDockerImageDestination)
Add a docker asset source and destination to the manifest.
public virtual IDockerImageDestination AddDockerImageAsset(Stack stack, string sourceHash, IDockerImageSource source, IDockerImageDestination dest)
Parameters
- stack Stack
- sourceHash System.String
- source IDockerImageSource
- dest IDockerImageDestination
Returns
Remarks
sourceHash should be unique for every source.
AddFileAsset(Stack, String, IFileSource, IFileDestination)
Add a file asset source and destination to the manifest.
public virtual IFileDestination AddFileAsset(Stack stack, string sourceHash, IFileSource source, IFileDestination dest)
Parameters
- stack Stack
- sourceHash System.String
- source IFileSource
- dest IFileDestination
Returns
Remarks
sourceHash should be unique for every source.
DefaultAddDockerImageAsset(Stack, IDockerImageAssetSource, IAssetManifestDockerImageDestination)
Add a docker image asset to the manifest with default settings.
public virtual IDockerImageDestination DefaultAddDockerImageAsset(Stack stack, IDockerImageAssetSource asset, IAssetManifestDockerImageDestination target)
Parameters
- stack Stack
- asset IDockerImageAssetSource
- target IAssetManifestDockerImageDestination
Returns
Remarks
Derive the region from the stack, use the asset hash as the key, and set the prefix.
DefaultAddFileAsset(Stack, IFileAssetSource, IAssetManifestFileDestination)
Add a file asset to the manifest with default settings.
public virtual IFileDestination DefaultAddFileAsset(Stack stack, IFileAssetSource asset, IAssetManifestFileDestination target)
Parameters
- stack Stack
- asset IFileAssetSource
- target IAssetManifestFileDestination
Returns
Remarks
Derive the region from the stack, use the asset hash as the key, copy the file extension over, and set the prefix.
EmitManifest(Stack, ISynthesisSession, IAssetManifestOptions, String[])
Write the manifest to disk, and add it to the synthesis session.
public virtual string EmitManifest(Stack stack, ISynthesisSession session, IAssetManifestOptions options = null, string[] dependencies = null)
Parameters
- stack Stack
- session ISynthesisSession
- options IAssetManifestOptions
- dependencies System.String[]
Returns
System.String
Remarks
Return the artifact id, which should be added to the additionalDependencies
field of the stack artifact.