Scripting Object - VcTask

Scripting-object corresponding to
Task
Attribute of
VcAntiAffinityGroup, VcClusterAttemptedVmInfo, VcClusterComputeResource, VcComputeResource, VcContentLibrary, VcContentLibraryItem, VcDatacenter, VcDatacenterFolder, VcDatastore, VcDatastoreFolder, VcDistributedVirtualPortgroup, VcDistributedVirtualSwitch, VcFolder, VcHostFolder, VcHostSystem, VcHostVMotionManagerDestinationState, VcManagedEntity, VcNetwork, VcNetworkFolder, VcOpaqueNetwork, VcResourcePool, VcScheduledTaskInfo, VcStoragePlacementResult, VcStoragePod, VcTagPolicy, VcTagPolicyOption, VcTaskInfo, VcTaskInProgress, VcTaskManager, VcVAppTaskInProgress, VcVirtualApp, VcVirtualDatacenter, VcVirtualMachine, VcVmFolder, VcVmwareDistributedVirtualSwitch, VcVsanUpgradeSystemUpgradeHistoryDiskGroupOp, VcVsanUpgradeSystemUpgradeHistoryItem, VcVsanUpgradeSystemUpgradeHistoryPreflightFail, VcWorkflowStepHandlerResult
Returned by
addDisks_Task, addDVPortgroup_Task, addDVPortgroup_Task, addHost_Task, addHostWithAdminDisabled_Task, addStandaloneHost_Task, addStandaloneHost_Task, addStandaloneHost_Task, addStandaloneHost_Task, addStandaloneHost_Task, addStandaloneHost_Task, addStandaloneHost_Task, addStandaloneHostWithAdminDisabled_Task, addStandaloneHostWithAdminDisabled_Task, addStandaloneHostWithAdminDisabled_Task, addStandaloneHostWithAdminDisabled_Task, addStandaloneHostWithAdminDisabled_Task, addStandaloneHostWithAdminDisabled_Task, addStandaloneHostWithAdminDisabled_Task, applyEntitiesConfig_Task, applyEvcMode_Task, applyEvcModeVM_Task, applyHostConfig_Task, applyStorageDrsRecommendation_Task, applyStorageDrsRecommendationToPod_Task, attachDisk_Task, attachScsiLunEx_Task, certMgrRefreshCACertificatesAndCRLs_Task, certMgrRefreshCertificates_Task, certMgrRevokeCertificates_Task, checkAddHost_Task, checkAddHostEvc_Task, checkAnswerFileStatus_Task, checkClone_Task, checkCompatibility_Task, checkCompliance_Task, checkConfigureEVC_Task, checkConfigureEvcMode_Task, checkHostPatch_Task, checkMigrate_Task, checkProfileCompliance_Task, checkProfileCompliance_Task, checkProfileCompliance_Task, checkRelocate_Task, cloneVApp_Task, cloneVM_Task, cloneVStorageObject_Task, compositeHostProfile_Task, configureDatastoreIORM_Task, configureDigest_Task, configureEVC_Task, configureEvcMode_Task, configureHostCache_Task, configureQuorumFilePathPrefix_Task, configureStorageDrsForPod_Task, configureVcha_Task, configureVFlashResourceEx_Task, consolidateDisks_Task, consolidateVMDisks_Task, copy_Task, copyDatastoreFile_Task, copyVirtualDisk_Task, createChildDisk_Task, createChildVM_Task, createChildVM_Task, createDisk_Task, createDVPortgroup_Task, createDVPortgroup_Task, createDVS_Task, createDVS_Task, createDVS_Task, createDVS_Task, createDVS_Task, createDVS_Task, createDVS_Task, createForkChild_Task, createLinkedClone_Task, createNvdimmNamespace_Task, createPassiveNode_Task, createScreenshot_Task, createSecondaryVM_Task, createSecondaryVMEx_Task, createSnapshot_Task, createSnapshotEx_Task, createVirtualDisk_Task, createVM_Task, createVM_Task, createVM_Task, createVM_Task, createVM_Task, createVM_Task, createVM_Task, createVvolDatastoreOnHosts_Task, createWitnessNode_Task, customizeVM_Task, datastoreCleanupLocks_Task, datastoreExitMaintenanceMode_Task, defragmentVirtualDisk_Task, delete_Task, deleteDatastoreFile_Task, deleteNvdimmBlockNamespaces_Task, deleteNvdimmNamespace_Task, deleteVirtualDisk_Task, deleteVm_Task, deleteVmExceptDisks_Task, deleteVStorageObject_Task, deployVcha_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroy_Task, destroyVcha_Task, detachDisk_Task, detachScsiLunEx_Task, disableEVC_Task, disableEvcMode_Task, disableForkParent_Task, disableSecondaryVM_Task, disableUPIT_Task, disconnectHost_Task, dVPortgroupRollback_Task, dVSManagerExportEntity_Task, dVSManagerImportEntity_Task, dvsReconfigureVmVnicNetworkResourcePool_Task, dvsReconfigureVmVnicNetworkResourcePool_Task, dVSRollback_Task, dVSRollback_Task, eagerZeroVirtualDisk_Task, enableForkParent_Task, enableSecondaryVM_Task, enableUPIT_Task, enterMaintenanceMode_Task, estimateStorageForConsolidateSnapshots_Task, evacuateVsanNode_Task, executeDvsOpaqueCommand_Task, exitMaintenanceMode_Task, exportAnswerFile_Task, exportHostProfileCustomizations_Task, exportMediaToLibrary_Task, exportOvfToUrl_Task, extendDisk_Task, extendVirtualDisk_Task, fTManagerDisableSecondaryVM_Task, fTManagerEnableSecondaryVM_Task, fTManagerMakePrimaryVM_Task, fTManagerRegisterSecondaryVM_Task, fTManagerStartSecondaryOnRemoteHost_Task, fTManagerTerminateFaultTolerantVM_Task, fTManagerUnregisterSecondaryVM_Task, generateDrmBundle_Task, generateHostConfigTaskSpec_Task, generateHostProfileTaskList_Task, generateLogBundles_Task, getAllTasks, getAllTasks, hbrCreateInstance_Task, hbrDisableReplication_Task, hbrEnableReplication_Task, hbrFullSync_Task, hbrPauseReplication_Task, hbrReconfigureReplication_Task, hbrResumeReplication_Task, hbrStartOfflineInstance_Task, hostCloneVStorageObject_Task, hostCreateDisk_Task, hostdApplyHostConfig_Task, hostDeleteVStorageObject_Task, hostdGenerateHostProfileTaskList_Task, hostExtendDisk_Task, hostInflateDisk_Task, hostReconcileDatastoreInventory_Task, hostRelocateVStorageObject_Task, hostUpdateVStorageObjectPolicy_Task, httpNfcLeasePullFromUrls_Task, importCertificateForCAM_Task, importHostProfileCustomizations_Task, importLibraryMedia_Task, importOvfAtUrl_Task, inflateDisk_Task, inflateVirtualDisk_Task, initializeDisks_Task, initiateFailover_Task, initiateSource_Task, initiateSourceEx_Task, installHostPatch_Task, installHostPatchV2_Task, installIoFilter_Task, invokeFSR_Task, joinDomain_Task, joinDomainWithCAM_Task, leaveCurrentDomain_Task, lLPMReconfigVM_Task, lowLevelConsolidateDisks_Task, lowLevelCreateVm_Task, lowLevelExtractNvramContent_Task, lowLevelPromoteDisks_Task, makePrimaryVM_Task, markAsLocal_Task, markAsNonLocal_Task, markAsNonSsd_Task, markAsSsd_Task, mergeDvs_Task, mergeDvs_Task, migrateVM_Task, mountVmfsVolumeEx_Task, move_Task, moveDatastoreFile_Task, moveDVPort_Task, moveDVPort_Task, moveHostInto_Task, moveInto_Task, moveIntoFolder_Task, moveIntoFolder_Task, moveIntoFolder_Task, moveIntoFolder_Task, moveIntoFolder_Task, moveIntoFolder_Task, moveIntoFolder_Task, moveVirtualDisk_Task, optimizeEagerZeroVirtualDisk_Task, parseDescriptorAtUrl_Task, performDvsProductSpecOperation_Task, performDvsProductSpecOperation_Task, performVsanUpgrade_Task, powerDownHostToStandBy_Task, powerOffVApp_Task, powerOffVM_Task, powerOnMultiVM_Task, powerOnPaused_Task, powerOnVApp_Task, powerOnVM_Task, powerUpHostFromStandBy_Task, prepareDestinationEx_Task, prepareSourceEx_Task, promoteDisks_Task, publishMediaToLibrary_Task, queryDrmDumpHistory_Task, queryFileHash_Task, queryHostPatch_Task, queryObjectInfo_Task, queryVirtualDiskInfo_Task, queryVMotionCompatibilityEx_Task, rebootHost_Task, recommissionVsanNode_Task, recomputeDigest_Task, reconcileDatastoreInventory_Task, reconfigureCluster_Task, reconfigureComputeResource_Task, reconfigureComputeResource_Task, reconfigureDatacenter_Task, reconfigureDVPort_Task, reconfigureDVPort_Task, reconfigureDVPortgroup_Task, reconfigureDvs_Task, reconfigureDvs_Task, reconfigureHostForDAS_Task, reconfigVM_Task, reconnectHost_Task, rectifyDvsHost_Task, rectifyDvsHost_Task, rectifyDvsOnHost_Task, refreshStorageDrsRecommendationsForPod_Task, registerChildVM_Task, registerChildVM_Task, registerVM_Task, registerVM_Task, registerVM_Task, registerVM_Task, registerVM_Task, registerVM_Task, registerVM_Task, relayoutSnapshots_Task, reloadDisks_Task, reloadEx_Task, reloadVirtualMachineFromPath_Task, relocateVM_Task, relocateVStorageObject_Task, removeAllSnapshots_Task, removeDatastoreEx_Task, removeDisk_Task, removeDiskMapping_Task, removeSnapshot_Task, removeVVolDatastore_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, rename_Task, reparentDisks_Task, replaceEmbeddedFilePaths_Task, resetVM_Task, resignatureUnresolvedVmfsVolume_Task, resolveInstallationErrorsOnCluster_Task, resolveInstallationErrorsOnHost_Task, resolveMultipleUnresolvedVmfsVolumesEx_Task, retrieveForkChildren_Task, retrieveForkParent_Task, retrieveKmipServersStatus_Task, retrieveLastVmMigrationStatus_Task, retrieveVmRecoveryInfo_Task, revertToChildDisk_Task, revertToCurrentSnapshot_Task, revertToSnapshot_Task, scanHostPatch_Task, scanHostPatchV2_Task, searchDatastore_Task, searchDatastoreSubFolders_Task, setClusterMode_Task, shrinkDisk_Task, shrinkVirtualDisk_Task, shutdownHost_Task, stageHostPatch_Task, stampAllRulesWithUuid_Task, startRecording_Task, startReplaying_Task, stopRecording_Task, stopReplaying_Task, suspendVApp_Task, suspendVM_Task, terminateFaultTolerantVM_Task, testEvcMode_Task, turnDiskLocatorLedOff_Task, turnDiskLocatorLedOn_Task, turnOffFaultToleranceForVM_Task, uninstallHostPatch_Task, uninstallIoFilter_Task, unmapVmfsVolumeEx_Task, unmountDiskMapping_Task, unmountVmfsVolumeEx_Task, unregisterAndDestroy_Task, unregisterAndDestroy_Task, unregisterAndDestroy_Task, unregisterAndDestroy_Task, unregisterAndDestroy_Task, unregisterAndDestroy_Task, unregisterAndDestroy_Task, unregisterVApp_Task, updateAnswerFile_Task, updateDVSHealthCheckConfig_Task, updateDVSHealthCheckConfig_Task, updateDVSLacpGroupConfig_Task, updateDvsOpaqueData_Task, updateDvsOpaqueDataEx_Task, updateHostCustomizations_Task, updateVirtualMachineFiles_Task, updateVsan_Task, updateVStorageObjectPolicy_Task, updateVVolVirtualMachineFiles_Task, upgradeDestination_Task, upgradeIoFilter_Task, upgradeTools_Task, upgradeToolsFromImage_Task, upgradeVM_Task, validateHostProfileComposition_Task, wipeDisk_Task, zeroFillVirtualDisk_Task

