AttachVolume
Description
Attaches an Amazon EBS volume to a running instance and exposes it as the specified device.
Note | |
---|---|
Windows instances currently support devices xvda through xvdp. Devices xvda and xvdb are reserved by the operating system, xvdc is assigned to drive C:\, and, depending on the instance type, devicesxvdd through xvde might be reserved by the instance stores. Any device that is not reserved can be attached to an Amazon EBS volume. For a list of devices that are reserved by the instance stores, go to the |
Request Parameters
Name | Description | Required |
---|---|---|
|
Type: AttachVolume Ancestor: None Children: |
|
|
The ID of the Amazon EBS volume. The volume and instance must be within the same Availability Zone and the instance must be running. Type: xsd:string Default: None Ancestor: Children: None |
Yes |
|
The ID of the instance to which the volume attaches. The volume and instance must be within the same Availability Zone and the instance must be running. Type: xsd:string Default: None Ancestor: Children: None |
Yes |
|
Specifies how the device is exposed to the instance (e.g., /dev/sdh). Type: xsd:string Default: None Ancestor: Children: None |
Yes |
Response Elements
Name | Description |
---|---|
|
Type: AttachVolumeResponse Ancestor: None Children: |
|
The ID of the request. Type: xsd:string Ancestor: Children: None |
|
The ID of the volume. Type: xsd:string Ancestor: Children: None |
|
The ID of the instance. Type: xsd:string Ancestor: Children: None |
|
The device as it is exposed to the instance. Type: xsd:string Ancestor: Children: None |
|
Volume state (e.g., Type: xsd:string Ancestor: Children: None |
|
Time stamp when the attachment was initiated. Type: xsd:dateTime Ancestor: Children: None |
Examples
Example Request
This example attaches volume vol-4d826724
to instance i-6058a509
and exposes it as /dev/sdh
. For information on standard storage locations, go to the Amazon Elastic Compute Cloud Developer Guide.
<AttachVolume xmlns="http://ec2.amazonaws.com/doc/2009-04-04/"> <volumeId>vol-4d826724</volumeId> <instanceId>i-6058a509</instanceId> <device>/dev/sdh</device> </AttachVolume>
Example Response
<AttachVolumeResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/"> <volumeId>vol-4d826724</volumeId> <instanceId>i-6058a509</instanceId> <device>/dev/sdh</device> <status>attaching</status> <attachTime>2008-05-07T11:51:50.000Z</attachTime> </AttachVolumeResponse>