Class

# VMware_VCloud_SDK_VApp

class VMware_VCloud_SDK_VApp extends VMware_VCloud_SDK_VApp_Abstract

## Methods

string | getEntityId() Get vCloud ID of the vCloud resource entity from its data object. | from VMware_VCloud_SDK_Abstract
VMware_VCloud_API_TaskType | deploy(VMware_VCloud_API_DeployVAppParamsType $params) Deploy the vApp or VM. | from VMware_VCloud_SDK_VApp_Abstract
VMware_VCloud_API_TaskType | undeploy(VMware_VCloud_API_UndeployVAppParamsType $params) Undeploy the vApp or VM. | from VMware_VCloud_SDK_VApp_Abstract
VMware_VCloud_API_TaskType | delete() Delete the vApp or VM. | from VMware_VCloud_SDK_VApp_Abstract
VMware_VCloud_API_TaskType | powerOn() Power on the VM or all Vms contained in the vApp. | from VMware_VCloud_SDK_VApp_Abstract
VMware_VCloud_API_TaskType | powerOff() Power off the VM or all VMs contained in the vApp. | from VMware_VCloud_SDK_VApp_Abstract
VMware_VCloud_API_TaskType | reset() Reset the VM or all VMs contained in the vApp. | from VMware_VCloud_SDK_VApp_Abstract
VMware_VCloud_API_TaskType | reboot() Reboot the VM or all VMs contained in the vApp. | from VMware_VCloud_SDK_VApp_Abstract
VMware_VCloud_API_TaskType | suspend() Suspend the VM or all VMs contained in the vApp. | from VMware_VCloud_SDK_VApp_Abstract
VMware_VCloud_API_TaskType | discardSuspendedState() Discard suspended state of the VM or all VMs contained in the vApp. | from VMware_VCloud_SDK_VApp_Abstract
VMware_VCloud_API_TaskType | shutdown() Shutdown the VM or all VMs contained in the vApp. | from VMware_VCloud_SDK_VApp_Abstract
VMware_VCloud_API_MetadataType|VMware_VCloud_API_MetadataValueType|null | getMetadata(string $key = null, string $domain = null) Get metadata associated with the vApp/VM or metadata associated with the vApp/VM for the specified key in the specified domain. | from VMware_VCloud_SDK_VApp_Abstract
VMware_VCloud_API_TaskType | mergeMetadata(VMware_VCloud_API_MetadataType $meta) Merges the metadata for the vApp or VM with the information provided. | from VMware_VCloud_SDK_VApp_Abstract
VMware_VCloud_API_TaskType | setMetadataByKey(string $key, VMware_VCloud_API_MetadataValueType $value, string $domain = null) Sets the metadata for the particular key in the specified domain for the vApp or VM to the value provided. | from VMware_VCloud_SDK_VApp_Abstract
VMware_VCloud_API_TaskType | deleteMetadataByKey(string $key, string $domain = null) Deletes the metadata for the particular key in the specified domain for the vApp or VM. | from VMware_VCloud_SDK_VApp_Abstract
VMware_VCloud_API_ReferenceType | getVAppRef() Get a reference to a VMware vCloud vApp entity. |
VMware_VCloud_API_VAppType | getVApp() Get a VMware vCloud vApp entity. |
string | getId() Constructs vCloud ID of this vApp from its UUID. |
VMware_VCloud_API_LinkType|null | getVdcRef() Get the link to the vDC to which this vApp belongs. |
VMware_VCloud_API_VdcType|null | getVdc() Get the vDC to which this vApp belongs. |
VMware_VCloud_API_TaskType | modify(string $name = null, string $description = null) Modify name and/or description of this vApp. |
VMware_VCloud_API_TaskType | recompose(VMware_VCloud_API_RecomposeVAppParamsType $params) Recompose a vApp. |
array | getContainedVAppRefs(string $name = null) Get references to contained vApps or contained vApps with given name. |
array | getContainedVmRefs(string $name = null) Get references to contained VMs or contained VMs with given name. |
array | getContainedVApps(string $name = null) Get contained vApps. |
array | getContainedVms(string $name = null) Get contained VMs. |
VMware_VCloud_API_NetworkConfigSectionType | getNetworkConfigSettings() Get network configuration settings of the vApp. |
VMware_VCloud_API_TaskType | modifyNetworkConfigSettings(VMware_VCloud_API_NetworkConfigSectionType $netConfig) Modify network configuration settings of the vApp. |
VMware_VCloud_API_LeaseSettingsSectionType | getLeaseSettings() Get the lease settings of this vApp. |
VMware_VCloud_API_TaskType | modifyLeaseSettings(VMware_VCloud_API_LeaseSettingsSectionType $leaseSettings) Modify the lease settings of this vApp. |
VMware_VCloud_API_OVF_StartupSection_Type | getStartupSettings() Get startup section of the vApp. |
VMware_VCloud_API_TaskType | modifyStartupSettings(VMware_VCloud_API_StartupSection_Type $startupSection) Modify the startup settings of the vApp. |
VMware_VCloud_API_OVF_NetworkSection_Type | getNetworkSettings() Get the network settings of this vApp. |
VMware_VCloud_API_ControlAccessParamsType | getControlAccess() Get the control access of the vApp. |
VMware_VCloud_API_ControlAccessParamsType | modifyControlAccess(VMware_VCloud_API_ControlAccessParamsType $controlAccess) Modify the control access of the vApp. |
int | getStatus() Get the status of this vApp. |
VMware_VCloud_API_OwnerType | getOwner() Get vApp owner. |
null | changeOwner(VMware_VCloud_API_OwnerType $owner) Change vApp owner. |
null | enterMaintenanceMode() VApp enters into maintenance mode. |
null | exitMaintenanceMode() VApp exits maintenance mode. |
VMware_VCloud_API_TaskType|null | resetVAppNetwork() Resets vApp network. |
VMware_VCloud_API_OVF_EnvelopeType | getOVFDescriptor() Retrieve the OVF descriptor of a vApp directly. |
String | getOVFDescriptorAsString() Retrieve the OVF descriptor of a vApp directly as string. |
array | getVmUUIDs() Retrieve VM BIOS UUID as described in the OVF Virtual System. |
VMware_VCloud_API_SnapshotSectionType | getSnapshotSection() Retrieve SnapshotSection element for a vApp or VM. |
VMware_VCloud_API_TaskType | createSnapshot(VMware_VCloud_API_CreateSnapshotParamsType $params) Creates new snapshot of a virtual machine or of all the virtual machines in a vApp. |
VMware_VCloud_API_TaskType | disableNestedHypervisor() Hide hardware-assisted CPU virtualization from guest OS. |
VMware_VCloud_API_TaskType | enableNestedHypervisor() Expose hardware-assisted CPU virtualization to guest OS. |
VMware_VCloud_API_TaskType | removeAllSnapshots() Removes all user created snapshots for a vApp or virtual machine. |
VMware_VCloud_API_TaskType | revertToCurrentSnapshot() Reverts a vApp or virtual machine to the current snapshot, if any. |
| disableDownload() Disable a vApp for downloading. |
VMware_VCloud_API_TaskType | enableDownload(boolean $wait = true) Enable a vApp for downloading. |
null | downloadOVFFile(string $destDir = '.') Download OVF package. |
null | downloadVapp(string $destDir = '.') Download the vApp as an ovf package. |
null | downloadLosslessOVFFile(string $destDir = '.') Download lossless vApp OVF. |
array | getUploadedFileNames(VMware_VCloud_API_VAppType $vApp) Get file information after uploading vApp. |
array | getUploadFileNames(VMware_VCloud_API_VAppType $vApp) Get file information before uploading vApp. |
string|null | getUploadOVFDescriptorUrl($files) Get upload URL of an OVF descriptor file. |
null | uploadOVFDescriptor(string $url, string $filename) Upload OVF descriptor file. |
| UploadFile(array $files, string $ovfDescriptorPath) Upload the vApp related files. |

