Skip to content

FileAssetSource

Represents the source for a file asset.

Initializer

import com.aliyun.ros.cdk.core.FileAssetSource;
FileAssetSource.builder()
    .sourceHash(java.lang.String)
//  .deployTime(java.lang.Boolean)
//  .executable(java.util.List<java.lang.String>)
//  .fileName(java.lang.String)
//  .packaging(FileAssetPackaging)
    .build();

Properties

Name Type Description
sourceHash java.lang.String A hash on the content source.
deployTime java.lang.Boolean Whether or not the asset needs to exist beyond deployment time;
executable java.util.List An external command that will produce the packaged asset.
fileName java.lang.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 java.lang.String getSourceHash();
  • Type: java.lang.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 java.lang.Boolean getDeployTime();
  • Type: java.lang.Boolean
  • 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 java.util.List<java.lang.String> getExecutable();
  • Type: java.util.List
  • 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 java.lang.String getFileName();
  • Type: java.lang.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 getPackaging();

Which type of packaging to perform.