Cloud Management API 1.5

VolumeAttachments

A VolumeAttachment represents a relationship between a volume and an instance.

Actions

index

Lists all volume attachments.

URLs
GET /api/clouds/:cloud_id/instances/:instance_id/volume_attachments
GET /api/clouds/:cloud_id/volume_attachments
HTTP response code
200 OK
Content-type
application/vnd.rightscale.volume_attachment;type=collection

Required roles

Parameters

name required type values regexp blank? description
filter no Array * * no See below for valid filter parameters.
view no String default * no Specifies how many attributes and/or expanded nested relationships to include.

Filters

name partial_match? description
instance_href no The href of the instance to filter on.
resource_uid no Resource Unique IDentifier for the volume to filter on.
volume_href no The href of the volume to filter on.

Example Responses

Click on a format below to see an example response:

JSON XML
[{
  "created_at": "2017/11/15 19:57:41 +0000",
  "updated_at": "2017/11/15 19:57:41 +0000",
  "resource_uid": "RESOURCE_1799202462",
  "state": "attached",
  "device": "/dev/xvdj",
  "device_id": "device_id:9",
  "links": [
    {"rel":"self","href":"/api/clouds/888/volume_attachments/RESOURCE_1799202462;230284292"},
    {"rel":"cloud","href":"/api/clouds/888"},
    {"rel":"volume","href":"/api/clouds/888/volumes/RESOURCE_592343016;274094100"},
    {"rel":"instance","href":"/api/clouds/888/instances/RESOURCE_743469387;RAND"}
  ],
  "actions": [

  ]
},{
  "created_at": "2017/11/15 19:57:43 +0000",
  "updated_at": "2017/11/15 19:57:43 +0000",
  "resource_uid": "RESOURCE_910196790",
  "state": "attached",
  "device": "/dev/xvdj",
  "device_id": "device_id:9",
  "links": [
    {"rel":"self","href":"/api/clouds/888/volume_attachments/RESOURCE_910196790;1117040370"},
    {"rel":"cloud","href":"/api/clouds/888"},
    {"rel":"volume","href":"/api/clouds/888/volumes/RESOURCE_309545518;504036729"},
    {"rel":"instance","href":"/api/clouds/888/instances/RESOURCE_355574679;RAND"}
  ],
  "actions": [

  ]
}]
<?xml version="1.0" encoding="UTF-8"?>
<volume_attachments>
  <volume_attachment>
    <created_at>2017/11/15 19:57:41 +0000</created_at>
    <updated_at>2017/11/15 19:57:41 +0000</updated_at>
    <resource_uid>RESOURCE_1799202462</resource_uid>
    <state>attached</state>
    <device>/dev/xvdj</device>
    <device_id>device_id:9</device_id>
    <links>
      <link rel="self" href="/api/clouds/888/volume_attachments/RESOURCE_1799202462;230284292"/>
      <link rel="cloud" href="/api/clouds/888"/>
      <link rel="volume" href="/api/clouds/888/volumes/RESOURCE_592343016;274094100"/>
      <link rel="instance" href="/api/clouds/888/instances/RESOURCE_743469387;RAND"/>
    </links>
    <actions/>
  </volume_attachment>
  <volume_attachment>
    <created_at>2017/11/15 19:57:43 +0000</created_at>
    <updated_at>2017/11/15 19:57:43 +0000</updated_at>
    <resource_uid>RESOURCE_910196790</resource_uid>
    <state>attached</state>
    <device>/dev/xvdj</device>
    <device_id>device_id:9</device_id>
    <links>
      <link rel="self" href="/api/clouds/888/volume_attachments/RESOURCE_910196790;1117040370"/>
      <link rel="cloud" href="/api/clouds/888"/>
      <link rel="volume" href="/api/clouds/888/volumes/RESOURCE_309545518;504036729"/>
      <link rel="instance" href="/api/clouds/888/instances/RESOURCE_355574679;RAND"/>
    </links>
    <actions/>
  </volume_attachment>
</volume_attachments>

show

