Scripting Object - VcComputeResource

Scripting-object corresponding to
ComputeResource
Attribute of
VcComputeResourceEventArgument, VcEsxAgentConfigManagerComputeResourceAgentInfo, VcFailToEnableSPBM, VcNoActiveHostInCluster, VcResourcePool, VcVirtualApp
Parameter to
installIoFilter_Task, queryComputeResourceAgentInfo, queryDisksUsingFilter, queryIoFilterInfo, queryIoFilterIssues, uninstallIoFilter_Task, upgradeIoFilter_Task
Returned by
getAllComputeResources, getAllComputeResources

Scripting Object Description

Represents a set of physical compute resources for a set of virtual machines.

The base type {@link ComputeResource}, when instantiated by calling {@link Folder#addStandaloneHost}, represents a single host. The subclass {@link ClusterComputeResource} represents a cluster of hosts and adds distributed management features such as availability and resource scheduling.

A {@link ComputeResource} always has a root {@link ResourcePool} associated with it. Certain types of clusters such as those with VMware DRS enabled and standalone hosts (ESX Server 3) support the creation of {@link ResourcePool} hierarchies.

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
configurationExVcComputeResourceConfigInfo

@since VI API 2.5
customValueVcCustomFieldValue []

@since VI API 2.5
datastoreVcDatastore []

@since VI API 2.5
declaredAlarmStateVcAlarmState []

@since VI API 2.5
disabledMethodString []

@since VI API 2.5
effectiveRoleNumber []

@since VI API 2.5
environmentBrowserVcEnvironmentBrowser

@since VI API 2.5
hostVcHostSystem []

@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
network_DistributedVirtualPortgroupObject [] Deprecated.

@since Unknown
network_NetworkObject [] Deprecated.

@since Unknown
overallStatusVcManagedEntityStatus

@since VI API 2.5
parentVcManagedEntity

@since VI API 2.5
permissionVcPermission []

@since VI API 2.5
recentTaskVcTask []

@since VI API 2.5
resourcePoolVcResourcePool

@since VI API 2.5
sdkConnectionVcSdkConnection

@since Unknown
sdkIdString

@since Unknown
summaryVcComputeResourceSummary

@since VI API 2.5
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

Methods

Methods defined in this Scripting Object
_getRef, addTag, createTrigger, destroy_Task, reconfigureComputeResource_Task, reload, removeTag, rename_Task, retrieveCustomValues, setCustomValue

_getRef

@since Unknown

Parameters

NameTypeDescription
None

Return Value

Type Description
VcManagedObjectReference

removeTag

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

Parameters

NameTypeDescription
arg0VcTag []


Return Value

Type Description
None

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

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 []

reconfigureComputeResource_Task

Change the compute resource configuration. @since VI API 2.5

Parameters

NameTypeDescription
arg0VcComputeResourceConfigSpec

arg1Boolean


Return Value

Type Description
VcTask

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