Class CfnLifecyclePolicyMixinProps.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.imagebuilder.CfnLifecyclePolicyMixinProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLifecyclePolicyMixinProps>
- Enclosing interface:
CfnLifecyclePolicyMixinProps
@Stability(Stable)
public static final class CfnLifecyclePolicyMixinProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLifecyclePolicyMixinProps>
A builder for
CfnLifecyclePolicyMixinProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.description(String description) Sets the value ofCfnLifecyclePolicyMixinProps.getDescription()executionRole(String executionRole) Sets the value ofCfnLifecyclePolicyMixinProps.getExecutionRole()Sets the value ofCfnLifecyclePolicyMixinProps.getName()policyDetails(List<? extends Object> policyDetails) Sets the value ofCfnLifecyclePolicyMixinProps.getPolicyDetails()policyDetails(IResolvable policyDetails) Sets the value ofCfnLifecyclePolicyMixinProps.getPolicyDetails()resourceSelection(CfnLifecyclePolicyPropsMixin.ResourceSelectionProperty resourceSelection) Sets the value ofCfnLifecyclePolicyMixinProps.getResourceSelection()resourceSelection(IResolvable resourceSelection) Sets the value ofCfnLifecyclePolicyMixinProps.getResourceSelection()resourceType(String resourceType) Sets the value ofCfnLifecyclePolicyMixinProps.getResourceType()Sets the value ofCfnLifecyclePolicyMixinProps.getStatus()Sets the value ofCfnLifecyclePolicyMixinProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
description
Sets the value ofCfnLifecyclePolicyMixinProps.getDescription()- Parameters:
description- Optional description for the lifecycle policy.- Returns:
this
-
executionRole
Sets the value ofCfnLifecyclePolicyMixinProps.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.- Returns:
this
-
name
Sets the value ofCfnLifecyclePolicyMixinProps.getName()- Parameters:
name- The name of the lifecycle policy to create.- Returns:
this
-
policyDetails
@Stability(Stable) public CfnLifecyclePolicyMixinProps.Builder policyDetails(IResolvable policyDetails) Sets the value ofCfnLifecyclePolicyMixinProps.getPolicyDetails()- Parameters:
policyDetails- Configuration details for the lifecycle policy rules.- Returns:
this
-
policyDetails
@Stability(Stable) public CfnLifecyclePolicyMixinProps.Builder policyDetails(List<? extends Object> policyDetails) Sets the value ofCfnLifecyclePolicyMixinProps.getPolicyDetails()- Parameters:
policyDetails- Configuration details for the lifecycle policy rules.- Returns:
this
-
resourceSelection
@Stability(Stable) public CfnLifecyclePolicyMixinProps.Builder resourceSelection(IResolvable resourceSelection) Sets the value ofCfnLifecyclePolicyMixinProps.getResourceSelection()- Parameters:
resourceSelection- Selection criteria for the resources that the lifecycle policy applies to.- Returns:
this
-
resourceSelection
@Stability(Stable) public CfnLifecyclePolicyMixinProps.Builder resourceSelection(CfnLifecyclePolicyPropsMixin.ResourceSelectionProperty resourceSelection) Sets the value ofCfnLifecyclePolicyMixinProps.getResourceSelection()- Parameters:
resourceSelection- Selection criteria for the resources that the lifecycle policy applies to.- Returns:
this
-
resourceType
Sets the value ofCfnLifecyclePolicyMixinProps.getResourceType()- Parameters:
resourceType- The type of Image Builder resource that the lifecycle policy applies to.- Returns:
this
-
status
Sets the value ofCfnLifecyclePolicyMixinProps.getStatus()- Parameters:
status- Indicates whether the lifecycle policy resource is enabled.- Returns:
this
-
tags
Sets the value ofCfnLifecyclePolicyMixinProps.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<CfnLifecyclePolicyMixinProps>- Returns:
- a new instance of
CfnLifecyclePolicyMixinProps - Throws:
NullPointerException- if any required attribute was not provided
-