Class CfnLifecyclePolicyProps.Builder
java.lang.Object
software.amazon.awscdk.services.imagebuilder.CfnLifecyclePolicyProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLifecyclePolicyProps>
- Enclosing interface:
CfnLifecyclePolicyProps
@Stability(Stable)
public static final class CfnLifecyclePolicyProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLifecyclePolicyProps>
A builder for
CfnLifecyclePolicyProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.description(String description) Sets the value ofCfnLifecyclePolicyProps.getDescription()executionRole(String executionRole) Sets the value ofCfnLifecyclePolicyProps.getExecutionRole()Sets the value ofCfnLifecyclePolicyProps.getName()policyDetails(List<? extends Object> policyDetails) Sets the value ofCfnLifecyclePolicyProps.getPolicyDetails()policyDetails(IResolvable policyDetails) Sets the value ofCfnLifecyclePolicyProps.getPolicyDetails()resourceSelection(IResolvable resourceSelection) Sets the value ofCfnLifecyclePolicyProps.getResourceSelection()resourceSelection(CfnLifecyclePolicy.ResourceSelectionProperty resourceSelection) Sets the value ofCfnLifecyclePolicyProps.getResourceSelection()resourceType(String resourceType) Sets the value ofCfnLifecyclePolicyProps.getResourceType()Sets the value ofCfnLifecyclePolicyProps.getStatus()Sets the value ofCfnLifecyclePolicyProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
executionRole
Sets the value ofCfnLifecyclePolicyProps.getExecutionRole()- Parameters:
executionRole- The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to run lifecycle actions. This parameter is required.- Returns:
this
-
name
Sets the value ofCfnLifecyclePolicyProps.getName()- Parameters:
name- The name of the lifecycle policy to create. This parameter is required.- Returns:
this
-
policyDetails
Sets the value ofCfnLifecyclePolicyProps.getPolicyDetails()- Parameters:
policyDetails- Configuration details for the lifecycle policy rules. This parameter is required.- Returns:
this
-
policyDetails
@Stability(Stable) public CfnLifecyclePolicyProps.Builder policyDetails(List<? extends Object> policyDetails) Sets the value ofCfnLifecyclePolicyProps.getPolicyDetails()- Parameters:
policyDetails- Configuration details for the lifecycle policy rules. This parameter is required.- Returns:
this
-
resourceSelection
@Stability(Stable) public CfnLifecyclePolicyProps.Builder resourceSelection(IResolvable resourceSelection) Sets the value ofCfnLifecyclePolicyProps.getResourceSelection()- Parameters:
resourceSelection- Selection criteria for the resources that the lifecycle policy applies to. This parameter is required.- Returns:
this
-
resourceSelection
@Stability(Stable) public CfnLifecyclePolicyProps.Builder resourceSelection(CfnLifecyclePolicy.ResourceSelectionProperty resourceSelection) Sets the value ofCfnLifecyclePolicyProps.getResourceSelection()- Parameters:
resourceSelection- Selection criteria for the resources that the lifecycle policy applies to. This parameter is required.- Returns:
this
-
resourceType
Sets the value ofCfnLifecyclePolicyProps.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 ofCfnLifecyclePolicyProps.getDescription()- Parameters:
description- Optional description for the lifecycle policy.- Returns:
this
-
status
Sets the value ofCfnLifecyclePolicyProps.getStatus()- Parameters:
status- Indicates whether the lifecycle policy resource is enabled.- Returns:
this
-
tags
Sets the value ofCfnLifecyclePolicyProps.getTags()- Parameters:
tags- Tags to apply to the lifecycle policy resource.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnLifecyclePolicyProps>- Returns:
- a new instance of
CfnLifecyclePolicyProps - Throws:
NullPointerException- if any required attribute was not provided
-