Class MachineImageConfig.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.MachineImageConfig.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<MachineImageConfig>
- Enclosing interface:
MachineImageConfig
@Stability(Stable)
public static final class MachineImageConfig.Builder
extends Object
implements software.amazon.jsii.Builder<MachineImageConfig>
A builder for
MachineImageConfig
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofMachineImageConfig.getImageId()
osType
(OperatingSystemType osType) Sets the value ofMachineImageConfig.getOsType()
Sets the value ofMachineImageConfig.getUserData()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
imageId
Sets the value ofMachineImageConfig.getImageId()
- Parameters:
imageId
- The AMI ID of the image to use. This parameter is required.- Returns:
this
-
osType
Sets the value ofMachineImageConfig.getOsType()
- Parameters:
osType
- Operating system type for this image. This parameter is required.- Returns:
this
-
userData
Sets the value ofMachineImageConfig.getUserData()
- Parameters:
userData
- Initial UserData for this image. This parameter is required.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<MachineImageConfig>
- Returns:
- a new instance of
MachineImageConfig
- Throws:
NullPointerException
- if any required attribute was not provided
-