Scripting Object Description

A task is used to monitor and potentially cancel long running operations.

Attributes

Name Type Description
availableFieldVcCustomFieldDef []

@since VI API 2.5
idString

@since Unknown
infoVcTaskInfo

@since VI API 2.5
morefVcManagedObjectReference

returns the ManagedObjectReference of this ManagedObject @since Unknown
nameString

@since Unknown
sdkConnectionVcSdkConnection

@since Unknown
sdkIdString

@since Unknown
stateString

@since Unknown
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, cancelTask, createEndOfTaskTrigger, createTrigger, setCustomValue, setTaskDescription, setTaskState, updateProgress

setTaskDescription

Updates task description to describe the current phase of the task.

@since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcLocalizableMessage


Return Value

Type Description
None

_getRef

@since Unknown

Parameters

NameTypeDescription
None

Return Value

Type Description
VcManagedObjectReference

createTrigger

@since Unknown

Parameters

NameTypeDescription
timeoutNumber

filterString

conditionString

filterToSyncString


Return Value

Type Description
Trigger

cancelTask

Cancels a running or queued task. A task may only be canceled if it is cancelable. Multiple cancel requests will be treated as a single cancelation request. Canceling a completed or already canceled task will throw an InvalidState exception.

If a task is canceled, its runtime state will be set to error and its error state will be set to {@link vmodl.fault.RequestCanceled}.

A cancel operation is asynchronous. The operation may return before the task is canceled. @since VI API 2.5

Parameters

NameTypeDescription
None

Return Value

Type Description
None

updateProgress

Sets percentage done for this task and recalculates overall percentage done. If a percentDone value of less than zero or greater than 100 is specified, a value of zero or 100 respectively is used.

@since VI API 2.5

Parameters

NameTypeDescription
arg0Number


Return Value

Type Description
None

setTaskState

Sets task state and optionally sets results or fault, as appropriate for state

@since VI API 2.5

Parameters

NameTypeDescription
arg0VcTaskInfoState

arg1Object

arg2VcLocalizedMethodFault


Return Value

Type Description
None

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

createEndOfTaskTrigger

@since Unknown

Parameters

NameTypeDescription
timeoutNumber


Return Value

Type Description
Trigger