Interface LifecyclePolicyAction
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
LifecyclePolicyAction.Jsii$Proxy
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T22:26:50.072Z")
@Stability(Experimental)
public interface LifecyclePolicyAction
extends software.amazon.jsii.JsiiSerializable
(experimental) The action to perform in the lifecycle policy rule.
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 forLifecyclePolicyActionstatic final classAn implementation forLifecyclePolicyAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default Boolean(experimental) Whether to include AMIs in the scope of the lifecycle rule.default Boolean(experimental) Whether to include containers in the scope of the lifecycle rule.default Boolean(experimental) Whether to include snapshots in the scope of the lifecycle rule.getType()(experimental) The action to perform on the resources selected in the lifecycle policy rule.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getType
(experimental) The action to perform on the resources selected in the lifecycle policy rule. -
getIncludeAmis
(experimental) Whether to include AMIs in the scope of the lifecycle rule.Default: - true for AMI-based policies, false otherwise
-
getIncludeContainers
(experimental) Whether to include containers in the scope of the lifecycle rule.Default: - true for container-based policies, false otherwise
-
getIncludeSnapshots
(experimental) Whether to include snapshots in the scope of the lifecycle rule.Default: - true for AMI-based policies, false otherwise
-
builder
- Returns:
- a
LifecyclePolicyAction.BuilderofLifecyclePolicyAction
-