Obtaining Information from a Server

With a reference to a managed object, you can obtain information about the state of the server-side inventory objects and populate client-side data objects based on the values. You can use one of the following approaches:
  • Use an accessor (getter) method. The client proxy interface provides accessor methods for each data object property. You can use these accessor methods to obtain the values of the object. See Language-Specific Classes and Methods for information about client proxy interface accessor methods.
  • Use a
    PropertyCollector
    to navigate to a selected point on the server and obtain values from specific properties. See Property Collector for more information about
    PropertyCollector
    .
  • Use the
    SearchIndex
    managed object to obtain a managed object reference to the managed entity of interest. The
    SearchIndex
    can return managed object references to specific managed entities—
    ComputeResource
    ,
    Datacenter
    ,
    Folder
    ,
    HostSystem
    ,
    ResourcePool
    ,
    VirtualMachine
    —given an inventory path, IP address, or DNS name.
You can use API methods to operate on managed objects in the vSphere inventory. A method that updates properties in one managed object may also update properties in other managed objects. The Server performs asynchronous updates to the inventory. There is no guarantee that the inventory will be completely updated when the method returns to the caller. Use the
PropertyCollector
method
WaitForUpdatesEx
to obtain property changes.