Scripting Object - VcDatacenter

Scripting-object corresponding to
Datacenter
Attribute of
VcDatacenterEventArgument, VcDatacenterMismatch, VcDatacenterMismatchArgument, VcVirtualDiskManagerDiskUnit, VcVirtualDiskManagerReparentSpec
Parameter to
allocateIpv4Address, allocateIpv6Address, changeOwner, convertNamespacePathToUuidPath, copy_Task, copy_Task, copyDatastoreFile_Task, copyDatastoreFile_Task, copyVirtualDisk_Task, copyVirtualDisk_Task, createChildDisk_Task, createChildDisk_Task, createIpPool, createVirtualDisk_Task, defragmentVirtualDisk_Task, delete_Task, deleteDatastoreFile_Task, deleteDirectory, deleteVirtualDisk_Task, destroyIpPool, disableUPIT_Task, eagerZeroVirtualDisk_Task, enableUPIT_Task, exportMediaToLibrary_Task, extendVirtualDisk_Task, findAllByDnsName, findAllByIp, findAllByUuid, findByDatastorePath, findByDnsName, findByIp, findByUuid, importLibraryMedia_Task, importUnmanagedSnapshot, inflateVirtualDisk_Task, makeDirectory, move_Task, move_Task, moveDatastoreFile_Task, moveDatastoreFile_Task, moveVirtualDisk_Task, moveVirtualDisk_Task, optimizeEagerZeroVirtualDisk_Task, publishMediaToLibrary_Task, queryIPAllocations, queryIpPools, queryObjectInfo_Task, queryVirtualDiskFragmentation, queryVirtualDiskGeometry, queryVirtualDiskInfo_Task, queryVirtualDiskUuid, releaseIpAllocation, releaseManagedSnapshot, revertToChildDisk_Task, revertToChildDisk_Task, setVirtualDiskUuid, shrinkVirtualDisk_Task, updateIpPool, uploadFileToDatastore, zeroFillVirtualDisk_Task
Returned by
createDatacenter, createDatacenter, createDatacenter, createDatacenter, createDatacenter, createDatacenter, createDatacenter, getAllDatacenters, getAllDatacenters

Scripting Object Description

The {@link Datacenter} managed object provides the interface to the common container object for hosts, virtual machines, networks, and datastores. These entities must be under a distinct datacenter in the inventory, and datacenters may not be nested under other datacenters.

Every {@link Datacenter} has the following set of dedicated folders. These folders are empty until you create entities for the Datacenter.

For a visual representation of the organization of objects in a vCenter hierarchy, see the description of the {@link vim.ServiceInstance} object.

Attributes

Name Type Description
alarmActionsEnabledBoolean

@since vSphere API 4.0
availableFieldVcCustomFieldDef []

@since VI API 2.5
configIssueVcEvent []

@since VI API 2.5
configStatusVcManagedEntityStatus

@since VI API 2.5
configurationVcDatacenterConfigInfo

@since vSphere API 5.1
customValueVcCustomFieldValue []

@since VI API 2.5
datastoreVcDatastore []

@since VI API 2.5
datastoreFolderVcFolder

@since vSphere API 4.0
declaredAlarmStateVcAlarmState []

@since VI API 2.5
disabledMethodString []

@since VI API 2.5
effectiveRoleNumber []

@since VI API 2.5
hostFolderVcFolder

@since VI API 2.5
idString

@since Unknown
morefVcManagedObjectReference

returns the ManagedObjectReference of this ManagedObject @since Unknown
nameString

@since VI API 2.5
networkVcNetwork []

@since VI API 2.5
networkFolderVcFolder

@since vSphere API 4.0
overallStatusVcManagedEntityStatus

@since VI API 2.5
parentVcManagedEntity

@since VI API 2.5
permissionVcPermission []

@since VI API 2.5
recentTaskVcTask []

@since VI API 2.5
sdkConnectionVcSdkConnection

@since Unknown
sdkIdString

@since Unknown
tagVcTag []

@since vSphere API 4.0
triggeredAlarmStateVcAlarmState []

@since VI API 2.5
typeStringDeprecated.

Returns the name for the this managed object's vim type @since Unknown
valueVcCustomFieldValue []

@since VI API 2.5
vimHostVcSdkConnection

@since Unknown
vimIdString

@since Unknown
vimTypeString

@since Unknown
vmFolderVcFolder

@since VI API 2.5

Methods

Methods defined in this Scripting Object
_getRef, addTag, createTrigger, destroy_Task, powerOnMultiVM_Task, queryConnectionInfo, queryConnectionInfoViaSpec, queryDatacenterConfigOptionDescriptor, reconfigureDatacenter_Task, reload, removeTag, rename_Task, retrieveCustomValues, setCustomValue

