interface FileAssetSource
Language | Type name |
---|---|
![]() | Amazon.CDK.FileAssetSource |
![]() | software.amazon.awscdk.core.FileAssetSource |
![]() | aws_cdk.core.FileAssetSource |
![]() | @aws-cdk/core » FileAssetSource |
Represents the source for a file asset.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from '@aws-cdk/core';
const fileAssetSource: cdk.FileAssetSource = {
sourceHash: 'sourceHash',
// the properties below are optional
executable: ['executable'],
fileName: 'fileName',
packaging: cdk.FileAssetPackaging.ZIP_DIRECTORY,
};
Properties
Name | Type | Description |
---|---|---|
source | string | A hash on the content source. |
executable? | string[] | An external command that will produce the packaged asset. |
file | string | The path, relative to the root of the cloud assembly, in which this asset source resides. |
packaging? | File | Which type of packaging to perform. |
sourceHash
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.
executable?
Type:
string[]
(optional, default: Exactly one of directory
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
.
fileName?
Type:
string
(optional, default: Exactly one of directory
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.
packaging?
Type:
File
(optional, default: Required if fileName
is specified.)
Which type of packaging to perform.