Class LifecyclePolicyAmiExclusionRules.Builder
java.lang.Object
software.amazon.awscdk.services.imagebuilder.alpha.LifecyclePolicyAmiExclusionRules.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LifecyclePolicyAmiExclusionRules>
- Enclosing interface:
LifecyclePolicyAmiExclusionRules
@Stability(Experimental)
public static final class LifecyclePolicyAmiExclusionRules.Builder
extends Object
implements software.amazon.jsii.Builder<LifecyclePolicyAmiExclusionRules>
A builder for
LifecyclePolicyAmiExclusionRules-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofLifecyclePolicyAmiExclusionRules.getIsPublic()lastLaunched(Duration lastLaunched) Sets the value ofLifecyclePolicyAmiExclusionRules.getLastLaunched()Sets the value ofLifecyclePolicyAmiExclusionRules.getRegions()sharedAccounts(List<String> sharedAccounts) Sets the value ofLifecyclePolicyAmiExclusionRules.getSharedAccounts()Sets the value ofLifecyclePolicyAmiExclusionRules.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
isPublic
Sets the value ofLifecyclePolicyAmiExclusionRules.getIsPublic()- Parameters:
isPublic- Excludes public AMIs from the lifecycle policy rule if true.- Returns:
this
-
lastLaunched
@Stability(Experimental) public LifecyclePolicyAmiExclusionRules.Builder lastLaunched(Duration lastLaunched) Sets the value ofLifecyclePolicyAmiExclusionRules.getLastLaunched()- Parameters:
lastLaunched- Excludes AMIs which were launched from within the provided duration.- Returns:
this
-
regions
@Stability(Experimental) public LifecyclePolicyAmiExclusionRules.Builder regions(List<String> regions) Sets the value ofLifecyclePolicyAmiExclusionRules.getRegions()- Parameters:
regions- Excludes AMIs which reside in any of the provided regions.- Returns:
this
-
tags
@Stability(Experimental) public LifecyclePolicyAmiExclusionRules.Builder tags(Map<String, String> tags) Sets the value ofLifecyclePolicyAmiExclusionRules.getTags()- Parameters:
tags- Excludes AMIs which have any of the provided tags applied to it.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<LifecyclePolicyAmiExclusionRules>- Returns:
- a new instance of
LifecyclePolicyAmiExclusionRules - Throws:
NullPointerException- if any required attribute was not provided
-