_getRef

@since Unknown

Parameters

NameTypeDescription
None

Return Value

Type Description
VcManagedObjectReference

queryDatacenterConfigOptionDescriptor

The list of possible choices for {@link vim.Datacenter.ConfigSpec#defaultHardwareVersionKey}. Descriptors returned by the vCenter implementation do not have {@link vim.vm.ConfigOptionDescriptor#host} field populated. @since vSphere API 5.1

Parameters

NameTypeDescription
None

Return Value

Type Description
VcVirtualMachineConfigOptionDescriptor []

removeTag

Removes a set of tags from this object. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcTag []


Return Value

Type Description
None

powerOnMultiVM_Task

Powers on multiple virtual machines in a data center. If the virtual machines are suspended, this method resumes execution from the suspend point. The virtual machines can belong to different clusters in the data center.

If any virtual machine in the list is manually managed by DRS, or DRS has to migrate any manually managed virtual machine or power on any manually managed host in order to power on these virtual machines, a DRS recommendation will be generated, and the users need to manually apply the recommendation for actually powering on these virtual machines. Otherwise, all the virtual machine will be automatically powered on. The virtual machines on stand alone hosts or DRS disabled will be powered-on on the current host. The DRS automatically managed virtual machines will be powered-on on the recommended hosts.

When powering on a virtual machine in a cluster, the system might do an implicit relocation of the virtual machine to another host.

@since VI API 2.5

Parameters

NameTypeDescription
arg0VcVirtualMachine []

arg1VcOptionValue []


Return Value

Type Description
VcTask

queryConnectionInfo

This method provides a way of getting basic information about a host without adding it to a datacenter. Connection wizards typically use this method to show information about a host so a user can confirm a set of changes before applying them. @since VI API 2.5

Parameters

NameTypeDescription
arg0String

arg1Number

arg2String

arg3String

arg4String


Return Value

Type Description
VcHostConnectInfo

reconfigureDatacenter_Task

Change the datacenter configuration. @since vSphere API 5.1

Parameters

NameTypeDescription
arg0VcDatacenterConfigSpec

arg1Boolean


Return Value

Type Description
VcTask

destroy_Task

Destroys this object, deleting its contents and removing it from its parent folder (if any).

NOTE: The appropriate privilege must be held on the parent of the destroyed entity as well as the entity itself.

This method can throw one of several exceptions. The exact set of exceptions depends on the kind of entity that is being removed. See comments for each entity for more information on destroy behavior. @since VI API 2.5

Parameters

NameTypeDescription
None

Return Value

Type Description
VcTask

setCustomValue

Assigns a value to a custom field. The setCustomValue method requires whichever updatePrivilege is defined as one of the {@link CustomFieldsManager.FieldDef#fieldInstancePrivileges} for the CustomFieldDef whose value is being changed. @since VI API 2.5

Parameters

NameTypeDescription
arg0String

arg1String


Return Value

Type Description
None

queryConnectionInfoViaSpec

This method provides a way of getting basic information about a host without adding it to a datacenter. This method is similar to {@link #queryConnectionInfo}, but it takes a {@link vim.host.ConnectSpec} as argument, instead of list of parameters. @since vSphere API 6.0

Parameters

NameTypeDescription
arg0VcHostConnectSpec


Return Value

Type Description
VcHostConnectInfo

reload

Reload the entity state. Clients only need to call this method if they changed some external state that affects the service without using the Web service interface to perform the change. For example, hand-editing a virtual machine configuration file affects the configuration of the associated virtual machine but the service managing the virtual machine might not monitor the file for changes. In this case, after such an edit, a client would call "reload" on the associated virtual machine to ensure the service and its clients have current data for the virtual machine. @since VI API 2.5

Parameters

NameTypeDescription
None

Return Value

Type Description
None

createTrigger

@since Unknown

Parameters

NameTypeDescription
timeoutNumber

filterString

conditionString

filterToSyncString


Return Value

Type Description
Trigger

retrieveCustomValues

Retrieve Custom field values based on specified custom field keys. If there is no key specified, all custom values associated to this ManagedEntity will be returned. @since vSphere API 6.5

Parameters

NameTypeDescription
arg0Number []


Return Value

Type Description
VcCustomFieldValue []

addTag

Add a set of tags to this object that can be queried later. The tag must be of the form "system/" or "global/ Parameters

NameTypeDescription
arg0VcTag []


Return Value

Type Description
None

rename_Task

Renames this managed entity.

Any % (percent) character used in this name parameter must be escaped, unless it is used to start an escape sequence. Clients may also escape any other characters in this name parameter.

@since VI API 2.5

Parameters

NameTypeDescription
arg0String


Return Value

Type Description
VcTask