Skip to content

Commit f0d416e

Browse files
revert: "chore(ecs): clarify it's possible to use image digest on fromEcrRepository" (#27143)
Reverts #27115 Renaming `tag` prop to `tagOrDigest` of the `ContainerImage.fromEcrRepository` function introduces a breaking change, not for typescript users, but for other languages that require specifying the property name when calling the function.
1 parent 8e21b2c commit f0d416e

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

packages/@aws-cdk/aws-sagemaker-alpha/lib/container-image.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@ export interface ContainerImageConfig {
2626
export abstract class ContainerImage {
2727
/**
2828
* Reference an image in an ECR repository
29-
*
30-
* @param repository ECR repository
31-
* @param tagOrDigest Optional image tag or digest (digests must start with `sha256:`)
3229
*/
33-
public static fromEcrRepository(repository: ecr.IRepository, tagOrDigest: string = 'latest'): ContainerImage {
34-
return new EcrImage(repository, tagOrDigest);
30+
public static fromEcrRepository(repository: ecr.IRepository, tag: string = 'latest'): ContainerImage {
31+
return new EcrImage(repository, tag);
3532
}
3633

3734
/**

packages/aws-cdk-lib/aws-ecs/lib/container-image.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,9 @@ export abstract class ContainerImage {
1818

1919
/**
2020
* Reference an image in an ECR repository
21-
*
22-
* @param repository ECR repository
23-
* @param tagOrDigest Optional image tag or digest (digests must start with `sha256:`)
2421
*/
25-
public static fromEcrRepository(repository: ecr.IRepository, tagOrDigest: string = 'latest') {
26-
return new EcrImage(repository, tagOrDigest);
22+
public static fromEcrRepository(repository: ecr.IRepository, tag: string = 'latest') {
23+
return new EcrImage(repository, tag);
2724
}
2825

2926
/**

0 commit comments

Comments
 (0)