The vSphere inventory contains the following types of objects:
- Systems in the datacenter: Host, VirtualMachine, and VirtualApp.
- Support components: ComputeResource, Datastore, Network, and virtual devices.
- Organizational components: Folder and Datacenter
When you manage the virtual infrastructure, you access objects and their properties and methods based on their location in the inventory. Understanding the inventory structure is therefore critical for any programming task. You always start with the ServiceInstance associated with a session, which is the root object of the inventory, and traverse the inventory hierarchy from there. See Property Collector. How you access objects depends on whether your client application is connected to a vCenter Server or an ESXi host.