interface LifecyclePolicyResourceSelection
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ImageBuilder.Alpha.LifecyclePolicyResourceSelection |
Go | github.com/aws/aws-cdk-go/awsimagebuilderalpha/v2#LifecyclePolicyResourceSelection |
Java | software.amazon.awscdk.services.imagebuilder.alpha.LifecyclePolicyResourceSelection |
Python | aws_cdk.aws_imagebuilder_alpha.LifecyclePolicyResourceSelection |
TypeScript (source) | @aws-cdk/aws-imagebuilder-alpha ยป LifecyclePolicyResourceSelection |
Selection criteria for the resources that the lifecycle policy applies to.
Example
const disabledPolicy = new imagebuilder.LifecyclePolicy(this, 'DisabledPolicy', {
lifecyclePolicyName: 'my-disabled-policy',
description: 'A lifecycle policy that is temporarily disabled',
status: imagebuilder.LifecyclePolicyStatus.DISABLED,
resourceType: imagebuilder.LifecyclePolicyResourceType.AMI_IMAGE,
details: [
{
action: { type: imagebuilder.LifecyclePolicyActionType.DELETE },
filter: { ageFilter: { age: Duration.days(30) } }
}
],
resourceSelection: {
tags: { Environment: 'testing' }
},
tags: {
Owner: 'DevOps',
CostCenter: 'Engineering'
}
});
Properties
| Name | Type | Description |
|---|---|---|
| recipes? | IRecipe[] | The list of image recipes or container recipes to apply the lifecycle policy to. |
| tags? | { [string]: string } | Selects EC2 Image Builder images containing any of the provided tags. |
recipes?
Type:
IRecipe[]
(optional, default: none if tag selections are provided. Otherwise, at least one recipe or tag selection must be provided)
The list of image recipes or container recipes to apply the lifecycle policy to.
tags?
Type:
{ [string]: string }
(optional, default: none if recipe selections are provided. Otherwise, at least one recipe or tag selection must be provided)
Selects EC2 Image Builder images containing any of the provided tags.

.NET
Go
Java
Python
TypeScript (