## Details

###
in VMware_VCloud_SDK_Abstract at line 85
`public string getEntityId()`

Get vCloud ID of the vCloud resource entity from its data object.

#### Return Value

string |

###
in VMware_VCloud_SDK_VApp_Abstract at line 12
`public VMware_VCloud_API_TaskType deploy(VMware_VCloud_API_DeployVAppParamsType $params)`

Deploy the vApp or VM.

#### Parameters

VMware_VCloud_API_DeployVAppParamsType | $params |

#### Return Value

VMware_VCloud_API_TaskType |

###
in VMware_VCloud_SDK_VApp_Abstract at line 26
`public VMware_VCloud_API_TaskType undeploy(VMware_VCloud_API_UndeployVAppParamsType $params)`

Undeploy the vApp or VM.

#### Parameters

VMware_VCloud_API_UndeployVAppParamsType | $params |

#### Return Value

VMware_VCloud_API_TaskType |

###
in VMware_VCloud_SDK_VApp_Abstract at line 40
`public VMware_VCloud_API_TaskType delete()`

Delete the vApp or VM.

The vApp or VM has to be powered off and undeployed before it can be deleted.

#### Return Value

VMware_VCloud_API_TaskType |

###
in VMware_VCloud_SDK_VApp_Abstract at line 53
`public VMware_VCloud_API_TaskType powerOn()`

