Class LookupMachineImageProps.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.LookupMachineImageProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LookupMachineImageProps>
- Enclosing interface:
LookupMachineImageProps
@Stability(Stable)
public static final class LookupMachineImageProps.Builder
extends Object
implements software.amazon.jsii.Builder<LookupMachineImageProps>
A builder for
LookupMachineImageProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadditionalCacheKey
(String additionalCacheKey) Sets the value ofLookupMachineImageProps.getAdditionalCacheKey()
build()
Builds the configured instance.Sets the value ofLookupMachineImageProps.getFilters()
Sets the value ofLookupMachineImageProps.getName()
Sets the value ofLookupMachineImageProps.getOwners()
Sets the value ofLookupMachineImageProps.getUserData()
Sets the value ofLookupMachineImageProps.getWindows()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
Sets the value ofLookupMachineImageProps.getName()
- Parameters:
name
- Name of the image (may contain wildcards). This parameter is required.- Returns:
this
-
additionalCacheKey
@Stability(Stable) public LookupMachineImageProps.Builder additionalCacheKey(String additionalCacheKey) Sets the value ofLookupMachineImageProps.getAdditionalCacheKey()
- Parameters:
additionalCacheKey
- Adds an additional discriminator to thecdk.context.json
cache key.- Returns:
this
-
filters
@Stability(Stable) public LookupMachineImageProps.Builder filters(Map<String, ? extends List<String>> filters) Sets the value ofLookupMachineImageProps.getFilters()
- Parameters:
filters
- Additional filters on the AMI.- Returns:
this
-
owners
Sets the value ofLookupMachineImageProps.getOwners()
- Parameters:
owners
- Owner account IDs or aliases.- Returns:
this
-
userData
Sets the value ofLookupMachineImageProps.getUserData()
- Parameters:
userData
- Custom userdata for this image.- Returns:
this
-
windows
Sets the value ofLookupMachineImageProps.getWindows()
- Parameters:
windows
- Look for Windows images.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<LookupMachineImageProps>
- Returns:
- a new instance of
LookupMachineImageProps
- Throws:
NullPointerException
- if any required attribute was not provided
-