interface LifecyclePolicyProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ImageBuilder.Alpha.LifecyclePolicyProps |
Go | github.com/aws/aws-cdk-go/awsimagebuilderalpha/v2#LifecyclePolicyProps |
Java | software.amazon.awscdk.services.imagebuilder.alpha.LifecyclePolicyProps |
Python | aws_cdk.aws_imagebuilder_alpha.LifecyclePolicyProps |
TypeScript (source) | @aws-cdk/aws-imagebuilder-alpha ยป LifecyclePolicyProps |
Properties for creating a Lifecycle Policy resource.
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 |
|---|---|---|
| details | Lifecycle[] | Configuration details for the lifecycle policy rules. |
| resource | Lifecycle | Selection criteria for the resources that the lifecycle policy applies to. |
| resource | Lifecycle | The type of Image Builder resource that the lifecycle policy applies to. |
| description? | string | The description of the lifecycle policy. |
| execution | IRole | The execution role that grants Image Builder access to run lifecycle actions. |
| lifecycle | string | The name of the lifecycle policy. |
| status? | Lifecycle | The status of the lifecycle policy. |
| tags? | { [string]: string } | The tags to apply to the lifecycle policy. |
details
Type:
Lifecycle[]
Configuration details for the lifecycle policy rules.
resourceSelection
Type:
Lifecycle
Selection criteria for the resources that the lifecycle policy applies to.
resourceType
Type:
Lifecycle
The type of Image Builder resource that the lifecycle policy applies to.
description?
Type:
string
(optional, default: None)
The description of the lifecycle policy.
executionRole?
Type:
IRole
(optional, default: an execution role will be generated)
The execution role that grants Image Builder access to run lifecycle actions.
By default, an execution role will be created with the minimal permissions needed to execute the lifecycle policy actions.
lifecyclePolicyName?
Type:
string
(optional, default: a name is generated)
The name of the lifecycle policy.
status?
Type:
Lifecycle
(optional, default: LifecyclePolicyStatus.ENABLED)
The status of the lifecycle policy.
tags?
Type:
{ [string]: string }
(optional, default: none)
The tags to apply to the lifecycle policy.

.NET
Go
Java
Python
TypeScript (