class EcrImage
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ECS.EcrImage |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#EcrImage |
Java | software.amazon.awscdk.services.ecs.EcrImage |
Python | aws_cdk.aws_ecs.EcrImage |
TypeScript (source) | aws-cdk-lib » aws_ecs » EcrImage |
Extends
Container
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
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.