synology_apm.sdk.collections.hypervisors module¶
HypervisorCollection — collection interface for managing hypervisor inventory servers.
- class synology_apm.sdk.collections.hypervisors.HypervisorCollection(session)¶
Bases:
objectCollection interface for managing hypervisor inventory servers in APM.
Accessed via APMClient.hypervisors; should not be instantiated directly.
- async list()¶
List all registered hypervisor inventory servers.
- Returns:
(list of Hypervisor, total count)
- Return type:
tuple[list[Hypervisor], int]
- async get(hypervisor_id)¶
Fetch a hypervisor inventory server by ID.
- Parameters:
hypervisor_id (str) – Hypervisor UUID.
- Raises:
ResourceNotFoundError – The specified hypervisor does not exist.
- async get_by_name(name)¶
Fetch a hypervisor inventory server by hostname.
Matches in order: exact hypervisor_id → case-insensitive hostname → case-insensitive address.
- Parameters:
name (str) – Hostname, address, or UUID.
- Raises:
ResourceNotFoundError – No hypervisor with an exact match was found.