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