Retrieve Details of all Storage Volumes in a Container
/storage/volume/{container}/
?parameter1=value1&parameter2=value2&parameterN=valueN
Required Role: To complete this task, you must have the Compute_Monitor
or Compute_Operations
role. If this role isn't assigned to you or you're not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud My Services. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Request
- application/oracle-compute-v3+json
-
container: string
/Compute-identity_domain/user
or/Compute-identity_domain
-
name(optional): string
The three-part name of the object (
/Compute-identity_domain/user/object
). -
tags(optional): array
Comma-separated strings that tag the storage volume.
-
Cookie: string
The Cookie: header must be included with every request to the service. It must be set to the value of the set-cookie header in the response received to the POST /authenticate/ call.
Response
- application/oracle-compute-v3+json
200 Response
-
set-cookie: string
The cookie value is returned if the session is extended
object
-
account(optional):
string
Shows the default account for your identity domain.
-
availability_domain(optional):
string
The availability domain the volume is in.
-
bootable(optional):
boolean
true
indicates that the storage volume can also be used as a boot disk for an instance. -
description(optional):
string
The description of the storage volume.
-
hypervisor(optional):
string
The hypervisor that this volume is compatible with.
-
imagelist(optional):
string
Name of machine image to extract onto this volume when created. This information is provided only for bootable storage volumes.
-
imagelist_entry(optional):
integer
Specific imagelist entry version to extract.
-
machineimage_name(optional):
string
Three-part name of the machine image. This information is available if the volume is a bootable storage volume.
-
managed(optional):
boolean
All volumes are managed volumes. Default value is
true
. -
name(optional):
string
The three-part name of the object (
/Compute-identity_domain/user/object
). -
platform(optional):
string
The OS platform this volume is compatible with.
-
properties(optional):
array properties
The storage-pool property:
/oracle/public/storage/latency
or/oracle/public/storage/default
. -
quota(optional):
string
Not used
-
readonly(optional):
boolean
Boolean field indicating whether this volume can be attached as readonly. If set to False the volume will be attached as read-write.
- shared(optional): boolean
-
size(optional):
string
The size of this storage volume.
-
snapshot(optional):
string
Name of the parent snapshot from which the storage volume is restored or cloned.
-
snapshot_account(optional):
string
Account of the parent snapshot from which the storage volume is restored.
-
snapshot_id(optional):
string
Id of the parent snapshot from which the storage volume is restored or cloned.
-
status(optional):
string
The current state of the storage volume.
-
status_detail(optional):
string
Details about the latest state of the storage volume.
-
status_timestamp(optional):
string
It indicates the time that the current view of the storage volume was generated.
-
storage_pool(optional):
string
The storage pool from which this volume is allocated.
-
tags(optional):
array tags
Comma-separated strings that tag the storage volume.
-
uri(optional):
string
Uniform Resource Identifier
-
writecache(optional):
boolean
Not used
array
/oracle/public/storage/latency
or /oracle/public/storage/default
.Examples
cURL Command
The following example shows how to retrieve details about all storage volumes in the /Compute-acme/jack.jones@example.com
container by submitting a GET
request on the REST resource using cURL. For more information about cURL, see Use cURL.
Enter the command on a single line. Line breaks are used in this example for readability.
curl -X GET -H "Cookie: $COMPUTE_COOKIE" -H "Accept: application/oracle-compute-v3+json" https://api-z999.compute.us0.oraclecloud.com/storage/volume/Compute-acme/jack.jones@example.com/
-
COMPUTE_COOKIE
is the name of the variable in which you stored the authentication cookie earlier. For information about retrieving the authentication cookie and storing it in a variable, see Authentication. -
api-z999.compute.us0.oraclecloud.com
is an example REST endpoint URL. Change this value to the REST endpoint URL of your Compute Classic site. For information about finding out REST endpoint URL for your site, see Send Requests. -
acme
andjack.jones@example.com
are example values. Replaceacme
with the identity domain ID of your Compute Classic account, andjack.jones@example.com
with your user name.
Example of Response Body
The following example shows the response body in JSON format.
{"result": [ { "status": "Online", "account": "/Compute-acme/default", "writecache": false, "managed": true, "description": null, "tags": [], "bootable": false, "hypervisor": null, "quota": null, "uri": "https://api-z999.compute.us0.oraclecloud.com/storage/volume/Compute-acme/jack.jones@example.com/vol1", "status_detail": "The storage volume is online.", "imagelist_entry": -1, "storage_pool": "/Compute-acme/jack.jones@example.com/mypool", "machineimage_name": null, "status_timestamp": "2015-06-01T11:16:04Z", "shared": false, "imagelist": null, "size": "10737418240", "properties": ["/oracle/public/storage/default"], "name": "/Compute-acme/jack.jones@example.com/vol1" } ] }