Displays information about a single volume attachment.

URLs
GET /api/clouds/:cloud_id/instances/:instance_id/volume_attachments/:id
GET /api/clouds/:cloud_id/volume_attachments/:id
GET /api/clouds/:cloud_id/volumes/:volume_id/volume_attachment [DEPRECATED]
GET /api/clouds/:cloud_id/volumes/:volume_id/volume_attachments
HTTP response code
200 OK
Content-type
application/vnd.rightscale.volume_attachment

Required roles

Parameters

name required type values regexp blank? description
view no String default * no Specifies how many attributes and/or expanded nested relationships to include.

Example Responses

Click on a format below to see an example response:

JSON XML
{
  "created_at": "2017/11/15 19:57:41 +0000",
  "updated_at": "2017/11/15 19:57:41 +0000",
  "resource_uid": "RESOURCE_1799202462",
  "state": "attached",
  "device": "/dev/xvdj",
  "device_id": "device_id:9",
  "links": [
    {"rel":"self","href":"/api/clouds/888/volume_attachments/RESOURCE_1799202462;230284292"},
    {"rel":"cloud","href":"/api/clouds/888"},
    {"rel":"volume","href":"/api/clouds/888/volumes/RESOURCE_592343016;274094100"},
    {"rel":"instance","href":"/api/clouds/888/instances/RESOURCE_743469387;RAND"}
  ],
  "actions": [

  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<volume_attachment>
  <created_at>2017/11/15 19:57:41 +0000</created_at>
  <updated_at>2017/11/15 19:57:41 +0000</updated_at>
  <resource_uid>RESOURCE_1799202462</resource_uid>
  <state>attached</state>
  <device>/dev/xvdj</device>
  <device_id>device_id:9</device_id>
  <links>
    <link rel="self" href="/api/clouds/888/volume_attachments/RESOURCE_1799202462;230284292"/>
    <link rel="cloud" href="/api/clouds/888"/>
    <link rel="volume" href="/api/clouds/888/volumes/RESOURCE_592343016;274094100"/>
    <link rel="instance" href="/api/clouds/888/instances/RESOURCE_743469387;RAND"/>
  </links>
  <actions/>
</volume_attachment>

create

Creates a new volume attachment.

URLs
POST /api/clouds/:cloud_id/instances/:instance_id/volume_attachments
POST /api/clouds/:cloud_id/volume_attachments
POST /api/clouds/:cloud_id/volumes/:volume_id/volume_attachment [DEPRECATED]
POST /api/clouds/:cloud_id/volumes/:volume_id/volume_attachments
HTTP response code
201 Created
Location
Href of created VolumeAttachment.

Required roles

Parameters

name required type values regexp blank? description
volume_attachment yes Hash * * no
volume_attachment[device] no String * * no The device location where the volume will be mounted. Value must be of format /dev/xvd[bcefghij]. This is not reliable and will be deprecated.
volume_attachment[instance_href] no String * * no The href of the instance to which the volume will be attached. Mutually exclusive with server_href.
volume_attachment[server_href] no String * * no The href of the server to which the volume will be attached. Mutually exclusive with instance_href.Note: the Server must have a current_instance.
volume_attachment[settings] no Hash * * no Additional parameters concerning created attachment.
volume_attachment[settings][delete_on_termination] no String * * no Setting to 'true' will schedule volume deletion if instance was terminated, default value is 'false'
volume_attachment[volume_href] no String * * no The href of the volume to be attached.

destroy

Deletes a given volume attachment.

URLs
DELETE /api/clouds/:cloud_id/instances/:instance_id/volume_attachments/:id
DELETE /api/clouds/:cloud_id/volume_attachments/:id
DELETE /api/clouds/:cloud_id/volumes/:volume_id/volume_attachment [DEPRECATED]
DELETE /api/clouds/:cloud_id/volumes/:volume_id/volume_attachments
HTTP response code
204 No Content

Required roles

Parameters

name required type values regexp blank? description
force no String true, false * no Specifies whether to force the detachment of a volume.