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

import com.aliyun.ros.cdk.core.AssetManifestBuilder;
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

public DockerImageDestination addDockerImageAsset(Stack stack, java.lang.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: java.lang.String

sourceRequired

  • Type: com.aliyun.ros.cdk.assembly.schema.DockerImageSource

destRequired

  • Type: com.aliyun.ros.cdk.assembly.schema.DockerImageDestination

addFileAsset

public FileDestination addFileAsset(Stack stack, java.lang.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: java.lang.String

sourceRequired

  • Type: com.aliyun.ros.cdk.assembly.schema.FileSource

destRequired

  • Type: com.aliyun.ros.cdk.assembly.schema.FileDestination

defaultAddDockerImageAsset

public 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

public 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

public java.lang.String emitManifest(Stack stack, ISynthesisSession session)
public java.lang.String emitManifest(Stack stack, ISynthesisSession session, AssetManifestOptions options)
public java.lang.String emitManifest(Stack stack, ISynthesisSession session, AssetManifestOptions options, java.util.List<java.lang.String> dependencies)

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: com.aliyun.ros.cdk.assembly.schema.AssetManifestOptions

dependenciesOptional

  • Type: java.util.List

Properties

Name Type Description
hasAssets java.lang.Boolean Whether there are any assets registered in the manifest.

hasAssetsRequired

public java.lang.Boolean getHasAssets();
  • Type: java.lang.Boolean

Whether there are any assets registered in the manifest.