Class

# VMware_VCloud_SDK_VAppTemplate

class VMware_VCloud_SDK_VAppTemplate extends VMware_VCloud_SDK_Abstract

## Methods

string | getEntityId() Get vCloud ID of the vCloud resource entity from its data object. | from VMware_VCloud_SDK_Abstract
VMware_VCloud_API_ReferenceType | getVAppTemplateRef() Get a reference to a VMware vCloud vApp template entity. |
VMware_VCloud_API_VAppTemplateType | getVAppTemplate() Get a VMware vCloud vApp template entity. |
string | getId() Constructs vCloud ID of this vApp template from its UUID. |
VMware_VCloud_API_LinkType|null | getVdcRef() Get the link to the container of the vApp template. |
VMware_VCloud_API_VdcType|null | getVdc() Get the container of the vApp template. |
int | getStatus() Get status of a vApp template. |
VMware_VCloud_API_TaskType | relocate(VMware_VCloud_API_RelocateParamsType $params, string $name) Relocate a VM to a different datastore. |
VMware_VCloud_API_TaskType | enableDownload(boolean $wait = true) Enable a vApp template for downloading. |
null | disableDownload() Disable a vApp template for downloading. |
VMware_VCloud_API_OVF_EnvelopeType | getOVFDescriptor() Retrieve the OVF descriptor of a vApp Template directly. |
String | getOVFDescriptorAsString() Retrieve the OVF descriptor of a vApp Template directly as string. |
null | downloadOVFFiles(string $destDir = '.') Download files to form OVF package. |
null | downloadLosslessOVFFile(string $destDir = '.') Download lossless vAppTemplate OVF. |
VMware_VCloud_API_OVF_NetworkSection_Type | getNetworkSettings() Get the network settings of this vApp template. |
VMware_VCloud_API_NetworkConfigSectionType | getNetworkConfigSettings() Get the network configure settings of this vApp template. |
VMware_VCloud_API_CustomizationSectionType | getCustomizationSettings() Get customization information of this vApp template. |
VMware_VCloud_API_TaskType | modifyCustomizationSettings(VMware_VCloud_API_CustomizationSectionType $customizationSection) Modify customization settings of this vApp template. |
VMware_VCloud_API_LeaseSettingsSectionType | getLeaseSettings() Get the lease settings of this vApp template. |
VMware_VCloud_API_TaskType | modifyLeaseSettings(VMware_VCloud_API_LeaseSettingsSectionType $leaseSettings) Modify the lease settings of this vApp template. |
VMware_VCloud_API_TaskType | delete() Delete this vApp template. |
VMware_VCloud_API_LinkType|null | getCatalogItemLink() Get a reference to a VMware vCloud catalog entity. |
boolean | isPartOfCatalogItem() Returns true if vApp template is in Catalog, otherwise false. |
VMware_VCloud_API_TaskType | deleteVAppTemplate() Deletes vApp template and its catalog item. |
VMware_VCloud_API_TaskType | modify(string $name = null, string $description = null) Modify name or/and description of this vApp template. |
array|null | getContainedVms($name $name = null) Get contained VMs in the vApp template. |
VMware_VCloud_API_OwnerType | getOwner() Get vApp template owner. |
VMware_VCloud_API_LinkType|null | getShadowVmsLink($name $name = null) Get a link to the shadow VMs of the VM in the vApp template. |
array | getShadowVmsRefs(string $name) Get collection of shadow vm references. |
VMware_VCloud_API_MetadataType|VMware_VCloud_API_MetadataValueType|null | getMetadata(string $key = null, string $domain = null) Get metadata associated with the vApp template or metadata associated with the vApp template for the specified key in the specified domain. |
VMware_VCloud_API_TaskType | mergeMetadata(VMware_VCloud_API_MetadataType $meta) Merges the metadata for a vApp template with the information provided. |
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 template to the value provided. |
VMware_VCloud_API_TaskType | deleteMetadataByKey(string $key, string $domain = null) Deletes the metadata for the particular key in the specified domain for the vApp template. |

## 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 |

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

Get a reference to a VMware vCloud vApp template entity.

#### Return Value

VMware_VCloud_API_ReferenceType |

###
at line 22
`public VMware_VCloud_API_VAppTemplateType getVAppTemplate()`

Get a VMware vCloud vApp template entity.

#### Return Value

VMware_VCloud_API_VAppTemplateType |

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

Constructs vCloud ID of this vApp template from its UUID.

#### Return Value

string |

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

Get the link to the container of the vApp template.

#### Return Value

VMware_VCloud_API_LinkType|null |

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

Get the container of the vApp template.

#### Return Value

VMware_VCloud_API_VdcType|null |

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

Get status of a vApp template.

The following are the possible vApp template status:

