Module asset

@pulumi/pulumi > asset

class Archive

An Archive represents a collection of named assets.

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of an Archive. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property __pulumiArchive

public __pulumiArchive: boolean = true;

A private field to help with RTTI that works in SxS scenarios.

class Asset

Asset represents a single blob of text or data that is managed as a first class entity.

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of an Asset. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property __pulumiAsset

public __pulumiAsset: boolean = true;

A private field to help with RTTI that works in SxS scenarios.

class AssetArchive

extends Archive

An AssetArchive is an archive created from an in-memory collection of named assets or other archives.

constructor

new AssetArchive(assets: AssetMap | Promise<AssetMap>)

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of an Archive. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property __pulumiArchive

public __pulumiArchive: boolean = true;

A private field to help with RTTI that works in SxS scenarios.

property assets

public assets: Promise<AssetMap>;

A map of names to assets.

class FileArchive

extends Archive

A FileArchive is a file-based archive, or a collection of file-based assets. This can be a raw directory or a single archive file in one of the supported formats (.tar, .tar.gz, or .zip).

constructor

new FileArchive(path: string | Promise<string>)

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of an Archive. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property __pulumiArchive

public __pulumiArchive: boolean = true;

A private field to help with RTTI that works in SxS scenarios.

property path

public path: Promise<string>;

The path to the asset file.

class FileAsset

extends Asset

FileAsset is a kind of asset produced from a given path to a file on the local filesystem.

constructor

new FileAsset(path: string | Promise<string>)

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of an Asset. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property __pulumiAsset

public __pulumiAsset: boolean = true;

A private field to help with RTTI that works in SxS scenarios.

property path

public path: Promise<string>;

The path to the asset file.

class RemoteArchive

extends Archive

A RemoteArchive is a file-based archive fetched from a remote location. The URI’s scheme dictates the protocol for fetching the archive’s contents: file:// is a local file (just like a FileArchive), http:// and https:// specify HTTP and HTTPS, respectively, and specific providers may recognize custom schemes.

constructor

new RemoteArchive(uri: string | Promise<string>)

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of an Archive. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property __pulumiArchive

public __pulumiArchive: boolean = true;

A private field to help with RTTI that works in SxS scenarios.

property uri

public uri: Promise<string>;

The URI where the archive lives.

class RemoteAsset

extends Asset

RemoteAsset is a kind of asset produced from a given URI string. The URI’s scheme dictates the protocol for fetching contents: file:// specifies a local file, http:// and https:// specify HTTP and HTTPS, respectively. Note that specific providers may recognize alternative schemes; this is merely the base-most set that all providers support.

constructor

new RemoteAsset(uri: string | Promise<string>)

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of an Asset. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property __pulumiAsset

public __pulumiAsset: boolean = true;

A private field to help with RTTI that works in SxS scenarios.

property uri

public uri: Promise<string>;

The URI where the asset lives.

class StringAsset

extends Asset

StringAsset is a kind of asset produced from an in-memory UTF8-encoded string.

constructor

new StringAsset(text: string | Promise<string>)

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of an Asset. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property __pulumiAsset

public __pulumiAsset: boolean = true;

A private field to help with RTTI that works in SxS scenarios.

property text

public text: Promise<string>;

The string contents.

type AssetMap

type AssetMap = {[name: string]: Asset | Archive};

AssetMap is a map of assets.