CreateContainerViewRequestType

CreateContainerViewRequestType
CreateContainerViewRequestType

The parameters of CreateContainerView.

JSON Example
{
    "container": {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    },
    "type": [
        "string"
    ],
    "recursive": false
}
container
Required

Reference to an instance of the ManagedEntity managed object.

array of string
type
Optional

An optional list of managed entity types. The server associates only objects of the specified type(s) with the view. If you specify an empty array, the server uses all types.

boolean
recursive
Required

Whether to include only the immediate children of the container instance, or to include additional objects by following paths beyond the immediate children.

When recursive is false, the list of objects contains only immediate children. When recursive is true, the server populates the list by following references beyond the immediate children (using a child's references, and then references in the resulting objects, and so on).

Depending on the container type, the server will use the following properties of the container instance to obtain objects for the view's object list:

  • Folder object - Folder.childEntity property. If recursive is false, the container list includes the reference to the child entity in the folder instance. If recursive is true, the server will follow the child folder path(s) to collect additional childEntity references.
  • ResourcePool object - ResourcePool.vm and ResourcePool.resourcePool properties. If recursive is false, the object list will contain references to the virtual machines associated with this resource pool, and references to virtual machines associated with the immediate child resource pools. If recursive is true, the server will follow all child resource pool paths extending from the immediate children (and their children, and so on) to collect additional references to virtual machines.
  • ComputeResource object - ComputeResource.host and ComputeResource.resourcePool properties. If recursive is false, the object list will contain references to the host systems associated with this compute resource, references to virtual machines associated with the host systems, and references to virtual machines associated with the immediate child resource pools. If recursive is true, the server will follow the child resource pool paths (and their child resource pool paths, and so on) to collect additional references to virtual machines.
  • Datacenter object - Datacenter.vmFolder, Datacenter.hostFolder, Datacenter.datastoreFolder, and Datacenter.networkFolder properties. If recursive is set to false, the server uses the immediate child folders for the virtual machines, hosts, datastores, and networks associated with this datacenter. If recursive is set to true, the server will follow the folder paths to collect references to additional objects.
  • HostSystem object - HostSystem.vm property. The view object list contains references to the virtual machines associated with this host system. The value of recursive does not affect this behavior.