Class CfnVolumeAttachment.Builder

java.lang.Object
software.amazon.awscdk.services.ec2.CfnVolumeAttachment.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnVolumeAttachment>
Enclosing class:
CfnVolumeAttachment

@Stability(Stable) public static final class CfnVolumeAttachment.Builder extends Object implements software.amazon.jsii.Builder<CfnVolumeAttachment>
A fluent builder for CfnVolumeAttachment.
  • Method Details

    • create

      @Stability(Stable) public static CfnVolumeAttachment.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnVolumeAttachment.Builder.
    • device

      @Stability(Stable) public CfnVolumeAttachment.Builder device(String device)
      The device name (for example, /dev/sdh or xvdh ).

      Parameters:
      device - The device name (for example, /dev/sdh or xvdh ). This parameter is required.
      Returns:
      this
    • instanceId

      @Stability(Stable) public CfnVolumeAttachment.Builder instanceId(String instanceId)
      The ID of the instance to which the volume attaches.

      This value can be a reference to an AWS::EC2::Instance resource, or it can be the physical ID of an existing EC2 instance.

      Parameters:
      instanceId - The ID of the instance to which the volume attaches. This parameter is required.
      Returns:
      this
    • volumeId

      @Stability(Stable) public CfnVolumeAttachment.Builder volumeId(String volumeId)
      The ID of the Amazon EBS volume.

      The volume and instance must be within the same Availability Zone. This value can be a reference to an AWS::EC2::Volume resource, or it can be the volume ID of an existing Amazon EBS volume.

      Parameters:
      volumeId - The ID of the Amazon EBS volume. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public CfnVolumeAttachment build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnVolumeAttachment>
      Returns:
      a newly built instance of CfnVolumeAttachment.