Skip to content

FileAssetSource

Represents the source for a file asset.

Initializer

using AlibabaCloud.SDK.ROS.CDK.Core;
new FileAssetSource {
    string SourceHash,
    bool DeployTime = null,
    string[] Executable = null,
    string FileName = null,
    FileAssetPackaging Packaging = null
};

Properties

Name Type Description
SourceHash string A hash on the content source.
DeployTime bool Whether or not the asset needs to exist beyond deployment time;
Executable string[] An external command that will produce the packaged asset.
FileName string The path, relative to the root of the cloud assembly, in which this asset source resides.
Packaging FileAssetPackaging Which type of packaging to perform.

SourceHashRequired

public string SourceHash { get; set; }
  • Type: string

A hash on the content source.

This hash is used to uniquely identify this asset throughout the system. If this value doesn't change, the asset will not be rebuilt or republished.


DeployTimeOptional

public bool DeployTime { get; set; }
  • Type: bool
  • Default: false

Whether or not the asset needs to exist beyond deployment time;

i.e. are copied over to a different location and not needed afterwards. Setting this property to true has an impact on the lifecycle of the asset, because we will assume that it is safe to delete after the ROS deployment succeeds.

For example, FC Function assets are copied over to FC during deployment. Therefore, it is not necessary to store the asset in OSS bucket, so we consider those deployTime assets.


ExecutableOptional

public string[] Executable { get; set; }
  • Type: string[]
  • Default: Exactly one of fileName and executable is required

An external command that will produce the packaged asset.

The command should produce the location of a ZIP file on stdout.


FileNameOptional

public string FileName { get; set; }
  • Type: string
  • Default: Exactly one of fileName and executable is required

The path, relative to the root of the cloud assembly, in which this asset source resides.

This can be a path to a file or a directory, depending on the packaging type.


PackagingOptional

public FileAssetPackaging Packaging { get; set; }

Which type of packaging to perform.