enum TagMutability
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ECR.TagMutability |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsecr#TagMutability |
Java | software.amazon.awscdk.services.ecr.TagMutability |
Python | aws_cdk.aws_ecr.TagMutability |
TypeScript (source) | aws-cdk-lib » aws_ecr » TagMutability |
The tag mutability setting for your repository.
Example
// Make all tags immutable except for those starting with 'dev-' or 'test-'
new ecr.Repository(this, 'Repo', {
imageTagMutability: ecr.TagMutability.IMMUTABLE_WITH_EXCLUSION,
imageTagMutabilityExclusionFilters: [
ecr.ImageTagMutabilityExclusionFilter.wildcard('dev-*'),
ecr.ImageTagMutabilityExclusionFilter.wildcard('test-*'),
],
});
Members
| Name | Description |
|---|---|
| MUTABLE | allow image tags to be overwritten. |
| IMMUTABLE | all image tags within the repository will be immutable which will prevent them from being overwritten. |
| IMMUTABLE_WITH_EXCLUSION | all image tags within the repository will be immutable, while allowing you to define some filters for tags that can be changed. |
| MUTABLE_WITH_EXCLUSION | allow image tags to be overwritten while allowing you to define some filters for tags that should remain unchanged. |
MUTABLE
allow image tags to be overwritten.
IMMUTABLE
all image tags within the repository will be immutable which will prevent them from being overwritten.
IMMUTABLE_WITH_EXCLUSION
all image tags within the repository will be immutable, while allowing you to define some filters for tags that can be changed.
MUTABLE_WITH_EXCLUSION
allow image tags to be overwritten while allowing you to define some filters for tags that should remain unchanged.

.NET
Go
Java
Python
TypeScript (