interface CfnLifecyclePolicyProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ImageBuilder.CfnLifecyclePolicyProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsimagebuilder#CfnLifecyclePolicyProps |
![]() | software.amazon.awscdk.services.imagebuilder.CfnLifecyclePolicyProps |
![]() | aws_cdk.aws_imagebuilder.CfnLifecyclePolicyProps |
![]() | aws-cdk-lib » aws_imagebuilder » CfnLifecyclePolicyProps |
Properties for defining a CfnLifecyclePolicy
.
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 cfnLifecyclePolicyProps: imagebuilder.CfnLifecyclePolicyProps = {
executionRole: 'executionRole',
name: 'name',
policyDetails: [{
action: {
type: 'type',
// the properties below are optional
includeResources: {
amis: false,
containers: false,
snapshots: false,
},
},
filter: {
type: 'type',
value: 123,
// the properties below are optional
retainAtLeast: 123,
unit: 'unit',
},
// the properties below are optional
exclusionRules: {
amis: {
isPublic: false,
lastLaunched: {
unit: 'unit',
value: 123,
},
regions: ['regions'],
sharedAccounts: ['sharedAccounts'],
tagMap: {
tagMapKey: 'tagMap',
},
},
tagMap: {
tagMapKey: 'tagMap',
},
},
}],
resourceSelection: {
recipes: [{
name: 'name',
semanticVersion: 'semanticVersion',
}],
tagMap: {
tagMapKey: 'tagMap',
},
},
resourceType: 'resourceType',
// the properties below are optional
description: 'description',
status: 'status',
tags: {
tagsKey: 'tags',
},
};
Properties
Name | Type | Description |
---|---|---|
execution | string | The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to run lifecycle actions. |
name | string | The name of the lifecycle policy to create. |
policy | IResolvable | IResolvable | Policy [] | Configuration details for the lifecycle policy rules. |
resource | IResolvable | Resource | Selection criteria for the resources that the lifecycle policy applies to. |
resource | string | The type of Image Builder resource that the lifecycle policy applies to. |
description? | string | Optional description for the lifecycle policy. |
status? | string | Indicates whether the lifecycle policy resource is enabled. |
tags? | { [string]: string } | Tags to apply to the lifecycle policy resource. |
executionRole
Type:
string
The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to run lifecycle actions.
name
Type:
string
The name of the lifecycle policy to create.
policyDetails
Type:
IResolvable
|
IResolvable
|
Policy
[]
Configuration details for the lifecycle policy rules.
resourceSelection
Type:
IResolvable
|
Resource
Selection criteria for the resources that the lifecycle policy applies to.
resourceType
Type:
string
The type of Image Builder resource that the lifecycle policy applies to.
description?
Type:
string
(optional)
Optional description for the lifecycle policy.
status?
Type:
string
(optional)
Indicates whether the lifecycle policy resource is enabled.
tags?
Type:
{ [string]: string }
(optional)
Tags to apply to the lifecycle policy resource.