aws-cdk-lib.aws_ecs.EcrImage

class EcrImage

LanguageType name
.NETAmazon.CDK.AWS.ECS.EcrImage
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsecs#EcrImage
Javasoftware.amazon.awscdk.services.ecs.EcrImage
Pythonaws_cdk.aws_ecs.EcrImage
TypeScript (source)aws-cdk-lib » aws_ecs » EcrImage

Extends ContainerImage

An image from an Amazon ECR repository.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecr_assets as ecr_assets } from 'aws-cdk-lib';
import { aws_ecs as ecs } from 'aws-cdk-lib';

declare const dockerImageAsset: ecr_assets.DockerImageAsset;
const ecrImage = ecs.EcrImage.fromDockerImageAsset(dockerImageAsset);

Initializer

new EcrImage(repository: IRepository, tagOrDigest: string)

Parameters

  • repository IRepository
  • tagOrDigest string

Constructs a new instance of the EcrImage class.

Properties

NameTypeDescription
imageNamestringThe 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

NameDescription
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 ContainerDefinition

Returns

  • ContainerImageConfig

Called when the image is used by a ContainerDefinition.