Class DockerImage
Creates IDockerImage
instances.
Inheritance
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class DockerImage : DeputyBase
Syntax (vb)
Public MustInherit Class DockerImage
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
new SageMakerCreateModel(this, "Sagemaker", new SageMakerCreateModelProps {
ModelName = "MyModel",
PrimaryContainer = new ContainerDefinition(new ContainerDefinitionOptions {
Image = DockerImage.FromJsonExpression(JsonPath.StringAt("$.Model.imageName")),
Mode = Mode.SINGLE_MODEL,
ModelS3Location = S3Location.FromJsonExpression("$.TrainingJob.ModelArtifacts.S3ModelArtifacts")
})
});
Synopsis
Constructors
Docker |
|
Docker |
Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Docker |
Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(ISage |
Called when the image is used by a SageMaker task. |
From |
Reference a Docker image that is provided as an Asset in the current app. |
From |
Reference a Docker image stored in an ECR repository. |
FromJsonExpression(String, Nullable<Boolean>) | Reference a Docker image which URI is obtained from the task's input. |
From |
Reference a Docker image by it's URI. |
Constructors
DockerImage()
protected DockerImage()
DockerImage(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected DockerImage(ByRefValue reference)
Parameters
- reference Amazon.
JSII. Runtime. Deputy. By Ref Value The Javascript-owned object reference
DockerImage(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected DockerImage(DeputyBase.DeputyProps props)
Parameters
- props Amazon.
JSII. Runtime. Deputy. Deputy Base. Deputy Props The deputy props
Methods
Bind(ISageMakerTask)
Called when the image is used by a SageMaker task.
public abstract IDockerImageConfig Bind(ISageMakerTask task)
Parameters
- task ISage
Maker Task
Returns
FromAsset(Construct, String, IDockerImageAssetProps)
Reference a Docker image that is provided as an Asset in the current app.
public static DockerImage FromAsset(Construct scope, string id, IDockerImageAssetProps props)
Parameters
- scope Constructs.
Construct the scope in which to create the Asset.
- id System.
String the ID for the asset in the construct tree.
- props IDocker
Image Asset Props the configuration props of the asset.
Returns
FromEcrRepository(IRepository, String)
Reference a Docker image stored in an ECR repository.
public static DockerImage FromEcrRepository(IRepository repository, string tagOrDigest = null)
Parameters
- repository IRepository
the ECR repository where the image is hosted.
- tagOrDigest System.
String an optional tag or digest (digests must start with
sha256:
).
Returns
FromJsonExpression(String, Nullable<Boolean>)
Reference a Docker image which URI is obtained from the task's input.
public static DockerImage FromJsonExpression(string expression, Nullable<bool> allowAnyEcrImagePull = null)
Parameters
- expression System.
String the JSONata or JSON path expression with the task input.
- allowAnyEcrImagePull System.
Nullable <System.Boolean > whether ECR access should be permitted (set to
false
if the image will never be in ECR).
Returns
FromRegistry(String)
Reference a Docker image by it's URI.
public static DockerImage FromRegistry(string imageUri)
Parameters
- imageUri System.
String the URI to the docker image.
Returns
Remarks
When referencing ECR images, prefer using inEcr
.