VolumeAttachmentArgs

data class VolumeAttachmentArgs(val device: Output<String>? = null, val instanceId: Output<String>? = null, val volumeId: Output<String>? = null) : ConvertibleToJava<VolumeAttachmentArgs>

Attaches an Amazon EBS volume to a running instance and exposes it to the instance with the specified device name. Before this resource can be deleted (and therefore the volume detached), you must first unmount the volume in the instance. Failure to do so results in the volume being stuck in the busy state while it is trying to detach, which could possibly damage the file system or the data it contains. If an Amazon EBS volume is the root device of an instance, it cannot be detached while the instance is in the "running" state. To detach the root volume, stop the instance first. If the root volume is detached from an instance with an MKT product code, then the product codes from that volume are no longer associated with the instance.

Constructors

Link copied to clipboard
constructor(device: Output<String>? = null, instanceId: Output<String>? = null, volumeId: Output<String>? = null)

Properties

Link copied to clipboard
val device: Output<String>? = null

The device name (for example, `/dev/sdh` or `xvdh`).

Link copied to clipboard
val instanceId: Output<String>? = null

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.

Link copied to clipboard
val volumeId: Output<String>? = null

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.

Functions

Link copied to clipboard
open override fun toJava(): VolumeAttachmentArgs