class Staging (construct)
Language | Type name |
---|---|
![]() | Amazon.CDK.Assets.Staging |
![]() | software.amazon.awscdk.assets.Staging |
![]() | aws_cdk.assets.Staging |
![]() | @aws-cdk/assets » Staging |
⚠️ Deprecated: use core.AssetStaging
Implements
IConstruct
, IConstruct
, IDependable
Deprecated.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as assets from '@aws-cdk/assets';
import * as cdk from '@aws-cdk/core';
const staging = new assets.Staging(this, 'MyStaging', {
sourcePath: 'sourcePath',
// the properties below are optional
exclude: ['exclude'],
extraHash: 'extraHash',
follow: assets.FollowMode.NEVER,
ignoreMode: cdk.IgnoreMode.GLOB,
});
Initializer
new Staging(scope: Construct, id: string, props: StagingProps)
⚠️ Deprecated: use core.AssetStaging
Parameters
- scope
Construct
- id
string
- props
Staging
Props
Construct Props
Name | Type | Description |
---|---|---|
source | string | Local file or directory to stage. |
exclude? | string[] | Glob patterns to exclude from the copy. |
extra | string | Extra information to encode into the fingerprint (e.g. build instructions and other inputs). |
follow? | Follow | A strategy for how to handle symlinks. |
ignore | Ignore | The ignore behavior to use for exclude patterns. |
sourcePath
⚠️ Deprecated: use core.AssetStagingProps
Type:
string
Local file or directory to stage.
exclude?
⚠️ Deprecated: use core.AssetStagingProps
Type:
string[]
(optional, default: nothing is excluded)
Glob patterns to exclude from the copy.
extraHash?
⚠️ Deprecated: use core.AssetStagingProps
Type:
string
(optional, default: hash is only based on source content)
Extra information to encode into the fingerprint (e.g. build instructions and other inputs).
follow?
⚠️ Deprecated: use followSymlinks
instead
Type:
Follow
(optional, default: Never)
A strategy for how to handle symlinks.
ignoreMode?
⚠️ Deprecated: use core.AssetStagingProps
Type:
Ignore
(optional, default: GLOB for file assets, DOCKER or GLOB for docker assets depending on whether the
')
The ignore behavior to use for exclude patterns.
Properties
Name | Type | Description |
---|---|---|
absolute | string | Absolute path to the asset data. |
asset | string | A cryptographic hash of the asset. |
is | boolean | Whether this asset is an archive (zip or jar). |
node | Construct | The construct tree node associated with this construct. |
packaging | File | How this asset should be packaged. |
source | string | A cryptographic hash of the asset. |
source | string | The absolute path of the asset as it was referenced by the user. |
staged | string | Absolute path to the asset data. |
absoluteStagedPath
⚠️ Deprecated: use core.AssetStaging
Type:
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.
assetHash
⚠️ Deprecated: use core.AssetStaging
Type:
string
A cryptographic hash of the asset.
isArchive
⚠️ Deprecated: use core.AssetStaging
Type:
boolean
Whether this asset is an archive (zip or jar).
node
⚠️ Deprecated: use core.AssetStaging
Type:
Construct
The construct tree node associated with this construct.
packaging
⚠️ Deprecated: use core.AssetStaging
Type:
File
How this asset should be packaged.
sourceHash
⚠️ Deprecated: see assetHash
.
Type:
string
A cryptographic hash of the asset.
sourcePath
⚠️ Deprecated: use core.AssetStaging
Type:
string
The absolute path of the asset as it was referenced by the user.
stagedPath
⚠️ Deprecated: - Use absoluteStagedPath
instead.
Type:
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.
Methods
Name | Description |
---|---|
relative | Return the path to the staged asset, relative to the Cloud Assembly (manifest) directory of the given stack. |
to | Returns a string representation of this construct. |
relativeStagedPath(stack)
public relativeStagedPath(stack: Stack): string
⚠️ Deprecated: use core.AssetStaging
Parameters
- stack
Stack
Returns
string
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" }
toString()
public toString(): string
⚠️ Deprecated: use core.AssetStaging
Returns
string
Returns a string representation of this construct.