Accessing Datastores

The following diagram illustrates how you can access or specify datastores.

  • Each Datacenter managed object has a datastore property that contains an array of datastores.
  • Each Datacenter managed object has a datastoreFolder property that is a reference to the folder (or folder hierarchy) that contains the datastores for this datacenter.
  • Each Datacenter managed object has a hostFolder property that is a reference to the folder (or folder hierarchy) that contains the compute resources, including hosts and clusters, for this datacenter. Each HostSystem or ComputeResource has a datastore property that is an array of Datastore managed objects.
    Figure 1. Datastore Managed Object
    Shows hierarchy of resources, folders, and datastores in a datacenter.

For more information about the hierarchy of managed objects, see Datacenter Inventory.