interface LifecyclePolicyAction
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ImageBuilder.Alpha.LifecyclePolicyAction |
Go | github.com/aws/aws-cdk-go/awsimagebuilderalpha/v2#LifecyclePolicyAction |
Java | software.amazon.awscdk.services.imagebuilder.alpha.LifecyclePolicyAction |
Python | aws_cdk.aws_imagebuilder_alpha.LifecyclePolicyAction |
TypeScript (source) | @aws-cdk/aws-imagebuilder-alpha ยป LifecyclePolicyAction |
The action to perform in the lifecycle policy rule.
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 |
|---|---|---|
| type | Lifecycle | The action to perform on the resources selected in the lifecycle policy rule. |
| include | boolean | Whether to include AMIs in the scope of the lifecycle rule. |
| include | boolean | Whether to include containers in the scope of the lifecycle rule. |
| include | boolean | Whether to include snapshots in the scope of the lifecycle rule. |
type
Type:
Lifecycle
The action to perform on the resources selected in the lifecycle policy rule.
includeAmis?
Type:
boolean
(optional, default: true for AMI-based policies, false otherwise)
Whether to include AMIs in the scope of the lifecycle rule.
includeContainers?
Type:
boolean
(optional, default: true for container-based policies, false otherwise)
Whether to include containers in the scope of the lifecycle rule.
includeSnapshots?
Type:
boolean
(optional, default: true for AMI-based policies, false otherwise)
Whether to include snapshots in the scope of the lifecycle rule.

.NET
Go
Java
Python
TypeScript (