- -1 -- could not be created
- 0 -- unresolved
- 1 -- resolved
- 6 -- in an unknown state
- 7 -- in an unrecognized state
- 8 -- powered off
- 10 -- VMs in the vApp template are in Mixed state
- 11 -- descriptor pending
- 12 -- copying contents
- 13 -- disk contents pending
- 14 -- quarantined
- 15 -- quarantine expired
- 16 -- rejected
- 17 -- transfer timeout

#### Return Value

int | vApp template status

###
at line 99
`public VMware_VCloud_API_TaskType relocate(VMware_VCloud_API_RelocateParamsType $params, string $name)`

Relocate a VM to a different datastore.

#### Parameters

VMware_VCloud_API_RelocateParamsType | $params |
string | $name | Name of the shadow vm

#### Return Value

VMware_VCloud_API_TaskType |

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

Enable a vApp template for downloading.

#### Parameters

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

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 132
`public null disableDownload()`

Disable a vApp template for downloading.

#### Return Value

null |

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

Retrieve the OVF descriptor of a vApp Template directly.

#### Return Value

VMware_VCloud_API_OVF_EnvelopeType |

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

Retrieve the OVF descriptor of a vApp Template directly as string.

#### Return Value

String |

###
at line 198
`public null downloadOVFFiles(string $destDir = '.')`

Download files to form OVF package.

#### Parameters

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

#### Return Value

null |

#### Exceptions

VMware_VCloud_SDK_Exception |

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

Download lossless vAppTemplate 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 315
`public VMware_VCloud_API_OVF_NetworkSection_Type getNetworkSettings()`

Get the network settings of this vApp template.

#### Return Value

VMware_VCloud_API_OVF_NetworkSection_Type |

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

Get the network configure settings of this vApp template.

#### Return Value

VMware_VCloud_API_NetworkConfigSectionType |

###
at line 337
`public VMware_VCloud_API_CustomizationSectionType getCustomizationSettings()`

Get customization information of this vApp template.

#### Return Value

VMware_VCloud_API_CustomizationSectionType |

###
at line 349
`public VMware_VCloud_API_TaskType modifyCustomizationSettings(VMware_VCloud_API_CustomizationSectionType $customizationSection)`

Modify customization settings of this vApp template.

#### Parameters

VMware_VCloud_API_CustomizationSectionType | $customizationSection |

#### Return Value

VMware_VCloud_API_TaskType |

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

Get the lease settings of this vApp template.

#### Return Value

VMware_VCloud_API_LeaseSettingsSectionType |

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

Modify the lease settings of this vApp template.

#### Parameters

VMware_VCloud_API_LeaseSettingsSectionType | $leaseSettings |

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 389
`public VMware_VCloud_API_TaskType delete()`

Delete this vApp template.

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 403
`public VMware_VCloud_API_LinkType|null getCatalogItemLink()`

Get a reference to a VMware vCloud catalog entity.

#### Return Value

VMware_VCloud_API_LinkType|null |

###
at line 424
`public boolean isPartOfCatalogItem()`

Returns true if vApp template is in Catalog, otherwise false.

#### Return Value

boolean |

###
at line 438
`public VMware_VCloud_API_TaskType deleteVAppTemplate()`

Deletes vApp template and its catalog item.

If the vApp template is attached to a catalog item. Deletes vApp template alone. If the vApp template is not attached to any catalog item.

#### Return Value

VMware_VCloud_API_TaskType |

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

Modify name or/and description of this vApp template.

#### Parameters

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

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 492
`public array|null getContainedVms($name $name = null)`

Get contained VMs in the vApp template.

#### Parameters

$name | $name |

#### Return Value

array|null | VMwareVCloudAPI_VmType objects array or null

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

Get vApp template owner.

#### Return Value

VMware_VCloud_API_OwnerType |

###
at line 519
`public VMware_VCloud_API_LinkType|null getShadowVmsLink($name $name = null)`

Get a link to the shadow VMs of the VM in the vApp template.

#### Parameters

$name | $name | Name of the VM in the vApp template to search

#### Return Value

VMware_VCloud_API_LinkType|null |

###
at line 546
`public array getShadowVmsRefs(string $name)`

Get collection of shadow vm references.

vAppTemplate VM contains the shadow vm references.

#### Parameters

string | $name | Name of the shadow vm to get.

#### Return Value

array | VMwareVCloudAPI_ReferenceType object array.

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

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

#### Parameters

string | $key |
string | $domain |

#### Return Value

VMware_VCloud_API_MetadataType|VMware_VCloud_API_MetadataValueType|null |

###
at line 581
`public VMware_VCloud_API_TaskType mergeMetadata(VMware_VCloud_API_MetadataType $meta)`

Merges the metadata for a vApp template with the information provided.

#### Parameters

VMware_VCloud_API_MetadataType | $meta |

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 600
`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 template to the value provided.

Note: This will replace any existing metadata information.

#### Parameters

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

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 617
`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 template.

#### Parameters

string | $key |
string | $domain |

#### Return Value

VMware_VCloud_API_TaskType |