Skip to content

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.

Initializers

using AlibabaCloud.SDK.ROS.CDK.Core;
new AssetManifestBuilder();
Name Type Description

Methods

Name Description
AddDockerImageAsset Add a docker asset source and destination to the manifest.
AddFileAsset Add a file asset source and destination to the manifest.
DefaultAddDockerImageAsset Add a docker image asset to the manifest with default settings.
DefaultAddFileAsset Add a file asset to the manifest with default settings.
EmitManifest Write the manifest to disk, and add it to the synthesis session.

AddDockerImageAsset

private DockerImageDestination AddDockerImageAsset(Stack Stack, string SourceHash, DockerImageSource Source, DockerImageDestination Dest)

Add a docker asset source and destination to the manifest.

sourceHash should be unique for every source.

StackRequired


SourceHashRequired

  • Type: string

SourceRequired

  • Type: AlibabaCloud.SDK.ROS.CDK.Assembly.Schema.DockerImageSource

DestRequired

  • Type: AlibabaCloud.SDK.ROS.CDK.Assembly.Schema.DockerImageDestination

AddFileAsset

private FileDestination AddFileAsset(Stack Stack, string SourceHash, FileSource Source, FileDestination Dest)

Add a file asset source and destination to the manifest.

sourceHash should be unique for every source.

StackRequired


SourceHashRequired

  • Type: string

SourceRequired

  • Type: AlibabaCloud.SDK.ROS.CDK.Assembly.Schema.FileSource

DestRequired

  • Type: AlibabaCloud.SDK.ROS.CDK.Assembly.Schema.FileDestination

DefaultAddDockerImageAsset

private DockerImageDestination DefaultAddDockerImageAsset(Stack Stack, DockerImageAssetSource Asset, AssetManifestDockerImageDestination Target)

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.

StackRequired


AssetRequired


TargetRequired


DefaultAddFileAsset

private FileDestination DefaultAddFileAsset(Stack Stack, FileAssetSource Asset, AssetManifestFileDestination Target)

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.

StackRequired


AssetRequired


TargetRequired


EmitManifest

private string EmitManifest(Stack Stack, ISynthesisSession Session, AssetManifestOptions Options = null, string[] Dependencies = null)

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.

StackRequired


SessionRequired


OptionsOptional

  • Type: AlibabaCloud.SDK.ROS.CDK.Assembly.Schema.AssetManifestOptions

DependenciesOptional

  • Type: string[]

Properties

Name Type Description
HasAssets bool Whether there are any assets registered in the manifest.

HasAssetsRequired

public bool HasAssets { get; }
  • Type: bool

Whether there are any assets registered in the manifest.