Class LifecyclePolicyProps.Builder
java.lang.Object
software.amazon.awscdk.services.imagebuilder.alpha.LifecyclePolicyProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LifecyclePolicyProps>
- Enclosing interface:
LifecyclePolicyProps
@Stability(Experimental)
public static final class LifecyclePolicyProps.Builder
extends Object
implements software.amazon.jsii.Builder<LifecyclePolicyProps>
A builder for
LifecyclePolicyProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.description(String description) Sets the value ofLifecyclePolicyProps.getDescription()details(List<? extends LifecyclePolicyDetail> details) Sets the value ofLifecyclePolicyProps.getDetails()executionRole(IRole executionRole) Sets the value ofLifecyclePolicyProps.getExecutionRole()lifecyclePolicyName(String lifecyclePolicyName) Sets the value ofLifecyclePolicyProps.getLifecyclePolicyName()resourceSelection(LifecyclePolicyResourceSelection resourceSelection) Sets the value ofLifecyclePolicyProps.getResourceSelection()resourceType(LifecyclePolicyResourceType resourceType) Sets the value ofLifecyclePolicyProps.getResourceType()status(LifecyclePolicyStatus status) Sets the value ofLifecyclePolicyProps.getStatus()Sets the value ofLifecyclePolicyProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
details
@Stability(Experimental) public LifecyclePolicyProps.Builder details(List<? extends LifecyclePolicyDetail> details) Sets the value ofLifecyclePolicyProps.getDetails()- Parameters:
details- Configuration details for the lifecycle policy rules. This parameter is required.- Returns:
this
-
resourceSelection
@Stability(Experimental) public LifecyclePolicyProps.Builder resourceSelection(LifecyclePolicyResourceSelection resourceSelection) Sets the value ofLifecyclePolicyProps.getResourceSelection()- Parameters:
resourceSelection- Selection criteria for the resources that the lifecycle policy applies to. This parameter is required.- Returns:
this
-
resourceType
@Stability(Experimental) public LifecyclePolicyProps.Builder resourceType(LifecyclePolicyResourceType resourceType) Sets the value ofLifecyclePolicyProps.getResourceType()- Parameters:
resourceType- The type of Image Builder resource that the lifecycle policy applies to. This parameter is required.- Returns:
this
-
description
Sets the value ofLifecyclePolicyProps.getDescription()- Parameters:
description- The description of the lifecycle policy.- Returns:
this
-
executionRole
Sets the value ofLifecyclePolicyProps.getExecutionRole()- Parameters:
executionRole- 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.- Returns:
this
-
lifecyclePolicyName
@Stability(Experimental) public LifecyclePolicyProps.Builder lifecyclePolicyName(String lifecyclePolicyName) Sets the value ofLifecyclePolicyProps.getLifecyclePolicyName()- Parameters:
lifecyclePolicyName- The name of the lifecycle policy.- Returns:
this
-
status
Sets the value ofLifecyclePolicyProps.getStatus()- Parameters:
status- The status of the lifecycle policy.- Returns:
this
-
tags
Sets the value ofLifecyclePolicyProps.getTags()- Parameters:
tags- The tags to apply to the lifecycle policy.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<LifecyclePolicyProps>- Returns:
- a new instance of
LifecyclePolicyProps - Throws:
NullPointerException- if any required attribute was not provided
-