Table of Contents

Class FileAssetSource

Namespace
Amazon.CDK
Assembly
Amazon.CDK.dll

Represents the source for a file asset.

public class FileAssetSource : IFileAssetSource
Inheritance
FileAssetSource
Implements
Inherited Members

Examples

// The code below shows an example of how to instantiate this type.
            // The values are placeholders you should change.
            using Amazon.CDK;
            var fileAssetSource = new FileAssetSource {
                SourceHash = "sourceHash",

                // the properties below are optional
                Executable = new [] { "executable" },
                FileName = "fileName",
                Packaging = FileAssetPackaging.ZIP_DIRECTORY
            };

Remarks

ExampleMetadata: fixture=_generated

Constructors

FileAssetSource()

public FileAssetSource()

Properties

Executable

An external command that will produce the packaged asset.

public string[]? Executable { get; set; }

Property Value

string[]

Remarks

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

Default: - Exactly one of directory and executable is required

FileName

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

public string? FileName { get; set; }

Property Value

string

Remarks

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

Default: - Exactly one of directory and executable is required

Packaging

Which type of packaging to perform.

public FileAssetPackaging? Packaging { get; set; }

Property Value

FileAssetPackaging?

Remarks

Default: - Required if fileName is specified.

SourceHash

A hash on the content source.

public string SourceHash { get; set; }

Property Value

string

Remarks

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.