# Managed Object - SrmProtectionTask

Returned by
  ProtectVms, UnprotectVms
See also
  SrmProtectionGroupVmProtectionInfo, SrmProtectionTaskVmTask
Since
  SRM API 2.0

## Managed Object Description

A Task returned by ProtectVms and UnprotectVms which will have the final status of the operation when they are complete. In addition, while the task is running, partial results may be returned.

Once the task has been completed, this object will be removed from the server after 30 minutes.

Properties

Name | Type | Description
--- | --- | ---
None

Methods

Methods defined in this Managed Object
GetProtectionStatus, GetResult, GetTasks, IsComplete

# GetProtectionStatus

Get the results of ProtectVms or UnprotectVms.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmProtectionTask used to make the method call.

Return Value

Type | Description
--- | ---
SrmProtectionGroupVmProtectionInfo[] | The completed protection status of VMs that were requested to either be protected or unprotected.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# GetResult

Get the results of this task.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmProtectionTask used to make the method call.

Return Value

Type | Description
--- | ---
vim.TaskInfo[] | The detailed results.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# GetTasks

Get the Task information as it is reflected on the vCenter server for each of the VMs that were requested to either be protected or unprotected.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmProtectionTask used to make the method call.

Return Value

Type | Description
--- | ---
SrmProtectionTaskVmTask[] | Monitorable task information keyed by VirtualMachine.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# IsComplete

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmProtectionTask used to make the method call.

Return Value

Type | Description
--- | ---
xsd:boolean | True if this task has been completed.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None