Show / Hide Table of Contents

Class DockerImageAsset

An asset that represents a Docker image.

Inheritance
System.Object
Construct
DockerImageAsset
Implements
IConstruct
Constructs.IConstruct
IDependable
IAsset
Inherited Members
Construct.IsConstruct(Object)
Construct.OnPrepare()
Construct.OnSynthesize(ISynthesisSession)
Construct.OnValidate()
Construct.Prepare()
Construct.Synthesize(ISynthesisSession)
Construct.Validate()
Construct.Node
Namespace: Amazon.CDK.AWS.Ecr.Assets
Assembly: Amazon.CDK.ECR.Assets.dll
Syntax (csharp)
public class DockerImageAsset : Construct, IConstruct, IDependable, IAsset
Syntax (vb)
Public Class DockerImageAsset
    Inherits Construct
    Implements IConstruct, IDependable, IAsset
Remarks

The image will be created in build time and uploaded to an ECR repository.

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.Ecr.Assets;


var asset = new DockerImageAsset(this, "MyBuildImage", new DockerImageAssetProps {
    Directory = Join(__dirname, "my-image"),
    NetworkMode = NetworkMode.HOST
});

Synopsis

Constructors

DockerImageAsset(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

DockerImageAsset(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

DockerImageAsset(Construct, String, IDockerImageAssetProps)

Properties

AssetHash

A hash of this asset, which is available at construction time.

ImageUri

The full URI of the image (including a tag).

Repository

Repository where the image is stored.

SourceHash

(deprecated) A hash of the source of this asset, which is available at construction time.

Methods

AddResourceMetadata(CfnResource, String)

Adds CloudFormation template metadata to the specified resource with information that indicates which resource property is mapped to this local asset.

Constructors

DockerImageAsset(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected DockerImageAsset(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

DockerImageAsset(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected DockerImageAsset(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

DockerImageAsset(Construct, String, IDockerImageAssetProps)

public DockerImageAsset(Construct scope, string id, IDockerImageAssetProps props)
Parameters
scope Constructs.Construct
id System.String
props IDockerImageAssetProps

Properties

AssetHash

A hash of this asset, which is available at construction time.

public virtual string AssetHash { get; }
Property Value

System.String

Remarks

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

The full URI of the image (including a tag).

public virtual string ImageUri { get; set; }
Property Value

System.String

Remarks

Use this reference to pull the asset.

Repository

Repository where the image is stored.

public virtual IRepository Repository { get; set; }
Property Value

IRepository

SourceHash

(deprecated) A hash of the source of this asset, which is available at construction time.

public virtual string SourceHash { get; }
Property Value

System.String

Remarks

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.

Stability: Deprecated

Methods

AddResourceMetadata(CfnResource, String)

Adds CloudFormation template metadata to the specified resource with information that indicates which resource property is mapped to this local asset.

public virtual void AddResourceMetadata(CfnResource resource, string resourceProperty)
Parameters
resource CfnResource

The CloudFormation resource which is using this asset [disable-awslint:ref-via-interface].

resourceProperty System.String

The property name where this asset is referenced.

Remarks

This can be used by tools such as SAM CLI to provide local experience such as local invocation and debugging of Lambda functions.

Asset metadata will only be included if the stack is synthesized with the "aws:cdk:enable-asset-metadata" context key defined, which is the default behavior when synthesizing via the CDK Toolkit.

See: https://github.com/aws/aws-cdk/issues/1432

Implements

IConstruct
Constructs.IConstruct
IDependable
IAsset
Back to top Generated by DocFX