class RepositoryAutoDeleteImages
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ECR.Mixins.RepositoryAutoDeleteImages |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsecr/mixins#RepositoryAutoDeleteImages |
Java | software.amazon.awscdk.services.ecr.mixins.RepositoryAutoDeleteImages |
Python | aws_cdk.aws_ecr.mixins.RepositoryAutoDeleteImages |
TypeScript (source) | aws-cdk-lib » aws_ecr » mixins » RepositoryAutoDeleteImages |
Implements
IMixin
Extends
Mixin
ECR-specific Mixin to force-delete all images from a repository when the repository is removed from the stack or when the stack is deleted.
Sets the emptyOnDelete property on the repository.
Example
new ecr.CfnRepository(this, 'Repo')
.with(new ecr.mixins.RepositoryAutoDeleteImages());
Initializer
new RepositoryAutoDeleteImages()
Methods
| Name | Description |
|---|---|
| apply | Applies the mixin functionality to the target construct. |
| supports(construct) | Determines whether this mixin can be applied to the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): void
Parameters
- construct
IConstruct
Applies the mixin functionality to the target construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Determines whether this mixin can be applied to the given construct.

.NET
Go
Java
Python
TypeScript (