Class CfnInstance.VolumeProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnInstance.VolumeProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnInstance.VolumeProperty>
- Enclosing interface:
- CfnInstance.VolumeProperty
@Stability(Stable)
public static final class CfnInstance.VolumeProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnInstance.VolumeProperty>
A builder for
CfnInstance.VolumeProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnInstance.VolumeProperty.getDevice()Sets the value ofCfnInstance.VolumeProperty.getVolumeId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
device
Sets the value ofCfnInstance.VolumeProperty.getDevice()- Parameters:
device- The device name (for example,/dev/sdhorxvdh). This parameter is required.- Returns:
this
-
volumeId
Sets the value ofCfnInstance.VolumeProperty.getVolumeId()- Parameters:
volumeId- The ID of the EBS volume. This parameter is required. The volume and instance must be within the same Availability Zone.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnInstance.VolumeProperty>- Returns:
- a new instance of
CfnInstance.VolumeProperty - Throws:
NullPointerException- if any required attribute was not provided
-