Power on the VM or all Vms contained in the vApp.

#### Return Value

VMware_VCloud_API_TaskType |

###
in VMware_VCloud_SDK_VApp_Abstract at line 64
`public VMware_VCloud_API_TaskType powerOff()`

Power off the VM or all VMs contained in the vApp.

#### Return Value

VMware_VCloud_API_TaskType |

###
in VMware_VCloud_SDK_VApp_Abstract at line 75
`public VMware_VCloud_API_TaskType reset()`

Reset the VM or all VMs contained in the vApp.

#### Return Value

VMware_VCloud_API_TaskType |

###
in VMware_VCloud_SDK_VApp_Abstract at line 86
`public VMware_VCloud_API_TaskType reboot()`

Reboot the VM or all VMs contained in the vApp.

#### Return Value

VMware_VCloud_API_TaskType |

###
in VMware_VCloud_SDK_VApp_Abstract at line 97
`public VMware_VCloud_API_TaskType suspend()`

Suspend the VM or all VMs contained in the vApp.

#### Return Value

VMware_VCloud_API_TaskType |

###
in VMware_VCloud_SDK_VApp_Abstract at line 108
`public VMware_VCloud_API_TaskType discardSuspendedState()`

Discard suspended state of the VM or all VMs contained in the vApp.

#### Return Value

VMware_VCloud_API_TaskType |

###
in VMware_VCloud_SDK_VApp_Abstract at line 120
`public VMware_VCloud_API_TaskType shutdown()`

Shutdown the VM or all VMs contained in the vApp.

#### Return Value

VMware_VCloud_API_TaskType |

###
in VMware_VCloud_SDK_VApp_Abstract at line 135
`public VMware_VCloud_API_MetadataType|VMware_VCloud_API_MetadataValueType|null getMetadata(string $key = null, string $domain = null)`

Get metadata associated with the vApp/VM or metadata associated with the vApp/VM for the specified key in the specified domain.

#### Parameters

string | $key |
string | $domain |

#### Return Value

VMware_VCloud_API_MetadataType|VMware_VCloud_API_MetadataValueType|null |

###
in VMware_VCloud_SDK_VApp_Abstract at line 147
`public VMware_VCloud_API_TaskType mergeMetadata(VMware_VCloud_API_MetadataType $meta)`

