Nested Properties and Property Paths in Composite Data Structures
Last Updated December 16, 2024

vSphere Data objects can include properties that are defined as composite data types, such as data objects. The embedded data objects can also contain properties that are data objects. Properties can nest to several levels.
For example, the following figure shows a UML class diagram of the
VirtualMachine
managed object, which has a
runtime
property that is defined as an
xsd:dateTime
data type.
VirtualMachine
also has a
summary
property that is a
VirtualMachineSummary
data object. The
VirtualMachineSummary
data object contains a
config
property that is a
VirtualMachineConfigSummary
data object.
VirtualMachine Managed Object and Nested Properties
Shows Virtual Machine managed object with summary and config summary
					properties.
To refer to a nested property, use dot notation to separate the object names in the sequence that defines the path to the property. Your code must handle the type referenced at the end of the sequence.
For example, you can compare the property referenced by the path
summary.config.guestId
(a string value) to the property referenced in the path
summary.config
(the complete
VirtualMachineSummary
data object).
The following table shows examples of property references and the corresponding data types for some of the properties of the
VirtualMachine
managed object shown in Figure 1.
Reference
Data Type
summary
VirtualMachineSummary
data object
summary.config
VirtualMachineConfigSummary
data object
summary.config.guestID
string