1. Operations
2. vcenter
3. resource pool

## vcenter resource pool: list

Returns information about at most 1000 visible (subject to permission checks) resource pools in vCenter matching the vcenter.resource_pool.filter_spec.

### Request:

#### HTTP request

GET https://{server}/rest/vcenter/resource-pool
?filter.resource_pools.1=obj-103
&filter.resource_pools.2=obj-103
&filter.clusters.1=obj-103
&filter.clusters.2=obj-103
&filter.datacenters.1=obj-103
&filter.datacenters.2=obj-103
&filter.names.1=string
&filter.names.2=string
&filter.hosts.1=obj-103
&filter.hosts.2=obj-103
&filter.parent_resource_pools.1=obj-103
&filter.parent_resource_pools.2=obj-103

#### Request Query Parameters:

Name | Type | Description
--- | --- | ---
bold = required
filter | filter_spec | Optional. Specification of matching resource pools for which information should be returned.
filter.resource_pools | string[] | Identifiers of resource pools that can match the filter. Optional. If unset or empty, resource pools with any identifier match the filter.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: `ResourcePool`. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: `ResourcePool`.
filter.names | string[] | Names that resource pools must have to match the filter (see vcenter.resource_pool.info.name). Optional. If unset or empty, resource pools with any name match the filter.
filter.parent_resource_pools | string[] | Resource pools that must contain the resource pool for the resource pool to match the filter. Optional. If unset or empty, resource pools in any resource pool match the filter.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: `ResourcePool`. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: `ResourcePool`.
filter.datacenters | string[] | Datacenters that must contain the resource pool for the resource pool to match the filter. Optional. If unset or empty, resource pools in any datacenter match the filter.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: `Datacenter`. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: `Datacenter`.
filter.hosts | string[] | Hosts that must contain the resource pool for the resource pool to match the filter. Optional. If unset or empty, resource pools in any host match the filter.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: `HostSystem`. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: `HostSystem`.
filter.clusters | string[] | Clusters that must contain the resource pool for the resource pool to match the filter. Optional. If unset or empty, resource pools in any cluster match the filter.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: `ClusterComputeResource`. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: `ClusterComputeResource`.

### Response:

#### HTTP Status Code: 200

#### Representations:

- JSON
- XML

{
"value": [
{
"name": "string",
"resource_pool": "obj-103"
},
{
"name": "string",
"resource_pool": "obj-103"
}
]
}
<?xml version="1.0" ?>
<ns0:List-Result xmlns:ns0="http://vmware.com/vcenter/resource_pool" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<value-array>
<array-item>
<resource_pool>obj-103</resource_pool>
<name>string</name>
</array-item>
<array-item>
<resource_pool>obj-103</resource_pool>
<name>string</name>
</array-item>
</value-array>
</ns0:List-Result>

#### Response Type:

Name | Type | Description
--- | --- | ---
bold = required
value | summary[] | Commonly used information about the resource pools matching the vcenter.resource_pool.filter_spec.
value[].resource_pool | string | Identifier of the resource pool. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: `ResourcePool`. When operations return a value of this structure as a result, the field will be an identifier for the resource type: `ResourcePool`.
value[].name | string | Name of the resource pool.

#### Errors:

HTTP Status Code | Type | Description
--- | --- | ---
400 | unable_to_allocate_resource | if more than 1000 resource pools match the vcenter.resource_pool.filter_spec.
503 | service_unavailable | if the system is unable to communicate with a service to complete the request.
401 | unauthenticated | if the user can not be authenticated.
403 | unauthorized | if the user doesn't have the required privileges.