Skip to content

Commit

Permalink
fix(ecr): remove deprecated requirement on docs and comments (#5428)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
sukjae authored and mergify[bot] committed Dec 16, 2019
1 parent 58e67e6 commit 40ec78e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-ecr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) });
```
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-ecr/lib/lifecycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 40ec78e

Please sign in to comment.