assets

package
v1.168.0-devpreview Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2022 License: Apache-2.0 Imports: 6 Imported by: 5

README

AWS CDK Assets

All types moved to @aws-cdk/core.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStaging_Override deprecated

func NewStaging_Override(s Staging, scope awscdk.Construct, id *string, props *StagingProps)

Deprecated: use `core.AssetStaging`

func Staging_BUNDLING_INPUT_DIR

func Staging_BUNDLING_INPUT_DIR() *string

func Staging_BUNDLING_OUTPUT_DIR

func Staging_BUNDLING_OUTPUT_DIR() *string

func Staging_ClearAssetHashCache

func Staging_ClearAssetHashCache()

Clears the asset hash cache. Deprecated: use `core.AssetStaging`

func Staging_IsConstruct

func Staging_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Deprecated: use `core.AssetStaging`

Types

type CopyOptions deprecated

type CopyOptions struct {
	// Glob patterns to exclude from the copy.
	// Deprecated: see `core.CopyOptions`
	Exclude *[]*string `field:"optional" json:"exclude" yaml:"exclude"`
	// A strategy for how to handle symlinks.
	// Deprecated: use `followSymlinks` instead.
	Follow FollowMode `field:"optional" json:"follow" yaml:"follow"`
	// The ignore behavior to use for exclude patterns.
	// Deprecated: see `core.CopyOptions`
	IgnoreMode awscdk.IgnoreMode `field:"optional" json:"ignoreMode" yaml:"ignoreMode"`
}

Obtains applied when copying directories into the staging location.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import monocdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

copyOptions := &copyOptions{
	exclude: []*string{
		jsii.String("exclude"),
	},
	follow: awscdk.Assets.followMode_NEVER,
	ignoreMode: monocdk.ignoreMode_GLOB,
}

Deprecated: see `core.CopyOptions`

type FingerprintOptions deprecated

type FingerprintOptions struct {
	// Glob patterns to exclude from the copy.
	// Deprecated: see `core.FingerprintOptions`
	Exclude *[]*string `field:"optional" json:"exclude" yaml:"exclude"`
	// A strategy for how to handle symlinks.
	// Deprecated: use `followSymlinks` instead.
	Follow FollowMode `field:"optional" json:"follow" yaml:"follow"`
	// The ignore behavior to use for exclude patterns.
	// Deprecated: see `core.FingerprintOptions`
	IgnoreMode awscdk.IgnoreMode `field:"optional" json:"ignoreMode" yaml:"ignoreMode"`
	// Extra information to encode into the fingerprint (e.g. build instructions and other inputs).
	// Deprecated: see `core.FingerprintOptions`
	ExtraHash *string `field:"optional" json:"extraHash" yaml:"extraHash"`
}

Options related to calculating source hash.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import monocdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

fingerprintOptions := &fingerprintOptions{
	exclude: []*string{
		jsii.String("exclude"),
	},
	extraHash: jsii.String("extraHash"),
	follow: awscdk.Assets.followMode_NEVER,
	ignoreMode: monocdk.ignoreMode_GLOB,
}

Deprecated: see `core.FingerprintOptions`

type FollowMode

type FollowMode string

Symlink follow mode. Deprecated: see `core.SymlinkFollowMode`

const (
	// Never follow symlinks.
	// Deprecated: see `core.SymlinkFollowMode`
	FollowMode_NEVER FollowMode = "NEVER"
	// Materialize all symlinks, whether they are internal or external to the source directory.
	// Deprecated: see `core.SymlinkFollowMode`
	FollowMode_ALWAYS FollowMode = "ALWAYS"
	// Only follows symlinks that are external to the source directory.
	// Deprecated: see `core.SymlinkFollowMode`
	FollowMode_EXTERNAL FollowMode = "EXTERNAL"
	// Forbids source from having any symlinks pointing outside of the source tree.
	//
	// This is the safest mode of operation as it ensures that copy operations
	// won't materialize files from the user's file system. Internal symlinks are
	// not followed.
	//
	// If the copy operation runs into an external symlink, it will fail.
	// Deprecated: see `core.SymlinkFollowMode`
	FollowMode_BLOCK_EXTERNAL FollowMode = "BLOCK_EXTERNAL"
)

type IAsset

type IAsset interface {
	// A hash of the source of this asset, which is available at construction time.
	//
	// As this is a plain
	// string, it can be used in construct IDs in order to enforce creation of a new resource when
	// the content hash has changed.
	// Deprecated: use `core.IAsset`
	SourceHash() *string
}

Common interface for all assets. Deprecated: use `core.IAsset`

type Staging deprecated

