@Generated(value="jsii-pacmak/1.72.0 (build 4b8828b)", date="2022-12-27T20:28:49.193Z") @Stability(value=Stable) 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,
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,
String tagOrDigest)
Reference a Docker image stored in an ECR repository.
|
static DockerImage |
fromJsonExpression(String expression)
Reference a Docker image which URI is obtained from the task's input.
|
static DockerImage |
fromJsonExpression(String expression,
Boolean allowAnyEcrImagePull)
Reference a Docker image which URI is obtained from the task's input.
|
static DockerImage |
fromRegistry(String imageUri)
Reference a Docker image by it's URI.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected DockerImage(software.amazon.jsii.JsiiObjectRef objRef)
protected DockerImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) protected DockerImage()
@Stability(value=Stable) @NotNull public static DockerImage fromAsset(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull 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.@Stability(value=Stable) @NotNull public static DockerImage fromEcrRepository(@NotNull IRepository repository, @Nullable 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:`).@Stability(value=Stable) @NotNull public static DockerImage fromEcrRepository(@NotNull IRepository repository)
repository - the ECR repository where the image is hosted. This parameter is required.@Stability(value=Stable) @NotNull public static DockerImage fromJsonExpression(@NotNull String expression, @Nullable 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).@Stability(value=Stable) @NotNull public static DockerImage fromJsonExpression(@NotNull String expression)
expression - the JSON path expression with the task input. This parameter is required.@Stability(value=Stable) @NotNull public static DockerImage fromRegistry(@NotNull String imageUri)
When referencing ECR images, prefer using inEcr.
imageUri - the URI to the docker image. This parameter is required.@Stability(value=Stable) @NotNull public abstract DockerImageConfig bind(@NotNull ISageMakerTask task)
task - This parameter is required.Copyright © 2022. All rights reserved.