vmware.vmware_rest.vcenter_resourcepool_info module – Gather information about vCenter resource pools.
Note
This module is part of the vmware.vmware_rest collection (version 5.0.0).
You might already have this collection installed if you are using the ansible package.
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install vmware.vmware_rest.
To use it in a playbook, specify: vmware.vmware_rest.vcenter_resourcepool_info.
New in vmware.vmware_rest 5.0.0
Synopsis
Retrieve information about one or more VMware vCenter resource pools.
Can return a list of all resource pools or detailed information about a specific resource pool identified by its MOID.
Use the filter parameters to narrow results by resource pool name, parent resource pool, datacenter, host, or cluster.
Parameters
Parameter |
Comments |
|---|---|
A list of cluster MOIDs to filter the results. Only resource pools that belong to the specified clusters will be returned. If omitted or empty, resource pools in any cluster are returned. |
|
A list of datacenter MOIDs to filter the results. Only resource pools that reside in the specified datacenters will be returned. If omitted or empty, resource pools in any datacenter are returned. |
|
A list of host MOIDs to filter the results. Only resource pools that belong to the specified hosts will be returned. If omitted or empty, resource pools on any host are returned. |
|
A list of resource pool names to filter the results. Only resource pools whose names appear in this list will be returned. If omitted or empty, resource pools with any name are returned. |
|
A list of parent resource pool MOIDs to filter the results. Only resource pools that are children of the specified parent pools will be returned. If omitted or empty, resource pools under any parent are returned. |
|
Identifier of the resource pool to retrieve details for. Must be an identifier (MOID) for a |
|
A list of resource pool MOIDs to filter the results. Only resource pools whose identifiers appear in this list will be returned. If omitted or empty, resource pools with any identifier are returned. |
|
Timeout in seconds for the whole operation including connection establishment, request sending, and response. Default: |
|
The hostname or IP address of the vSphere vCenter. If the value is not specified in the task, the value of environment variable |
|
The vSphere vCenter password. If the value is not specified in the task, the value of environment variable |
|
The port number of the vSphere vCenter. If the value is not specified in the task, the value of environment variable |
|
Optional path to a log file for HTTP REST interaction. If the value is not specified in the task, the value of environment variable |
|
The vSphere vCenter username. If the value is not specified in the task, the value of environment variable |
|
Allows connection when SSL certificates are not valid. Set to If the value is not specified in the task, the value of environment variable Choices:
|
Notes
Note
Generated from vSphere API spec 9.1.0.
Compatible with vSphere API 7.0.3.
Compatible with vSphere API 8.0.2.
Examples
- name: List all resource pools
vmware.vmware_rest.vcenter_resourcepool_info:
register: all_resource_pools
- name: Get details about a specific resource pool
vmware.vmware_rest.vcenter_resourcepool_info:
resource_pool: resgroup-1009
register: my_resource_pool
- name: Filter resource pools by name
vmware.vmware_rest.vcenter_resourcepool_info:
names:
- my_resource_pool
register: filtered_pools
- name: Filter resource pools by cluster
vmware.vmware_rest.vcenter_resourcepool_info:
clusters:
- domain-c1007
register: cluster_pools
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
MOID of the queried resource pool. Returned: When only one resource, with a MOID, was queried. Sample: |
|
A list of resource pools matching the query. Returned: On success. Sample: |
|
Raw output from the API response. This output is maintained for consistency with version 4.x and earlier of this collection. It is recommended to switch to the info return key for a more consistent and documented output. Returned: On success. Sample: |