class TarballImageAsset (construct)
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Ecr.Assets.TarballImageAsset |
Java | software.amazon.awscdk.services.ecr.assets.TarballImageAsset |
Python | aws_cdk.aws_ecr_assets.TarballImageAsset |
TypeScript (source) | @aws-cdk/aws-ecr-assets » TarballImageAsset |
Implements
IConstruct
, IConstruct
, IDependable
, IAsset
An asset that represents a Docker image.
The image will loaded from an existing tarball and uploaded to an ECR repository.
Example
import { TarballImageAsset } from '@aws-cdk/aws-ecr-assets';
const asset = new TarballImageAsset(this, 'MyBuildImage', {
tarballFile: 'local-image.tar',
});
Initializer
new TarballImageAsset(scope: Construct, id: string, props: TarballImageAssetProps)
Parameters
- scope
Construct
- id
string
- props
Tarball
Image Asset Props
Construct Props
Name | Type | Description |
---|---|---|
tarball | string | Absolute path to the tarball. |
tarballFile
Type:
string
Absolute path to the tarball.
It is recommended to to use the script running directory (e.g. __dirname
in Node.js projects or dirname of __file__
in Python) if your tarball
is located as a resource inside your project.
Properties
Name | Type | Description |
---|---|---|
asset | string | A hash of this asset, which is available at construction time. |
image | string | The full URI of the image (including a tag). |
node | Construct | The construct tree node associated with this construct. |
repository | IRepository | Repository where the image is stored. |
source | string | A hash of the source of this asset, which is available at construction time. |
assetHash
Type:
string
A hash 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.
imageUri
Type:
string
The full URI of the image (including a tag).
Use this reference to pull the asset.
node
Type:
Construct
The construct tree node associated with this construct.
repository
Type:
IRepository
Repository where the image is stored.
sourceHash
⚠️ Deprecated: use assetHash
Type:
string
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.
Methods
Name | Description |
---|---|
to | Returns a string representation of this construct. |
String()
topublic toString(): string
Returns
string
Returns a string representation of this construct.