FileAssetSource

class aws_cdk.core.FileAssetSource(*, source_hash, executable=None, file_name=None, packaging=None)

Bases: object

Represents the source for a file asset.

Parameters
  • source_hash (str) – 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.

  • executable (Optional[List[str]]) – An external command that will produce the packaged asset. The command should produce the location of a ZIP file on stdout. Default: - Exactly one of directory and executable is required

  • file_name (Optional[str]) – 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, dependning on the packaging type. Default: - Exactly one of directory and executable is required

  • packaging (Optional[FileAssetPackaging]) – Which type of packaging to perform. Default: - Required if fileName is specified.

Attributes

executable

An external command that will produce the packaged asset.

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

Default
  • Exactly one of directory and executable is required

Return type

Optional[List[str]]

file_name

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, dependning on the packaging type.

Default
  • Exactly one of directory and executable is required

Return type

Optional[str]

packaging

Which type of packaging to perform.

Default
  • Required if fileName is specified.

Return type

Optional[FileAssetPackaging]

source_hash

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.

Return type

str