Merges the metadata for the vApp or VM with the information provided.

#### Parameters

VMware_VCloud_API_MetadataType | $meta |

#### Return Value

VMware_VCloud_API_TaskType |

###
in VMware_VCloud_SDK_VApp_Abstract at line 166
`public VMware_VCloud_API_TaskType setMetadataByKey(string $key, VMware_VCloud_API_MetadataValueType $value, string $domain = null)`

Sets the metadata for the particular key in the specified domain for the vApp or VM to the value provided.

Note: This will replace any existing metadata information.

#### Parameters

string | $key |
VMware_VCloud_API_MetadataValueType | $value |
string | $domain |

#### Return Value

VMware_VCloud_API_TaskType |

###
in VMware_VCloud_SDK_VApp_Abstract at line 183
`public VMware_VCloud_API_TaskType deleteMetadataByKey(string $key, string $domain = null)`

Deletes the metadata for the particular key in the specified domain for the vApp or VM.

#### Parameters

string | $key |
string | $domain |

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 10
`public VMware_VCloud_API_ReferenceType getVAppRef()`

Get a reference to a VMware vCloud vApp entity.

#### Return Value

VMware_VCloud_API_ReferenceType |

###
at line 21
`public VMware_VCloud_API_VAppType getVApp()`

Get a VMware vCloud vApp entity.

#### Return Value

VMware_VCloud_API_VAppType |

###
at line 32
`public string getId()`

Constructs vCloud ID of this vApp from its UUID.

#### Return Value

string |

###
at line 43
`public VMware_VCloud_API_LinkType|null getVdcRef()`

Get the link to the vDC to which this vApp belongs.

#### Return Value

VMware_VCloud_API_LinkType|null |

###
at line 54
`public VMware_VCloud_API_VdcType|null getVdc()`

Get the vDC to which this vApp belongs.

#### Return Value

VMware_VCloud_API_VdcType|null |

###
at line 68
`public VMware_VCloud_API_TaskType modify(string $name = null, string $description = null)`

Modify name and/or description of this vApp.

#### Parameters

string | $name | New name of the vApp
string | $description | New description of the vApp

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 88
`public VMware_VCloud_API_TaskType recompose(VMware_VCloud_API_RecomposeVAppParamsType $params)`

Recompose a vApp.

#### Parameters

VMware_VCloud_API_RecomposeVAppParamsType | $params |

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 103
`public array getContainedVAppRefs(string $name = null)`

Get references to contained vApps or contained vApps with given name.

#### Parameters

string | $name | Name of the vApp. If null, returns all contained vApps.

#### Return Value

array | VMwareVCloudAPI_ReferenceType object array.

###
at line 127
`public array getContainedVmRefs(string $name = null)`

Get references to contained VMs or contained VMs with given name.

#### Parameters

string | $name | Name of the VM. If null, returns all contained VMs

#### Return Value

array | VMwareVCloudAPI_ReferenceType object array.

###
at line 153
`public array getContainedVApps(string $name = null)`

Get contained vApps.

#### Parameters

string | $name | Name of the vApp. If null, returns all contained vApps.

#### Return Value

array | VMwareVCloudAPI_VAppType object array.

###
at line 182
`public array getContainedVms(string $name = null)`

Get contained VMs.

#### Parameters

string | $name | Name of the VM. If null, returns all contained VMs

#### Return Value

array | VMwareVCloudAPI_VmType object array.

###
at line 210
`public VMware_VCloud_API_NetworkConfigSectionType getNetworkConfigSettings()`

Get network configuration settings of the vApp.

#### Return Value

VMware_VCloud_API_NetworkConfigSectionType |

###
at line 223
`public VMware_VCloud_API_TaskType modifyNetworkConfigSettings(VMware_VCloud_API_NetworkConfigSectionType $netConfig)`

