Class EcrImage
An image from an Amazon ECR repository.
Inherited Members
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public class EcrImage : ContainerImage
Syntax (vb)
Public Class EcrImage
Inherits ContainerImage
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.ECR;
var repo = Repository.FromRepositoryName(this, "batch-job-repo", "todo-list");
new JobDefinition(this, "batch-job-def-from-ecr", new JobDefinitionProps {
Container = new JobDefinitionContainer {
Image = new EcrImage(repo, "latest")
}
});
Synopsis
Constructors
EcrImage(IRepository, String) | Constructs a new instance of the EcrImage class. |
EcrImage(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
EcrImage(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
ImageName | The image name. Images in Amazon ECR repositories can be specified by either using the full registry/repository:tag or registry/repository@digest. |
Methods
Bind(Construct, ContainerDefinition) | Called when the image is used by a ContainerDefinition. |
Constructors
EcrImage(IRepository, String)
Constructs a new instance of the EcrImage class.
public EcrImage(IRepository repository, string tagOrDigest)
Parameters
- repository IRepository
- tagOrDigest System.String
EcrImage(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected EcrImage(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
EcrImage(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected EcrImage(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
ImageName
The image name. Images in Amazon ECR repositories can be specified by either using the full registry/repository:tag or registry/repository@digest.
public virtual string ImageName { get; }
Property Value
System.String
Remarks
For example, 012345678910.dkr.ecr.
Methods
Bind(Construct, ContainerDefinition)
Called when the image is used by a ContainerDefinition.
public override IContainerImageConfig Bind(Construct scope, ContainerDefinition containerDefinition)
Parameters
- scope Construct
- containerDefinition ContainerDefinition
Returns