type Staging interface {
	awscdk.AssetStaging
	// Absolute path to the asset data.
	//
	// If asset staging is disabled, this will just be the source path or
	// a temporary directory used for bundling.
	//
	// If asset staging is enabled it will be the staged path.
	//
	// IMPORTANT: If you are going to call `addFileAsset()`, use
	// `relativeStagedPath()` instead.
	// Deprecated: use `core.AssetStaging`
	AbsoluteStagedPath() *string
	// A cryptographic hash of the asset.
	// Deprecated: use `core.AssetStaging`
	AssetHash() *string
	// Whether this asset is an archive (zip or jar).
	// Deprecated: use `core.AssetStaging`
	IsArchive() *bool
	// The construct tree node associated with this construct.
	// Deprecated: use `core.AssetStaging`
	Node() awscdk.ConstructNode
	// How this asset should be packaged.
	// Deprecated: use `core.AssetStaging`
	Packaging() awscdk.FileAssetPackaging
	// A cryptographic hash of the asset.
	// Deprecated: see `assetHash`.
	SourceHash() *string
	// The absolute path of the asset as it was referenced by the user.
	// Deprecated: use `core.AssetStaging`
	SourcePath() *string
	// Absolute path to the asset data.
	//
	// If asset staging is disabled, this will just be the source path or
	// a temporary directory used for bundling.
	//
	// If asset staging is enabled it will be the staged path.
	//
	// IMPORTANT: If you are going to call `addFileAsset()`, use
	// `relativeStagedPath()` instead.
	// Deprecated: - Use `absoluteStagedPath` instead.
	StagedPath() *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: use `core.AssetStaging`
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: use `core.AssetStaging`
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: use `core.AssetStaging`
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Deprecated: use `core.AssetStaging`
	Prepare()
	// Return the path to the staged asset, relative to the Cloud Assembly (manifest) directory of the given stack.
	//
	// Only returns a relative path if the asset was staged, returns an absolute path if
	// it was not staged.
	//
	// A bundled asset might end up in the outDir and still not count as
	// "staged"; if asset staging is disabled we're technically expected to
	// reference source directories, but we don't have a source directory for the
	// bundled outputs (as the bundle output is written to a temporary
	// directory). Nevertheless, we will still return an absolute path.
	//
	// A non-obvious directory layout may look like this:
	//
	// “`
	//    CLOUD ASSEMBLY ROOT
	//      +-- asset.12345abcdef/
	//      +-- assembly-Stage
	//            +-- MyStack.template.json
	//            +-- MyStack.assets.json <- will contain { "path": "../asset.12345abcdef" }
	// “`.
	// Deprecated: use `core.AssetStaging`
	RelativeStagedPath(stack awscdk.Stack) *string
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Deprecated: use `core.AssetStaging`
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Deprecated: use `core.AssetStaging`
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Deprecated: use `core.AssetStaging`
	Validate() *[]*string
}

Deprecated.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import monocdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

staging := awscdk.Assets.NewStaging(this, jsii.String("MyStaging"), &stagingProps{
	sourcePath: jsii.String("sourcePath"),

	// the properties below are optional
	exclude: []*string{
		jsii.String("exclude"),
	},
	extraHash: jsii.String("extraHash"),
	follow: awscdk.*Assets.followMode_NEVER,
	ignoreMode: monocdk.ignoreMode_GLOB,
})

Deprecated: use `core.AssetStaging`

func NewStaging deprecated

func NewStaging(scope awscdk.Construct, id *string, props *StagingProps) Staging

Deprecated: use `core.AssetStaging`

type StagingProps deprecated

type StagingProps struct {
	// Glob patterns to exclude from the copy.
	// Deprecated: use `core.AssetStagingProps`
	Exclude *[]*string `field:"optional" json:"exclude" yaml:"exclude"`
	// A strategy for how to handle symlinks.
	// Deprecated: use `followSymlinks` instead.
	Follow FollowMode `field:"optional" json:"follow" yaml:"follow"`
	// The ignore behavior to use for exclude patterns.
	// Deprecated: use `core.AssetStagingProps`
	IgnoreMode awscdk.IgnoreMode `field:"optional" json:"ignoreMode" yaml:"ignoreMode"`
	// Extra information to encode into the fingerprint (e.g. build instructions and other inputs).
	// Deprecated: use `core.AssetStagingProps`
	ExtraHash *string `field:"optional" json:"extraHash" yaml:"extraHash"`
	// Local file or directory to stage.
	// Deprecated: use `core.AssetStagingProps`
	SourcePath *string `field:"required" json:"sourcePath" yaml:"sourcePath"`
}

Deprecated.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import monocdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

stagingProps := &stagingProps{
	sourcePath: jsii.String("sourcePath"),

	// the properties below are optional
	exclude: []*string{
		jsii.String("exclude"),
	},
	extraHash: jsii.String("extraHash"),
	follow: awscdk.Assets.followMode_NEVER,
	ignoreMode: monocdk.ignoreMode_GLOB,
}

Deprecated: use `core.AssetStagingProps`

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL