interface FilterProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ImageBuilder.CfnLifecyclePolicy.FilterProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsimagebuilder#CfnLifecyclePolicy_FilterProperty |
Java | software.amazon.awscdk.services.imagebuilder.CfnLifecyclePolicy.FilterProperty |
Python | aws_cdk.aws_imagebuilder.CfnLifecyclePolicy.FilterProperty |
TypeScript | aws-cdk-lib » aws_imagebuilder » CfnLifecyclePolicy » FilterProperty |
Defines filters that the lifecycle policy uses to determine impacted resource.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_imagebuilder as imagebuilder } from 'aws-cdk-lib';
const filterProperty: imagebuilder.CfnLifecyclePolicy.FilterProperty = {
type: 'type',
value: 123,
// the properties below are optional
retainAtLeast: 123,
unit: 'unit',
};
Properties
Name | Type | Description |
---|---|---|
type | string | Filter resources based on either age or count . |
value | number | The number of units for the time period or for the count. |
retain | number | For age-based filters, this is the number of resources to keep on hand after the lifecycle DELETE action is applied. |
unit? | string | Defines the unit of time that the lifecycle policy uses to determine impacted resources. |
type
Type:
string
Filter resources based on either age
or count
.
value
Type:
number
The number of units for the time period or for the count.
For example, a value of 6
might refer to six months or six AMIs.
For count-based filters, this value represents the minimum number of resources to keep on hand. If you have fewer resources than this number, the resource is excluded from lifecycle actions.
retainAtLeast?
Type:
number
(optional)
For age-based filters, this is the number of resources to keep on hand after the lifecycle DELETE
action is applied.
Impacted resources are only deleted if you have more than this number of resources. If you have fewer resources than this number, the impacted resource is not deleted.
unit?
Type:
string
(optional)
Defines the unit of time that the lifecycle policy uses to determine impacted resources.
This is required for age-based rules.