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 "github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore"
alicloudroscdkcore.NewAssetManifestBuilder() 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

func AddDockerImageAsset(stack Stack, sourceHash *string, source DockerImageSource, dest DockerImageDestination) DockerImageDestination

Add a docker asset source and destination to the manifest.

sourceHash should be unique for every source.

stackRequired


sourceHashRequired

  • Type: *string

sourceRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkassemblyschema.DockerImageSource

destRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkassemblyschema.DockerImageDestination

AddFileAsset

func AddFileAsset(stack Stack, sourceHash *string, source FileSource, dest FileDestination) FileDestination

Add a file asset source and destination to the manifest.

sourceHash should be unique for every source.

stackRequired


sourceHashRequired

  • Type: *string

sourceRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkassemblyschema.FileSource

destRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkassemblyschema.FileDestination

DefaultAddDockerImageAsset

func DefaultAddDockerImageAsset(stack Stack, asset DockerImageAssetSource, target AssetManifestDockerImageDestination) 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.

stackRequired


assetRequired


targetRequired


DefaultAddFileAsset

func DefaultAddFileAsset(stack Stack, asset FileAssetSource, target AssetManifestFileDestination) 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.

stackRequired


assetRequired


targetRequired


EmitManifest

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.

stackRequired


sessionRequired


optionsOptional

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkassemblyschema.AssetManifestOptions

dependenciesOptional

  • Type: []string

Properties

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

HasAssetsRequired

func HasAssets() *bool
  • Type: *bool

Whether there are any assets registered in the manifest.