Modify network configuration settings of the vApp.

#### Parameters

VMware_VCloud_API_NetworkConfigSectionType | $netConfig |

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 236
`public VMware_VCloud_API_LeaseSettingsSectionType getLeaseSettings()`

Get the lease settings of this vApp.

#### Return Value

VMware_VCloud_API_LeaseSettingsSectionType |

###
at line 249
`public VMware_VCloud_API_TaskType modifyLeaseSettings(VMware_VCloud_API_LeaseSettingsSectionType $leaseSettings)`

Modify the lease settings of this vApp.

#### Parameters

VMware_VCloud_API_LeaseSettingsSectionType | $leaseSettings |

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 262
`public VMware_VCloud_API_OVF_StartupSection_Type getStartupSettings()`

Get startup section of the vApp.

#### Return Value

VMware_VCloud_API_OVF_StartupSection_Type |

###
at line 275
`public VMware_VCloud_API_TaskType modifyStartupSettings(VMware_VCloud_API_StartupSection_Type $startupSection)`

Modify the startup settings of the vApp.

#### Parameters

VMware_VCloud_API_StartupSection_Type | $startupSection |

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 288
`public VMware_VCloud_API_OVF_NetworkSection_Type getNetworkSettings()`

Get the network settings of this vApp.

#### Return Value

VMware_VCloud_API_OVF_NetworkSection_Type |

###
at line 300
`public VMware_VCloud_API_ControlAccessParamsType getControlAccess()`

Get the control access of the vApp.

#### Return Value

VMware_VCloud_API_ControlAccessParamsType |

###
at line 313
`public VMware_VCloud_API_ControlAccessParamsType modifyControlAccess(VMware_VCloud_API_ControlAccessParamsType $controlAccess)`

Modify the control access of the vApp.

#### Parameters

VMware_VCloud_API_ControlAccessParamsType | $controlAccess |

#### Return Value

VMware_VCloud_API_ControlAccessParamsType |

###
at line 341
`public int getStatus()`

Get the status of this vApp.

The following are the possible vApp status:

- -1 -- could not be created
- 0 -- unresolved
- 1 -- resolved
- 3 -- suspended
- 4 -- powered on
- 5 -- waiting for user input
- 6 -- in an unknown state
- 7 -- in an unrecognized state
- 8 -- powered off
- 9 -- in an inconsistent state
- 10 -- VMs in the vApp are in mixed states

#### Return Value

int | vApp status

###
at line 353
`public VMware_VCloud_API_OwnerType getOwner()`

Get vApp owner.

#### Return Value

VMware_VCloud_API_OwnerType |

###
at line 366
`public null changeOwner(VMware_VCloud_API_OwnerType $owner)`

Change vApp owner.

#### Parameters

VMware_VCloud_API_OwnerType | $owner |

#### Return Value

null |

###
at line 379
`public null enterMaintenanceMode()`

VApp enters into maintenance mode.

#### Return Value

null |

###
at line 391
`public null exitMaintenanceMode()`

VApp exits maintenance mode.

#### Return Value

null |

###
at line 403
`public VMware_VCloud_API_TaskType|null resetVAppNetwork()`

Resets vApp network.

#### Return Value

VMware_VCloud_API_TaskType|null |

###
at line 431
`public VMware_VCloud_API_OVF_EnvelopeType getOVFDescriptor()`

Retrieve the OVF descriptor of a vApp directly.

#### Return Value

VMware_VCloud_API_OVF_EnvelopeType |

###
at line 444
`public String getOVFDescriptorAsString()`

Retrieve the OVF descriptor of a vApp directly as string.

#### Return Value

String |

###
at line 457
`public array getVmUUIDs()`

Retrieve VM BIOS UUID as described in the OVF Virtual System.

#### Return Value

array | VM BIOS UUIDs

###
at line 489
`public VMware_VCloud_API_SnapshotSectionType getSnapshotSection()`

