Show / Hide Table of Contents

Interface IFileAssetSource

Represents the source for a file asset.

Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IFileAssetSource
Syntax (vb)
Public Interface IFileAssetSource
Remarks

ExampleMetadata: fixture=_generated

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
                DeployTime = false,
                DisplayName = "displayName",
                Executable = new [] { "executable" },
                FileName = "fileName",
                Packaging = FileAssetPackaging.ZIP_DIRECTORY
            };

Synopsis

Properties

DeployTime

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

DisplayName

A display name for this asset.

Executable

An external command that will produce the packaged asset.

FileName

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

Packaging

Which type of packaging to perform.

SourceHash

A hash on the content source.

Properties

DeployTime

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

bool? DeployTime { get; }
Property Value

bool?

Remarks

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 CloudFormation deployment succeeds.

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

Default: false

DisplayName

A display name for this asset.

string? DisplayName { get; }
Property Value

string

Remarks

If supplied, the display name will be used in locations where the asset identifier is printed, like in the CLI progress information.

Default: - The asset hash is used to display the asset

Executable

An external command that will produce the packaged asset.

string[]? Executable { get; }
Property Value

string[]

Remarks

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

Default: - Exactly one of fileName and executable is required

FileName

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

string? FileName { get; }
Property Value

string

Remarks

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

Default: - Exactly one of fileName and executable is required

Packaging

Which type of packaging to perform.

FileAssetPackaging? Packaging { get; }
Property Value

FileAssetPackaging?

Remarks

Default: - Required if fileName is specified.

SourceHash

A hash on the content source.

string SourceHash { get; }
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.

Back to top Generated by DocFX