AttachVolume

Description

Attaches a volume to a running or stopped instance and exposes it to the instance with the specified device name.

Request Parameters

  • VolumeId - The ID of the volume
    • Type: String
    • Required: Yes
  • InstanceId - The ID of the instance
    • Type: String
    • Required: Yes
  • Device - The device name to expose to the instance
    • Type: String
    • Required: No

Response Elements

  • requestId - The ID of the request
  • volumeId - The ID of the volume
  • instanceId - The ID of the instance
  • device - The device name
  • status - The attachment state of the volume
  • attachTime - The time stamp when the attachment initiated

Examples

[user@host ~]$ c2-ec2 AttachVolume VolumeId vol-01234567 InstanceId i-01234567 Device disk2