@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.545Z") @Stability(value=Stable) public class DockerImageAsset extends software.constructs.Construct
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();
| Modifier and Type | Class and Description |
|---|---|
static class |
DockerImageAsset.Builder
A fluent builder for
DockerImageAsset. |
| Modifier | Constructor and Description |
|---|---|
|
DockerImageAsset(software.constructs.Construct scope,
String id,
DockerImageAssetProps props) |
protected |
DockerImageAsset(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
DockerImageAsset(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
addResourceMetadata(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.
|
String |
getAssetHash()
A hash of this asset, which is available at construction time.
|
String |
getImageTag()
The tag of this asset when it is uploaded to ECR.
|
String |
getImageUri()
The full URI of the image (including a tag).
|
IRepository |
getRepository()
Repository where the image is stored.
|
void |
setImageUri(String value)
The full URI of the image (including a tag).
|
void |
setRepository(IRepository value)
Repository where the image is stored.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected DockerImageAsset(software.amazon.jsii.JsiiObjectRef objRef)
protected DockerImageAsset(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public DockerImageAsset(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
DockerImageAssetProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Stable)
public void addResourceMetadata(@NotNull
CfnResource resource,
@NotNull
String resourceProperty)
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.
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.@Stability(value=Stable) @NotNull public String getAssetHash()
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(value=Stable) @NotNull public String getImageTag()
The tag may differ from the assetHash if a stack synthesizer adds a dockerTagPrefix.
@Stability(value=Stable) @NotNull public String getImageUri()
Use this reference to pull the asset.
@Stability(value=Stable)
public void setImageUri(@NotNull
String value)
Use this reference to pull the asset.
@Stability(value=Stable) @NotNull public IRepository getRepository()
@Stability(value=Stable)
public void setRepository(@NotNull
IRepository value)
Copyright © 2022. All rights reserved.