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.
- Type: Stack
- Type: java.lang.String
- Type: com.aliyun.ros.cdk.assembly.schema.DockerImageSource
- 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.
- Type: Stack
- Type: java.lang.String
- Type: com.aliyun.ros.cdk.assembly.schema.FileSource
- 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.
- Type: Stack
- Type: DockerImageAssetSource
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.
- Type: Stack
- Type: FileAssetSource
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.
- Type: Stack
- Type: ISynthesisSession
- Type: com.aliyun.ros.cdk.assembly.schema.AssetManifestOptions
- Type: java.util.List
Properties
Name | Type | Description |
---|---|---|
hasAssets |
java.lang.Boolean |
Whether there are any assets registered in the manifest. |
hasAssets
Required
public java.lang.Boolean getHasAssets();
- Type: java.lang.Boolean
Whether there are any assets registered in the manifest.