Interface LifecyclePolicyProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
LifecyclePolicyProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T22:26:50.076Z")
@Stability(Experimental)
public interface LifecyclePolicyProps
extends software.amazon.jsii.JsiiSerializable
(experimental) Properties for creating a Lifecycle Policy resource.
Example:
LifecyclePolicy disabledPolicy = LifecyclePolicy.Builder.create(this, "DisabledPolicy")
.lifecyclePolicyName("my-disabled-policy")
.description("A lifecycle policy that is temporarily disabled")
.status(LifecyclePolicyStatus.DISABLED)
.resourceType(LifecyclePolicyResourceType.AMI_IMAGE)
.details(List.of(LifecyclePolicyDetail.builder()
.action(LifecyclePolicyAction.builder().type(LifecyclePolicyActionType.DELETE).build())
.filter(LifecyclePolicyFilter.builder().ageFilter(LifecyclePolicyAgeFilter.builder().age(Duration.days(30)).build()).build())
.build()))
.resourceSelection(LifecyclePolicyResourceSelection.builder()
.tags(Map.of("Environment", "testing"))
.build())
.tags(Map.of(
"Owner", "DevOps",
"CostCenter", "Engineering"))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forLifecyclePolicyPropsstatic final classAn implementation forLifecyclePolicyProps -
Method Summary
Modifier and TypeMethodDescriptionstatic LifecyclePolicyProps.Builderbuilder()default String(experimental) The description of the lifecycle policy.(experimental) Configuration details for the lifecycle policy rules.default IRole(experimental) The execution role that grants Image Builder access to run lifecycle actions.default String(experimental) The name of the lifecycle policy.(experimental) Selection criteria for the resources that the lifecycle policy applies to.(experimental) The type of Image Builder resource that the lifecycle policy applies to.default LifecyclePolicyStatus(experimental) The status of the lifecycle policy.getTags()(experimental) The tags to apply to the lifecycle policy.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getDetails
(experimental) Configuration details for the lifecycle policy rules. -
getResourceSelection
(experimental) Selection criteria for the resources that the lifecycle policy applies to. -
getResourceType
(experimental) The type of Image Builder resource that the lifecycle policy applies to. -
getDescription
(experimental) The description of the lifecycle policy.Default: None
-
getExecutionRole
(experimental) 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.
Default: - an execution role will be generated
-
getLifecyclePolicyName
(experimental) The name of the lifecycle policy.Default: - a name is generated
-
getStatus
(experimental) The status of the lifecycle policy.Default: LifecyclePolicyStatus.ENABLED
-
getTags
(experimental) The tags to apply to the lifecycle policy.Default: - none
-
builder
- Returns:
- a
LifecyclePolicyProps.BuilderofLifecyclePolicyProps
-