TagMutability

class aws_cdk.aws_ecr.TagMutability(*values)

Bases: Enum

The tag mutability setting for your repository.

ExampleMetadata:

infused

Example:

# Make all tags immutable except for those starting with 'dev-' or 'test-'
ecr.Repository(self, "Repo",
    image_tag_mutability=ecr.TagMutability.IMMUTABLE_WITH_EXCLUSION,
    image_tag_mutability_exclusion_filters=[
        ecr.ImageTagMutabilityExclusionFilter.wildcard("dev-*"),
        ecr.ImageTagMutabilityExclusionFilter.wildcard("test-*")
    ]
)

Attributes

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

allow image tags to be overwritten.

MUTABLE_WITH_EXCLUSION

allow image tags to be overwritten while allowing you to define some filters for tags that should remain unchanged.