Class LifecyclePolicy.Builder
java.lang.Object
software.amazon.awscdk.services.imagebuilder.alpha.LifecyclePolicy.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LifecyclePolicy>
- Enclosing class:
LifecyclePolicy
@Stability(Experimental)
public static final class LifecyclePolicy.Builder
extends Object
implements software.amazon.jsii.Builder<LifecyclePolicy>
(experimental) A fluent builder for
LifecyclePolicy.-
Method Summary
Modifier and TypeMethodDescriptionbuild()static LifecyclePolicy.Builderdescription(String description) (experimental) The description of the lifecycle policy.details(List<? extends LifecyclePolicyDetail> details) (experimental) Configuration details for the lifecycle policy rules.executionRole(IRole executionRole) (experimental) The execution role that grants Image Builder access to run lifecycle actions.lifecyclePolicyName(String lifecyclePolicyName) (experimental) The name of the lifecycle policy.resourceSelection(LifecyclePolicyResourceSelection resourceSelection) (experimental) Selection criteria for the resources that the lifecycle policy applies to.resourceType(LifecyclePolicyResourceType resourceType) (experimental) The type of Image Builder resource that the lifecycle policy applies to.status(LifecyclePolicyStatus status) (experimental) The status of the lifecycle policy.(experimental) The tags to apply to the lifecycle policy.
-
Method Details
-
create
@Stability(Experimental) public static LifecyclePolicy.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope- This parameter is required.id- This parameter is required.- Returns:
- a new instance of
LifecyclePolicy.Builder.
-
details
@Stability(Experimental) public LifecyclePolicy.Builder details(List<? extends LifecyclePolicyDetail> details) (experimental) Configuration details for the lifecycle policy rules.- Parameters:
details- Configuration details for the lifecycle policy rules. This parameter is required.- Returns:
this
-
resourceSelection
@Stability(Experimental) public LifecyclePolicy.Builder resourceSelection(LifecyclePolicyResourceSelection resourceSelection) (experimental) Selection criteria for the resources that the lifecycle policy applies to.- Parameters:
resourceSelection- Selection criteria for the resources that the lifecycle policy applies to. This parameter is required.- Returns:
this
-
resourceType
@Stability(Experimental) public LifecyclePolicy.Builder resourceType(LifecyclePolicyResourceType resourceType) (experimental) The type of Image Builder resource that the lifecycle policy applies to.- Parameters:
resourceType- The type of Image Builder resource that the lifecycle policy applies to. This parameter is required.- Returns:
this
-
description
(experimental) The description of the lifecycle policy.Default: None
- Parameters:
description- The description of the lifecycle policy. This parameter is required.- Returns:
this
-
executionRole
(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
- Parameters:
executionRole- The execution role that grants Image Builder access to run lifecycle actions. This parameter is required.- Returns:
this
-
lifecyclePolicyName
@Stability(Experimental) public LifecyclePolicy.Builder lifecyclePolicyName(String lifecyclePolicyName) (experimental) The name of the lifecycle policy.Default: - a name is generated
- Parameters:
lifecyclePolicyName- The name of the lifecycle policy. This parameter is required.- Returns:
this
-
status
(experimental) The status of the lifecycle policy.Default: LifecyclePolicyStatus.ENABLED
- Parameters:
status- The status of the lifecycle policy. This parameter is required.- Returns:
this
-
tags
(experimental) The tags to apply to the lifecycle policy.Default: - none
- Parameters:
tags- The tags to apply to the lifecycle policy. This parameter is required.- Returns:
this
-
build
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<LifecyclePolicy>- Returns:
- a newly built instance of
LifecyclePolicy.
-