The VcFolder managed object also acts as a factory object, meaning it creates new entities in a folder. The object provides methods to create child folders and objects, methods to add existing objects to folders, and methods to remove objects from folders and to delete folders.
VcManagedEntity method. VcManagedEntity is a recursive operation that removes all child objects and folders. When you call VcManagedEntity to destroy a folder, the system uses the specified folder as a root and traverses its descendant hierarchy, calling VcManagedEntity on each object. VcManagedEntity is a single operation that treats each recursive call as a single transaction, committing each call to remove an object individually. If VcManagedEntity fails on an object, the method terminates at that point with an exception, leaving some or all of the objects still in the inventory.
Notes on the folder destroy method:
Name | Type | Description |
---|---|---|
alarmActionsEnabled | boolean | Whether alarm actions are enabled for this entity. True if enabled; false otherwise. |
availableField | VcCustomFieldDef[] | List of custom field definitions that are valid for the object's type. The fields are sorted by <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcCustomFieldDef.html#name">VcCustomFieldDef</a>. |
childEntity | VcManagedEntity[] | An array of managed object references. Each entry is a reference to a child entity. |
childType | String[] | Specifies the object types a folder may contain. When you create a folder, it inherits its childType from the parent folder in which it is created. childType is an array of strings. Each array entry identifies a set of object types - Folder and one or more managed object types. The following list shows childType values for the different folders: <ul> <li> { "vim.Folder", "vim.Datacenter" } - Identifies the root folder and its descendant folders. Data center folders can contain child data center folders and Datacenter managed objects. Datacenter objects contain virtual machine, compute resource, network entity, and datastore folders.</li> <li> { "vim.Folder", "vim.Virtualmachine", "vim.VirtualApp" } - Identifies a virtual machine folder. A virtual machine folder may contain child virtual machine folders. It also can contain VirtualMachine managed objects, templates, and VirtualApp managed objects.</li> <li> { "vim.Folder", "vim.ComputeResource" } - Identifies a compute resource folder, which contains child compute resource folders and ComputeResource hierarchies.</li> <li> { "vim.Folder", "vim.Network" } - Identifies a network entity folder. Network entity folders on a vCenter Server can contain Network, DistributedVirtualSwitch, and DistributedVirtualPortgroup managed objects. Network entity folders on an ESXi host can contain only Network objects.</li> <li> { "vim.Folder", "vim.Datastore" } - Identifies a datastore folder. Datastore folders can contain child datastore folders and Datastore managed objects.</li> </ul> |
clusterComputeResource | ClusterComputeResource[] | Filtered attribute 'computeResource' with only ClusterComputeResource objects (depracated) |
computeResource | ComputeResource[] | Filtered attribute 'computeResource' with only ComputeResource objects (depracated) |
computeResource_ClusterComputeResource | ClusterComputeResource[] | Filtered attribute 'computeResource' with only ClusterComputeResource objects |
computeResource_ComputeResource | ComputeResource[] | Filtered attribute 'computeResource' with only ComputeResource objects |
configIssue | VcEvent[] | Current configuration issues that have been detected for this entity. Typically, these issues have already been logged as events. The entity stores these events as long as they are still current. The <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcManagedEntity.html#configStatus">VcManagedEntity</a> property provides an overall status based on these events. |
configStatus | VcManagedEntityStatus | The configStatus indicates whether or not the system has detected a configuration issue involving this entity. For example, it might have detected a duplicate IP address or MAC address, or a host in a cluster might be out of compliance. The meanings of the configStatus values are: <ul> <li>red: A problem has been detected involving the entity. <li>yellow: A problem is about to occur or a transient condition has occurred (For example, reconfigure fail-over policy). <li>green: No configuration issues have been detected. <li>gray: The configuration status of the entity is not being monitored. </ul> A green status indicates only that a problem has not been detected; it is not a guarantee that the entity is problem-free. <p> The <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcManagedEntity.html#configIssue">VcManagedEntity</a> property contains a list of the problems that have been detected. In releases after vSphere API 5.0, vSphere Servers might not generate property collector update notifications for this property. To obtain the latest value of the property, you can use PropertyCollector methods RetrievePropertiesEx or WaitForUpdatesEx. If you use the PropertyCollector.WaitForUpdatesEx method, specify an empty string for the version parameter. Any other version value will not produce any property values as no updates are generated. |
customValue | VcCustomFieldValue[] | Custom field values. |
declaredAlarmState | VcAlarmState[] | A set of alarm states for alarms that apply to this managed entity. The set includes alarms defined on this entity and alarms inherited from the parent entity, or from any ancestors in the inventory hierarchy. <p> Alarms are inherited if they can be triggered by this entity or its descendants. This set does not include alarms that are defined on descendants of this entity. |
disabledMethod | String[] | List of operations that are disabled, given the current runtime state of the entity. For example, a power-on operation always fails if a virtual machine is already powered on. This list can be used by clients to enable or disable operations in a graphical user interface. <p> Note: This list is determined by the current runtime state of an entity, not by its permissions. <p> This list may include the following operations for a HostSystem: <ul> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcHostSystem</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcHostSystem</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcHostSystem</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcHostSystem</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcHostSystem</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcHostSystem</a> </ul> <p> This list may include the following operations for a VirtualMachine: <ul> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcManagedEntity</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcManagedEntity</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> </ul> <p> This list may include the following operations for a ResourcePool: <ul> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcResourcePool</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcResourcePool</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcResourcePool</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcFolder</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcManagedEntity</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcManagedEntity</a> </ul> This list may include the following operations for a VirtualApp: <ul> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcManagedEntity</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualApp</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualApp</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualApp</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualApp</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualApp</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualApp</a> </ul> <p> In releases after vSphere API 5.0, vSphere Servers might not generate property collector update notifications for this property. To obtain the latest value of the property, you can use PropertyCollector methods RetrievePropertiesEx or WaitForUpdatesEx. If you use the PropertyCollector.WaitForUpdatesEx method, specify an empty string for the version parameter. Any other version value will not produce any property values as no updates are generated. |
distributedVirtualSwitch_DistributedVirtualSwitch | DistributedVirtualSwitch[] | Filtered attribute 'distributedVirtualSwitch' with only DistributedVirtualSwitch objects |
distributedVirtualSwitch_VmwareDistributedVirtualSwitch | VmwareDistributedVirtualSwitch[] | Filtered attribute 'distributedVirtualSwitch' with only VmwareDistributedVirtualSwitch objects |
effectiveRole | Number[] | Access rights the current session has to this entity. |
id | String | returns the id of this ManagedObject |
name | String | Name of this entity, unique relative to its parent. <p> Any / (slash), \ (backslash), character used in this name element will be escaped. Similarly, any % (percent) character used in this name element will be escaped, unless it is used to start an escape sequence. A slash is escaped as %2F or %2f. A backslash is escaped as %5C or %5c, and a percent is escaped as %25. |
network_DistributedVirtualPortgroup | DistributedVirtualPortgroup[] | Filtered attribute 'network' with only DistributedVirtualPortgroup objects |
network_Network | Network[] | Filtered attribute 'network' with only Network objects |
overallStatus | VcManagedEntityStatus | General health of this managed entity. The overall status of the managed entity is computed as the worst status among its alarms and the configuration issues detected on the entity. The status is reported as one of the following values: <ul> <li>red: The entity has alarms or configuration issues with a red status. <li>yellow: The entity does not have alarms or configuration issues with a red status, and has at least one with a yellow status. <li>green: The entity does not have alarms or configuration issues with a red or yellow status, and has at least one with a green status. <li>gray: All of the entity's alarms have a gray status and the configuration status of the entity is not being monitored. </ul> In releases after vSphere API 5.0, vSphere Servers might not generate property collector update notifications for this property. To obtain the latest value of the property, you can use PropertyCollector methods RetrievePropertiesEx or WaitForUpdatesEx. If you use the PropertyCollector.WaitForUpdatesEx method, specify an empty string for the version parameter. Any other version value will not produce any property values as no updates are generated. |
parent | VcManagedEntity | Parent of this entity. <p> This value is null for the root object and for <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcVirtualMachine.html">VcVirtualMachine</a> objects that are part of a <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcVirtualMachine.html">VcVirtualApp</a>. |
permission | VcPermission[] | List of permissions defined for this entity. |
recentTask | VcTask[] | The set of recent tasks operating on this managed entity. This is a subset of <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcTaskManager.html#recentTask">VcTaskManager</a> belong to this entity. A task in this list could be in one of the four states: pending, running, success or error. <p> This property can be used to deduce intermediate power states for a virtual machine entity. For example, if the current powerState is "poweredOn" and there is a running task performing the "suspend" operation, then the virtual machine's intermediate state might be described as "suspending." <p> Most tasks (such as power operations) obtain exclusive access to the virtual machine, so it is unusual for this list to contain more than one running task. One exception, however, is the task of cloning a virtual machine. In releases after vSphere API 5.0, vSphere Servers might not generate property collector update notifications for this property. To obtain the latest value of the property, you can use PropertyCollector methods RetrievePropertiesEx or WaitForUpdatesEx. If you use the PropertyCollector.WaitForUpdatesEx method, specify an empty string for the version parameter. Any other version value will not produce any property values as no updates are generated. |
reference | VcManagedObjectReference | returns the ManagedObjectReference of this ManagedObject |
resourcePool_VirtualApp | VirtualApp[] | Filtered attribute 'resourcePool' with only VirtualApp objects |
sdkConnection | VcSdkConnection | returns the parent SdkConnection |
tag | VcTag[] | The set of tags associated with this managed entity. Experimental. Subject to change. |
triggeredAlarmState | VcAlarmState[] | A set of alarm states for alarms triggered by this entity or by its descendants. <p> Triggered alarms are propagated up the inventory hierarchy so that a user can readily tell when a descendant has triggered an alarm. In releases after vSphere API 5.0, vSphere Servers might not generate property collector update notifications for this property. To obtain the latest value of the property, you can use PropertyCollector methods RetrievePropertiesEx or WaitForUpdatesEx. If you use the PropertyCollector.WaitForUpdatesEx method, specify an empty string for the version parameter. Any other version value will not produce any property values as no updates are generated. |
value | VcCustomFieldValue[] | List of custom field values. Each value uses a key to associate an instance of a <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcCustomFieldStringValue.html">VcCustomFieldStringValue</a> with a custom field definition. |
vimHost | VcSdkConnection | returns the parent SdkConnection (deprecated) |
vimType | String | returns the type of this ManagedObject |
Name | Returns |
---|---|
addStandaloneHost_Task(VcHostConnectSpec spec, VcComputeResourceConfigSpec compResSpec, boolean addConnected, String license) | VcTask |
createCluster(String name, VcClusterConfigSpec spec) | VcClusterComputeResource |
createClusterEx(String name, VcClusterConfigSpecEx spec) | VcClusterComputeResource |
createDatacenter(String name) | VcDatacenter |
createDVS_Task(VcDVSCreateSpec spec) | VcTask |
createFolder(String name) | VcFolder |
createStoragePod(String name) | VcStoragePod |
createTrigger(Number timeout, String filter, String condition, String filterToSync) | Trigger |
createVM_Task(VcVirtualMachineConfigSpec config, VcResourcePool pool, VcHostSystem host) | VcTask |
destroy_Task() | VcTask |
moveIntoFolder_Task(VcManagedEntity[] list) | VcTask |
registerVM_Task(String path, String name, boolean asTemplate, VcResourcePool pool, VcHostSystem host) | VcTask |
reload() | void |
rename_Task(String newName) | VcTask |
setCustomValue(String key, String value) | void |
unregisterAndDestroy_Task() | VcTask |
Method | Returns |
---|---|
VcPlugin.importOvf(String ovfUri, VcHostSystem hostSystem, VcFolder importFolder, String vmName, VcOvfNetworkMapping[] networks, VcDatastore datastore) | VcVirtualMachine |
VcPlugin.importOvf(String , VcHostSystem , VcFolder , String , VcOvfNetworkMapping[] , VcDatastore , VcKeyValue[] ) | VcVirtualMachine |
VcResourcePool.createVApp(String name, VcResourceConfigSpec resSpec, VcVAppConfigSpec configSpec, VcFolder vmFolder) | VcVirtualApp |
VcResourcePool.importVApp(VcImportSpec spec, VcFolder folder, VcHostSystem host) | VcHttpNfcLease |
VcVirtualApp.createVApp(String name, VcResourceConfigSpec resSpec, VcVAppConfigSpec configSpec, VcFolder vmFolder) | VcVirtualApp |
VcVirtualApp.importVApp(VcImportSpec spec, VcFolder folder, VcHostSystem host) | VcHttpNfcLease |
VcVirtualMachine.cloneVM_Task(VcFolder folder, String name, VcVirtualMachineCloneSpec spec) | VcTask |