interface LifecyclePolicyDetail
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ImageBuilder.Alpha.LifecyclePolicyDetail |
Go | github.com/aws/aws-cdk-go/awsimagebuilderalpha/v2#LifecyclePolicyDetail |
Java | software.amazon.awscdk.services.imagebuilder.alpha.LifecyclePolicyDetail |
Python | aws_cdk.aws_imagebuilder_alpha.LifecyclePolicyDetail |
TypeScript (source) | @aws-cdk/aws-imagebuilder-alpha ยป LifecyclePolicyDetail |
Configuration details for the lifecycle policy rules.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as imagebuilder_alpha from '@aws-cdk/aws-imagebuilder-alpha';
import * as cdk from 'aws-cdk-lib';
const lifecyclePolicyDetail: imagebuilder_alpha.LifecyclePolicyDetail = {
action: {
type: imagebuilder_alpha.LifecyclePolicyActionType.DELETE,
// the properties below are optional
includeAmis: false,
includeContainers: false,
includeSnapshots: false,
},
filter: {
ageFilter: {
age: cdk.Duration.minutes(30),
// the properties below are optional
retainAtLeast: 123,
},
countFilter: {
count: 123,
},
},
// the properties below are optional
exclusionRules: {
amiExclusionRules: {
isPublic: false,
lastLaunched: cdk.Duration.minutes(30),
regions: ['regions'],
sharedAccounts: ['sharedAccounts'],
tags: {
tagsKey: 'tags',
},
},
imageExclusionRules: {
tags: {
tagsKey: 'tags',
},
},
},
};
Properties
| Name | Type | Description |
|---|---|---|
| action | Lifecycle | The action to perform in the lifecycle policy rule. |
| filter | Lifecycle | The resource filtering to apply in the lifecycle policy rule. |
| exclusion | Lifecycle | The rules to apply for excluding resources from the lifecycle policy rule. |
action
Type:
Lifecycle
The action to perform in the lifecycle policy rule.
filter
Type:
Lifecycle
The resource filtering to apply in the lifecycle policy rule.
exclusionRules?
Type:
Lifecycle
(optional, default: no exclusion rules are applied on any resource)
The rules to apply for excluding resources from the lifecycle policy rule.

.NET
Go
Java
Python
TypeScript (