@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)",
date="2023-01-31T18:37:00.887Z")
public abstract class DockerImage
extends software.amazon.jsii.JsiiObject
Example:
SageMakerCreateModel.Builder.create(this, "Sagemaker") .modelName("MyModel") .primaryContainer(ContainerDefinition.Builder.create() .image(DockerImage.fromJsonExpression(JsonPath.stringAt("$.Model.imageName"))) .mode(Mode.SINGLE_MODEL) .modelS3Location(S3Location.fromJsonExpression("$.TrainingJob.ModelArtifacts.S3ModelArtifacts")) .build()) .build();
Modifier | Constructor and Description |
---|---|
protected |
DockerImage() |
protected |
DockerImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
DockerImage(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
abstract DockerImageConfig |
bind(ISageMakerTask task)
Called when the image is used by a SageMaker task.
|
static DockerImage |
fromAsset(software.constructs.Construct scope,
java.lang.String id,
DockerImageAssetProps props)
Reference a Docker image that is provided as an Asset in the current app.
|
static DockerImage |
fromEcrRepository(IRepository repository)
Reference a Docker image stored in an ECR repository.
|
static DockerImage |
fromEcrRepository(IRepository repository,
java.lang.String tagOrDigest)
Reference a Docker image stored in an ECR repository.
|
static DockerImage |
fromJsonExpression(java.lang.String expression)
Reference a Docker image which URI is obtained from the task's input.
|
static DockerImage |
fromJsonExpression(java.lang.String expression,
java.lang.Boolean allowAnyEcrImagePull)
Reference a Docker image which URI is obtained from the task's input.
|
static DockerImage |
fromRegistry(java.lang.String imageUri)
Reference a Docker image by it's URI.
|
protected DockerImage(software.amazon.jsii.JsiiObjectRef objRef)
protected DockerImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
protected DockerImage()
public static DockerImage fromAsset(software.constructs.Construct scope, java.lang.String id, DockerImageAssetProps props)
scope
- the scope in which to create the Asset. This parameter is required.id
- the ID for the asset in the construct tree. This parameter is required.props
- the configuration props of the asset. This parameter is required.public static DockerImage fromEcrRepository(IRepository repository, java.lang.String tagOrDigest)
repository
- the ECR repository where the image is hosted. This parameter is required.tagOrDigest
- an optional tag or digest (digests must start with `sha256:`).public static DockerImage fromEcrRepository(IRepository repository)
repository
- the ECR repository where the image is hosted. This parameter is required.public static DockerImage fromJsonExpression(java.lang.String expression, java.lang.Boolean allowAnyEcrImagePull)
expression
- the JSON path expression with the task input. This parameter is required.allowAnyEcrImagePull
- whether ECR access should be permitted (set to `false` if the image will never be in ECR).public static DockerImage fromJsonExpression(java.lang.String expression)
expression
- the JSON path expression with the task input. This parameter is required.public static DockerImage fromRegistry(java.lang.String imageUri)
When referencing ECR images, prefer using inEcr
.
imageUri
- the URI to the docker image. This parameter is required.public abstract DockerImageConfig bind(ISageMakerTask task)
task
- This parameter is required.