From 40ec78e31cb476d42b329fee2cf35aaed7faed02 Mon Sep 17 00:00:00 2001 From: LEE SUK JAE Date: Mon, 16 Dec 2019 21:30:53 +0900 Subject: [PATCH] fix(ecr): remove deprecated requirement on docs and comments (#5428) * docs(ecr): fix deprecated requirement maxImageAgeDays - on [Automatically clean up repositories](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-ecr-readme.html\#automatically-clean-up-repositories) of Amazon ECR docs, there is deprecated property using on addLifecycleRule example - due to introduce of Duration Class(#2857), it should be maxImageAge rather than maxImageAgeDays * chore(ecr): fix deprecated requirement maxImageAgeDays - maxImageAgeDays were deprecated since #2857, but still used on comments. - should be chaged to maxImageAge - fixes #3273 --- packages/@aws-cdk/aws-ecr/README.md | 2 +- packages/@aws-cdk/aws-ecr/lib/lifecycle.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-ecr/README.md b/packages/@aws-cdk/aws-ecr/README.md index 4def96fccebcd..9cdb07602e3fb 100644 --- a/packages/@aws-cdk/aws-ecr/README.md +++ b/packages/@aws-cdk/aws-ecr/README.md @@ -30,5 +30,5 @@ is important here): ```ts repository.addLifecycleRule({ tagPrefixList: ['prod'], maxImageCount: 9999 }); -repository.addLifecycleRule({ maxImageAgeDays: cdk.Duration.days(30) }); +repository.addLifecycleRule({ maxImageAge: cdk.Duration.days(30) }); ``` diff --git a/packages/@aws-cdk/aws-ecr/lib/lifecycle.ts b/packages/@aws-cdk/aws-ecr/lib/lifecycle.ts index 0174d8391006a..1e3be2a5fb90e 100644 --- a/packages/@aws-cdk/aws-ecr/lib/lifecycle.ts +++ b/packages/@aws-cdk/aws-ecr/lib/lifecycle.ts @@ -47,7 +47,7 @@ export interface LifecycleRule { /** * The maximum number of images to retain * - * Specify exactly one of maxImageCount and maxImageAgeDays. + * Specify exactly one of maxImageCount and maxImageAge. */ readonly maxImageCount?: number;