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": "2023/10/09 11:06:01 +0000",
  "updated_at": "2023/10/09 11:06:01 +0000",
  "resource_uid": "RESOURCE_2001687115",
  "state": "attached",
  "device": "/dev/xvdj",
  "device_id": "device_id:9",
  "links": [
    {"rel":"self","href":"/api/clouds/888/volume_attachments/RESOURCE_2001687115;3956794654"},
    {"rel":"cloud","href":"/api/clouds/888"},
    {"rel":"volume","href":"/api/clouds/888/volumes/RESOURCE_1166705757;2332079705"},
    {"rel":"instance","href":"/api/clouds/888/instances/RESOURCE_2014175382;RAND"}
  ],
  "actions": [

  ]
},{
  "created_at": "2023/10/09 11:06:02 +0000",
  "updated_at": "2023/10/09 11:06:02 +0000",
  "resource_uid": "RESOURCE_3206404625",
  "state": "attached",
  "device": "/dev/xvdj",
  "device_id": "device_id:9",
  "links": [
    {"rel":"self","href":"/api/clouds/888/volume_attachments/RESOURCE_3206404625;2839410080"},
    {"rel":"cloud","href":"/api/clouds/888"},
    {"rel":"volume","href":"/api/clouds/888/volumes/RESOURCE_128588983;3087885902"},
    {"rel":"instance","href":"/api/clouds/888/instances/RESOURCE_1620899759;RAND"}
  ],
  "actions": [

  ]
}]
<?xml version="1.0" encoding="UTF-8"?>
<volume_attachments>
  <volume_attachment>
    <created_at>2023/10/09 11:06:01 +0000</created_at>
    <updated_at>2023/10/09 11:06:01 +0000</updated_at>
    <resource_uid>RESOURCE_2001687115</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_2001687115;3956794654"/>
      <link rel="cloud" href="/api/clouds/888"/>
      <link rel="volume" href="/api/clouds/888/volumes/RESOURCE_1166705757;2332079705"/>
      <link rel="instance" href="/api/clouds/888/instances/RESOURCE_2014175382;RAND"/>
    </links>
    <actions/>
  </volume_attachment>
  <volume_attachment>
    <created_at>2023/10/09 11:06:02 +0000</created_at>
    <updated_at>2023/10/09 11:06:02 +0000</updated_at>
    <resource_uid>RESOURCE_3206404625</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_3206404625;2839410080"/>
      <link rel="cloud" href="/api/clouds/888"/>
      <link rel="volume" href="/api/clouds/888/volumes/RESOURCE_128588983;3087885902"/>
      <link rel="instance" href="/api/clouds/888/instances/RESOURCE_1620899759;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": "2023/10/09 11:06:01 +0000",
  "updated_at": "2023/10/09 11:06:01 +0000",
  "resource_uid": "RESOURCE_2001687115",
  "state": "attached",
  "device": "/dev/xvdj",
  "device_id": "device_id:9",
  "links": [
    {"rel":"self","href":"/api/clouds/888/volume_attachments/RESOURCE_2001687115;3956794654"},
    {"rel":"cloud","href":"/api/clouds/888"},
    {"rel":"volume","href":"/api/clouds/888/volumes/RESOURCE_1166705757;2332079705"},
    {"rel":"instance","href":"/api/clouds/888/instances/RESOURCE_2014175382;RAND"}
  ],
  "actions": [

  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<volume_attachment>
  <created_at>2023/10/09 11:06:01 +0000</created_at>
  <updated_at>2023/10/09 11:06:01 +0000</updated_at>
  <resource_uid>RESOURCE_2001687115</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_2001687115;3956794654"/>
    <link rel="cloud" href="/api/clouds/888"/>
    <link rel="volume" href="/api/clouds/888/volumes/RESOURCE_1166705757;2332079705"/>
    <link rel="instance" href="/api/clouds/888/instances/RESOURCE_2014175382;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[api_behavior] no String * * no Setting to 'async' will cause volume_attachments to happen asynchrously,default value is null
volume_attachment[device] no String * * no The device location where the volume will be mounted. This is rquired for the following cloud: Azure Resource Manager (ARM). The format for Azure Resource Manager (ARM) is `device: 00`, `device: 01`. The format for AWS, GCE, and any other cloud is /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.