class EcrImage
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ECS.EcrImage |
![]() | software.amazon.awscdk.services.ecs.EcrImage |
![]() | aws_cdk.aws_ecs.EcrImage |
![]() | @aws-cdk/aws-ecs » EcrImage |
Extends
Container
An image from an Amazon ECR repository.
Example
import * as ecr from '@aws-cdk/aws-ecr';
const repo = ecr.Repository.fromRepositoryName(this, 'batch-job-repo', 'todo-list');
new batch.JobDefinition(this, 'batch-job-def-from-ecr', {
container: {
image: new ecs.EcrImage(repo, 'latest'),
},
});
Initializer
new EcrImage(repository: IRepository, tagOrDigest: string)
Parameters
- repository
IRepository
- tagOrDigest
string
Constructs a new instance of the EcrImage class.
Properties
Name | Type | Description |
---|---|---|
image | string | The image name. Images in Amazon ECR repositories can be specified by either using the full registry/repository:tag or registry/repository@digest. |
imageName
Type:
string
The image name. Images in Amazon ECR repositories can be specified by either using the full registry/repository:tag or registry/repository@digest.
For example, 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>:latest or 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>@sha256:94afd1f2e64d908bc90dbca0035a5b567EXAMPLE.
Methods
Name | Description |
---|---|
bind(_scope, containerDefinition) | Called when the image is used by a ContainerDefinition. |
bind(_scope, containerDefinition)
public bind(_scope: Construct, containerDefinition: ContainerDefinition): ContainerImageConfig
Parameters
- _scope
Construct
- containerDefinition
Container
Definition
Returns
Called when the image is used by a ContainerDefinition.