AttachVolume
The AttachVolume
operation attaches an Amazon EBS volume to a running instance.
For more information about Amazon EBS, see Amazon Elastic Block Store.
Request Parameters
The following table describes the request parameters for
AttachVolume
. Parameter names are case
sensitive.
Name | Description | Required |
---|---|---|
|
The ID of the Amazon EBS volume Type: xsd:string Default: none Valid Values: ID of a volume that you own Constraints: The volume and instance must be within the same availability zone and the instance must be running |
Yes |
|
The ID of the instance to which the volume attaches Type: xsd:string Default: none Valid Values: ID of an instance that you own Constraints: The volume and instance must be within the same availability zone and the instance must be running |
Yes |
|
Specifies how the device is exposed to the instance (e.g., Type: xsd:string Default: none Valid Values: Valid device ID Constraints: The volume and instance must be within the same availability zone and the instance must be running |
Yes |
Response Elements
The following table describes the default response tags included
in AttachVolume
responses.
Name | Description |
---|---|
|
The ID of the volume Type: xsd:string |
|
The ID of the instance Type: xsd:string |
|
The device as it is exposed to the instance Type: xsd:string |
|
Volume state (e.g., Type: xsd:string |
|
Time stamp when the attachment was initiated Type: xsd:dateTime |
Sample Request
<AttachVolume xmlns="http://ec2.amazonaws.com/doc/2008-08-08"> <volumeId>vol-4d826724</volumeId> <instanceId>i-6058a509</instanceId> <device>/dev/sdh</device> </AttachVolume>
Sample Response
<AttachVolumeResponse xmlns="http://ec2.amazonaws.com/doc/2008-08-08"> <volumeId>vol-4d826724</volumeId> <instanceId>i-6058a509</instanceId> <device>/dev/sdh</device> <status>attaching</status> <attachTime>2008-05-07T11:51:50.000Z</attachTime> </AttachVolumeResponse>