Class DockerImageAsset
- All Implemented Interfaces:
- IAsset,- IConstruct,- IDependable,- software.amazon.jsii.JsiiSerializable,- software.constructs.IConstruct
The image will be created in build time and uploaded to an ECR repository.
Example:
 import software.amazon.awscdk.services.ecr.assets.DockerImageAsset;
 import software.amazon.awscdk.services.ecr.assets.NetworkMode;
 DockerImageAsset asset = DockerImageAsset.Builder.create(this, "MyBuildImage")
         .directory(join(__dirname, "my-image"))
         .networkMode(NetworkMode.HOST)
         .build();
 - 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObjectsoftware.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.assets.IAssetIAsset.Jsii$Default, IAsset.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstructIConstruct.Jsii$Default, IConstruct.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstructsoftware.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedDockerImageAsset(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedDockerImageAsset(software.amazon.jsii.JsiiObjectRef objRef) DockerImageAsset(software.constructs.Construct scope, String id, DockerImageAssetProps props) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddResourceMetadata(CfnResource resource, String resourceProperty) Adds CloudFormation template metadata to the specified resource with information that indicates which resource property is mapped to this local asset.A hash of this asset, which is available at construction time.The full URI of the image (including a tag).Repository where the image is stored.Deprecated.use assetHashvoidsetImageUri(String value) The full URI of the image (including a tag).voidsetRepository(IRepository value) Repository where the image is stored.Methods inherited from class software.amazon.awscdk.core.ConstructgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.constructs.ConstructtoStringMethods inherited from class software.amazon.jsii.JsiiObjectjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable$jsii$toJson
- 
Constructor Details- 
DockerImageAssetprotected DockerImageAsset(software.amazon.jsii.JsiiObjectRef objRef) 
- 
DockerImageAssetprotected DockerImageAsset(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) 
- 
DockerImageAsset@Stability(Stable) public DockerImageAsset(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DockerImageAssetProps props) - Parameters:
- scope- This parameter is required.
- id- This parameter is required.
- props- This parameter is required.
 
 
- 
- 
Method Details- 
addResourceMetadata@Stability(Stable) public void addResourceMetadata(@NotNull CfnResource resource, @NotNull String resourceProperty) Adds CloudFormation template metadata to the specified resource with information that indicates which resource property is mapped to this local asset.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. - Parameters:
- resource- The CloudFormation resource which is using this asset [disable-awslint:ref-via-interface]. This parameter is required.
- resourceProperty- The property name where this asset is referenced. This parameter is required.
- See Also:
 
- 
getAssetHashA 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. 
- 
getSourceHashDeprecated.use assetHash(deprecated) 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. - Specified by:
- getSourceHashin interface- IAsset
 
- 
getImageUriThe full URI of the image (including a tag).Use this reference to pull the asset. 
- 
setImageUriThe full URI of the image (including a tag).Use this reference to pull the asset. 
- 
getRepositoryRepository where the image is stored.
- 
setRepositoryRepository where the image is stored.
 
-