@Stability(value=Stable)
See: Description
Interface | Description |
---|---|
CfnRepository.LifecyclePolicyProperty | |
CfnRepositoryProps |
Properties for defining a `AWS::ECR::Repository`.
|
IRepository |
Represents an ECR repository.
|
LifecycleRule |
An ECR life cycle rule.
|
OnCloudTrailImagePushedOptions |
Options for the onCloudTrailImagePushed method.
|
OnImageScanCompletedOptions |
Options for the OnImageScanCompleted method.
|
RepositoryAttributes | |
RepositoryProps |
Enum | Description |
---|---|
TagStatus |
Select images based on tags.
|
---
This package contains constructs for working with Amazon Elastic Container Registry.
Define a repository by creating a new instance of Repository
. A repository
holds multiple verions of a single container image.
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826 var repository = new Repository(this, "Repository");
You can set life cycle rules to automatically clean up old images from your repository. The first life cycle rule that matches an image will be applied against that image. For example, the following deletes images older than 30 days, while keeping all images tagged with prod (note that the order is important here):
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826 repository.addLifecycleRule(Map.of("tagPrefixList", asList("prod"), "maxImageCount", 9999)); repository.addLifecycleRule(Map.of("maxImageAge", cdk.Duration.days(30)));
Copyright © 2020. All rights reserved.