Retrieve SnapshotSection element for a vApp or VM.

#### Return Value

VMware_VCloud_API_SnapshotSectionType |

###
at line 504
`public VMware_VCloud_API_TaskType createSnapshot(VMware_VCloud_API_CreateSnapshotParamsType $params)`

Creates new snapshot of a virtual machine or of all the virtual machines in a vApp.

Prior to creation of the new

snapshots, any existing user created snapshots associated with the virtual machines are removed.

#### Parameters

VMware_VCloud_API_CreateSnapshotParamsType | $params |

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 518
`public VMware_VCloud_API_TaskType disableNestedHypervisor()`

Hide hardware-assisted CPU virtualization from guest OS.

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 530
`public VMware_VCloud_API_TaskType enableNestedHypervisor()`

Expose hardware-assisted CPU virtualization to guest OS.

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 542
`public VMware_VCloud_API_TaskType removeAllSnapshots()`

Removes all user created snapshots for a vApp or virtual machine.

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 554
`public VMware_VCloud_API_TaskType revertToCurrentSnapshot()`

Reverts a vApp or virtual machine to the current snapshot, if any.

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 566
`public disableDownload()`

Disable a vApp for downloading.

###
at line 580
`public VMware_VCloud_API_TaskType enableDownload(boolean $wait = true)`

Enable a vApp for downloading.

#### Parameters

boolean | $wait | To wait till finish, set to true

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 641
`public null downloadOVFFile(string $destDir = '.')`

Download OVF package.

#### Parameters

string | $destDir | Directory where to save the downloaded file

#### Return Value

null |

#### Exceptions

VMware_VCloud_SDK_Exception |

###
at line 677
`public null downloadVapp(string $destDir = '.')`

Download the vApp as an ovf package.

The ovf file and its vmdk contents are downloaded to the specified location. Before downloading make sure the vapp is enabled for download.

#### Parameters

string | $destDir | Directory where to save the downloaded file

#### Return Value

null |

#### Exceptions

VMware_VCloud_SDK_Exception |

#### See also

Vapp#enableDownload() |

###
at line 729
`public null downloadLosslessOVFFile(string $destDir = '.')`

Download lossless vApp OVF.

Lossless download mode generates ovf without loosing any of its configurations.

#### Parameters

string | $destDir | Directory where to save the downloaded file

#### Return Value

null |

#### Exceptions

VMware_VCloud_SDK_Exception |

###
at line 805
`public array getUploadedFileNames(VMware_VCloud_API_VAppType $vApp)`

Get file information after uploading vApp.

#### Parameters

VMware_VCloud_API_VAppType | $vApp |

#### Return Value

array | VMwareVCloudAPI_FileType object array

#### Exceptions

VMware_VCloud_SDK_Exception |

###
at line 834
`public array getUploadFileNames(VMware_VCloud_API_VAppType $vApp)`

Get file information before uploading vApp.

#### Parameters

VMware_VCloud_API_VAppType | $vApp |

#### Return Value

array | VMwareVCloudAPI_FileType object array

#### Exceptions

VMware_VCloud_SDK_Exception |

###
at line 863
`public string|null getUploadOVFDescriptorUrl($files)`

Get upload URL of an OVF descriptor file.

#### Parameters

| $files |

#### Return Value

string|null | OVF descriptor file URL or null

###
at line 882
`public null uploadOVFDescriptor(string $url, string $filename)`

Upload OVF descriptor file.

#### Parameters

string | $url | HTTP request URL
string | $filename | Path to the OVF descriptor

#### Return Value

null |

###
at line 895
`public UploadFile(array $files, string $ovfDescriptorPath)`

Upload the vApp related files.

This can be vmdk or a manifest.

#### Parameters

array | $files | VMwareVCloudAPI_FileType object array $files
string | $ovfDescriptorPath | Path to the OVF descriptor