java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.stepfunctions.tasks.DockerImage
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-24T21:00:38.050Z") @Stability(Stable) public abstract class DockerImage extends software.amazon.jsii.JsiiObject
Creates IDockerImage instances.

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();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    DockerImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    DockerImage(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Called when the image is used by a SageMaker task.
    fromAsset(software.constructs.Construct scope, String id, DockerImageAssetProps props)
    Reference a Docker image that is provided as an Asset in the current app.
    Reference a Docker image stored in an ECR repository.
    fromEcrRepository(IRepository repository, String tagOrDigest)
    Reference a Docker image stored in an ECR repository.
    Reference a Docker image which URI is obtained from the task's input.
    fromJsonExpression(String expression, Boolean allowAnyEcrImagePull)
    Reference a Docker image which URI is obtained from the task's input.
    fromRegistry(String imageUri)
    Reference a Docker image by it's URI.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • DockerImage

      protected DockerImage(software.amazon.jsii.JsiiObjectRef objRef)
    • DockerImage

      protected DockerImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • DockerImage

      @Stability(Stable) protected DockerImage()
  • Method Details

    • fromAsset

      @Stability(Stable) @NotNull public static DockerImage fromAsset(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DockerImageAssetProps props)
      Reference a Docker image that is provided as an Asset in the current app.

      Parameters:
      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.
    • fromEcrRepository

      @Stability(Stable) @NotNull public static DockerImage fromEcrRepository(@NotNull IRepository repository, @Nullable String tagOrDigest)
      Reference a Docker image stored in an ECR repository.

      Parameters:
      repository - the ECR repository where the image is hosted. This parameter is required.
      tagOrDigest - an optional tag or digest (digests must start with sha256:).
    • fromEcrRepository

      @Stability(Stable) @NotNull public static DockerImage fromEcrRepository(@NotNull IRepository repository)
      Reference a Docker image stored in an ECR repository.

      Parameters:
      repository - the ECR repository where the image is hosted. This parameter is required.
    • fromJsonExpression

      @Stability(Stable) @NotNull public static DockerImage fromJsonExpression(@NotNull String expression, @Nullable Boolean allowAnyEcrImagePull)
      Reference a Docker image which URI is obtained from the task's input.

      Parameters:
      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).
    • fromJsonExpression

      @Stability(Stable) @NotNull public static DockerImage fromJsonExpression(@NotNull String expression)
      Reference a Docker image which URI is obtained from the task's input.

      Parameters:
      expression - the JSON path expression with the task input. This parameter is required.
    • fromRegistry

      @Stability(Stable) @NotNull public static DockerImage fromRegistry(@NotNull String imageUri)
      Reference a Docker image by it's URI.

      When referencing ECR images, prefer using inEcr.

      Parameters:
      imageUri - the URI to the docker image. This parameter is required.
    • bind

      @Stability(Stable) @NotNull public abstract DockerImageConfig bind(@NotNull ISageMakerTask task)
      Called when the image is used by a SageMaker task.

      Parameters:
      task - This parameter is required.