List Virtual Storage Resources of a Storage Group

The List Virtual Storage Resources of a Storage Group operation lists the virtual storage resources of the FCP storage group with the given identifier.

HTTP method and URI

GET /api/storage-groups/{storage-group-id}/virtual-storage-resources

In this request, the URI variable {storage-group-id} is the object-id of the Storage Group object.

Query parameters:

Name Type Rqd/Opt Description
name String Optional Filter pattern (regular expression) to limit returned objects to those that have a matching name property.
device-number String Optional Filter pattern (regular expression) to limit returned objects to those that have a matching device-number property.
adapter-port-uri String/ URI Optional Filter string to limit returned objects to those that have a matching adapter-port-uri property. Specify an empty query parameter value to select objects that have an adapter-port-uri property value of null, for example: "adapter-port-uri="
partition-uri String/ URI Optional Filter string to limit returned objects to those that have a matching partition-uri property.

Response body contents

On successful completion, the response body is a JSON object with the following fields:

Field name Type Description
virtual-storage-resources Array of virtual-storage-resource-info objects Array of virtual-storage-resource-info objects, described in the next table. The returned array may be empty.

Each nested virtual-storage-resource-info object contains the following fields:

Field name Type Description
element-uri String/ URI The canonical URI path (element-uri) of the virtual Storage Resource element object.
name String The name property of the virtual storage resource element.
device-number String The device-number property of the virtual storage resource element.
adapter-port-uri String/ URI The adapter-port-uri property of the virtual storage resource element.
partition-uri String/ URI The partition-uri property of the virtual storage resource element.

Description

This operation lists the virtual storage resources that are owned by the identified storage group. The element URI, name, device number and associated adapter port and partition are provided for each.

If the object ID {storage-group-id} does not identify a storage group object to which the API user has object-access permission, or does not identity an FCP storage group, a 404 (Not Found) status code is returned

If the name or device-number query parameter is specified, the returned list is limited to those virtual storage resources that have a name or device-number property matching the specified filter pattern. If the name or device-number parameter is omitted, the filtering on the omitted property name is not done.

If the adapter-port-uri or partition-uri query parameter is specified, the returned list is limited to those virtual storage resources that have a matching adapter-port-uri or partition-uri property. If the adapter-port-uri or partition-uri parameter is omitted, the filtering on the omitted property name is not done.

If no virtual storage resources are to be included in the results due to filtering, an empty list is provided and the operation completes successfully.

Authorization requirements

This operation has the following authorization requirement:
  • Object-access permission to the storage group whose object-id is {storage-group-id}.

HTTP status and reason codes

On success, HTTP status code 200 (OK) is returned and the response body is provided as described in Response body contents.

The following HTTP status codes are returned for the indicated errors. The response body is a standard error response body providing the reason code indicated and any associated error message.

Table 1. List Virtual Storage Resources of a Storage Group: HTTP status and reason codes
HTTP error status code Reason code Description
400 (Bad Request) Various Errors were detected during common request validation. See Common request validation reason codes for a list of the possible reason codes.
14 A query parameter defines an invalid value.
404 (Not Found) 1 The storage group with the object ID {storage-group-id} does not exist on the HMC, or is a storage group of the wrong type, or the API user does not have object-access permission for it.

Additional standard status and reason codes can be returned, as described in Invoking API operations.

Example HTTP interaction

Figure 1. List Virtual Storage Resources of a Storage Group: Request
GET /api/storage-groups/2cbc7c2c-9fe9-11e8-b163-fa163e3c2af4/virtual-storage-resources 
  HTTP/1.1
x-api-session: 46zfjkryyht0wrf7v8fjxfmza830u42yuob8p0ct727mr2so2x
Figure 2. List Virtual Storage Resources of a Storage Group: Response
200 OK
server: Hardware management console API web server / 2.0
cache-control: no-cache
date: Tue, 14 Aug 2018 18:50:54 GMT
content-type: application/json;charset=UTF-8
content-length: 737
{
   "virtual-storage-resources":[
      {
         "adapter-port-uri":"/api/adapters/f0f668e8-9fe7-11e8-bc9a-fa163e3c2af4/
           storage-ports/0",
         "device-number":"0000",
         "element-uri":"/api/storage-groups/2cbc7c2c-9fe9-11e8-b163-fa163e3c2af4/
           virtual-storage-resources/4ca56526-9fe9-11e8-b6db-fa163e3c2af4",
         "name":"vhba_FCP Storage Group0",
         "partition-uri":"/api/partitions/4bf93d46-9fe9-11e8-b6db-fa163e3c2af4"
      },
      {
         "adapter-port-uri":"/api/adapters/f4f1479c-9fe7-11e8-bc9a-fa163e3c2af4/
           storage-ports/0",
         "device-number":"0001",
         "element-uri":"/api/storage-groups/2cbc7c2c-9fe9-11e8-b163-fa163e3c2af4/
           virtual-storage-resources/4ce7feea-9fe9-11e8-b6db-fa163e3c2af4",
         "name":"vhba_FCP Storage Group1",
         "partition-uri":"/api/partitions/4bf93d46-9fe9-11e8-b6db-fa163e3c2af4"
      }
   ]
}