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) of the IAM role that Image Builder uses to run the lifecycle policy. This parameter is required. This is a custom role that you create.- Returns:
this
-
name
Sets the value ofCfnLifecyclePolicyProps.getName()- Parameters:
name- The name of the lifecycle policy. This parameter is required.- Returns:
this
-
policyDetails
Sets the value ofCfnLifecyclePolicyProps.getPolicyDetails()- Parameters:
policyDetails- The configuration details for a lifecycle policy resource. This parameter is required.- Returns:
this
-
policyDetails
@Stability(Stable) public CfnLifecyclePolicyProps.Builder policyDetails(List<? extends Object> policyDetails) Sets the value ofCfnLifecyclePolicyProps.getPolicyDetails()- Parameters:
policyDetails- The configuration details for a lifecycle policy resource. This parameter is required.- Returns:
this
-
resourceSelection
@Stability(Stable) public CfnLifecyclePolicyProps.Builder resourceSelection(IResolvable resourceSelection) Sets the value ofCfnLifecyclePolicyProps.getResourceSelection()- Parameters:
resourceSelection- Resource selection criteria used to run the lifecycle policy. This parameter is required.- Returns:
this
-
resourceSelection
@Stability(Stable) public CfnLifecyclePolicyProps.Builder resourceSelection(CfnLifecyclePolicy.ResourceSelectionProperty resourceSelection) Sets the value ofCfnLifecyclePolicyProps.getResourceSelection()- Parameters:
resourceSelection- Resource selection criteria used to run the lifecycle policy. This parameter is required.- Returns:
this
-
resourceType
Sets the value ofCfnLifecyclePolicyProps.getResourceType()- Parameters:
resourceType- The type of resources the lifecycle policy targets. 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- To help manage your lifecycle policy resources, you can assign your own metadata to each resource in the form of tags. Each tag consists of a key and an optional value, both of which you define.- 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
-