Class CfnVolumeAttachmentProps.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnVolumeAttachmentProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnVolumeAttachmentProps>
- Enclosing interface:
CfnVolumeAttachmentProps
@Stability(Stable)
public static final class CfnVolumeAttachmentProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnVolumeAttachmentProps>
A builder for
CfnVolumeAttachmentProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnVolumeAttachmentProps.getDevice()
instanceId
(String instanceId) Sets the value ofCfnVolumeAttachmentProps.getInstanceId()
Sets the value ofCfnVolumeAttachmentProps.getVolumeId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
instanceId
Sets the value ofCfnVolumeAttachmentProps.getInstanceId()
- Parameters:
instanceId
- The ID of the instance to which the volume attaches. This parameter is required. This value can be a reference to anAWS::EC2::Instance
resource, or it can be the physical ID of an existing EC2 instance.- Returns:
this
-
volumeId
Sets the value ofCfnVolumeAttachmentProps.getVolumeId()
- Parameters:
volumeId
- The ID of the Amazon EBS volume. This parameter is required. The volume and instance must be within the same Availability Zone. This value can be a reference to anAWS::EC2::Volume
resource, or it can be the volume ID of an existing Amazon EBS volume.- Returns:
this
-
device
Sets the value ofCfnVolumeAttachmentProps.getDevice()
- Parameters:
device
- The device name (for example,/dev/sdh
orxvdh
).- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnVolumeAttachmentProps>
- Returns:
- a new instance of
CfnVolumeAttachmentProps
- Throws:
NullPointerException
- if any required attribute was not provided
-