Class CfnInstance.BlockDeviceMappingProperty.Builder
java.lang.Object
software.amazon.awscdk.services.opsworks.CfnInstance.BlockDeviceMappingProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnInstance.BlockDeviceMappingProperty>
- Enclosing interface:
CfnInstance.BlockDeviceMappingProperty
@Stability(Stable)
public static final class CfnInstance.BlockDeviceMappingProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnInstance.BlockDeviceMappingProperty>
A builder for
CfnInstance.BlockDeviceMappingProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.deviceName
(String deviceName) Sets the value ofCfnInstance.BlockDeviceMappingProperty.getDeviceName()
ebs
(IResolvable ebs) Sets the value ofCfnInstance.BlockDeviceMappingProperty.getEbs()
Sets the value ofCfnInstance.BlockDeviceMappingProperty.getEbs()
Sets the value ofCfnInstance.BlockDeviceMappingProperty.getNoDevice()
virtualName
(String virtualName) Sets the value ofCfnInstance.BlockDeviceMappingProperty.getVirtualName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
deviceName
@Stability(Stable) public CfnInstance.BlockDeviceMappingProperty.Builder deviceName(String deviceName) Sets the value ofCfnInstance.BlockDeviceMappingProperty.getDeviceName()
- Parameters:
deviceName
- The device name that is exposed to the instance, such as/dev/sdh
. For the root device, you can use the explicit device name or you can set this parameter toROOT_DEVICE
and AWS OpsWorks Stacks will provide the correct device name.- Returns:
this
-
ebs
Sets the value ofCfnInstance.BlockDeviceMappingProperty.getEbs()
- Parameters:
ebs
- AnEBSBlockDevice
that defines how to configure an Amazon EBS volume when the instance is launched. You can specify either theVirtualName
orEbs
, but not both.- Returns:
this
-
ebs
@Stability(Stable) public CfnInstance.BlockDeviceMappingProperty.Builder ebs(CfnInstance.EbsBlockDeviceProperty ebs) Sets the value ofCfnInstance.BlockDeviceMappingProperty.getEbs()
- Parameters:
ebs
- AnEBSBlockDevice
that defines how to configure an Amazon EBS volume when the instance is launched. You can specify either theVirtualName
orEbs
, but not both.- Returns:
this
-
noDevice
Sets the value ofCfnInstance.BlockDeviceMappingProperty.getNoDevice()
- Parameters:
noDevice
- Suppresses the specified device included in the AMI's block device mapping.- Returns:
this
-
virtualName
@Stability(Stable) public CfnInstance.BlockDeviceMappingProperty.Builder virtualName(String virtualName) Sets the value ofCfnInstance.BlockDeviceMappingProperty.getVirtualName()
- Parameters:
virtualName
- The virtual device name. For more information, see BlockDeviceMapping . You can specify either theVirtualName
orEbs
, but not both.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnInstance.BlockDeviceMappingProperty>
- Returns:
- a new instance of
CfnInstance.BlockDeviceMappingProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-