public interface Tasks extends Service, TasksTypes
Tasks
interface provides methods for managing the task related to a
long running operation. This interface was added in vSphere API 6.7 U1.TasksTypes.FilterSpec, TasksTypes.GetSpec
RESOURCE_TYPE
Modifier and Type | Method and Description |
---|---|
void |
cancel(java.lang.String task)
Cancel a running operation associated with the task.
|
void |
cancel(java.lang.String task,
AsyncCallback<java.lang.Void> asyncCallback)
Cancel a running operation associated with the task.
|
void |
cancel(java.lang.String task,
AsyncCallback<java.lang.Void> asyncCallback,
InvocationConfig invocationConfig)
Cancel a running operation associated with the task.
|
void |
cancel(java.lang.String task,
InvocationConfig invocationConfig)
Cancel a running operation associated with the task.
|
Info |
get(java.lang.String task,
TasksTypes.GetSpec spec)
Returns information about a task.
|
void |
get(java.lang.String task,
TasksTypes.GetSpec spec,
AsyncCallback<Info> asyncCallback)
Returns information about a task.
|
void |
get(java.lang.String task,
TasksTypes.GetSpec spec,
AsyncCallback<Info> asyncCallback,
InvocationConfig invocationConfig)
Returns information about a task.
|
Info |
get(java.lang.String task,
TasksTypes.GetSpec spec,
InvocationConfig invocationConfig)
Returns information about a task.
|
java.util.Map<java.lang.String,Info> |
list(TasksTypes.FilterSpec filterSpec,
TasksTypes.GetSpec resultSpec)
Returns information about at most 1000 visible (subject to permission checks)
tasks matching the
TasksTypes.FilterSpec . |
void |
list(TasksTypes.FilterSpec filterSpec,
TasksTypes.GetSpec resultSpec,
AsyncCallback<java.util.Map<java.lang.String,Info>> asyncCallback)
Returns information about at most 1000 visible (subject to permission checks)
tasks matching the
TasksTypes.FilterSpec . |
void |
list(TasksTypes.FilterSpec filterSpec,
TasksTypes.GetSpec resultSpec,
AsyncCallback<java.util.Map<java.lang.String,Info>> asyncCallback,
InvocationConfig invocationConfig)
Returns information about at most 1000 visible (subject to permission checks)
tasks matching the
TasksTypes.FilterSpec . |
java.util.Map<java.lang.String,Info> |
list(TasksTypes.FilterSpec filterSpec,
TasksTypes.GetSpec resultSpec,
InvocationConfig invocationConfig)
Returns information about at most 1000 visible (subject to permission checks)
tasks matching the
TasksTypes.FilterSpec . |
Info get(java.lang.String task, TasksTypes.GetSpec spec)
Synchronous method overload. Result of the invocation will be reported as a method return value.
task
- Task identifier.
The parameter must be an identifier for the resource type: com.vmware.cis.task
.spec
- Specification on what to get for a task.
If null
, the behavior is equivalent to a TasksTypes.GetSpec
with all properties null
which means
only the data described in Info
will be returned and
the result of the operation will be return.Error
- if the system reports an error while responding to the request.NotFound
- if the task is not found.ResourceInaccessible
- if the task's state cannot be accessed.ServiceUnavailable
- if the system is unable to communicate with a service to complete the request.Unauthenticated
- if the user can not be authenticated.Unauthorized
- if the user doesn't have the required privileges.Info get(java.lang.String task, TasksTypes.GetSpec spec, InvocationConfig invocationConfig)
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
task
- Task identifier.
The parameter must be an identifier for the resource type: com.vmware.cis.task
.spec
- Specification on what to get for a task.
If null
, the behavior is equivalent to a TasksTypes.GetSpec
with all properties null
which means
only the data described in Info
will be returned and
the result of the operation will be return.invocationConfig
- Configuration for the method invocation.Error
- if the system reports an error while responding to the request.NotFound
- if the task is not found.ResourceInaccessible
- if the task's state cannot be accessed.ServiceUnavailable
- if the system is unable to communicate with a service to complete the request.Unauthenticated
- if the user can not be authenticated.Unauthorized
- if the user doesn't have the required privileges.void get(java.lang.String task, TasksTypes.GetSpec spec, AsyncCallback<Info> asyncCallback)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Operation Result:
Information about the specified task.
Operation Errors:
Error
- if the system reports an error while responding to the request.
NotFound
- if the task is not found.
ResourceInaccessible
- if the task's state cannot be accessed.
ServiceUnavailable
- if the system is unable to communicate with a service to complete the request.
Unauthenticated
- if the user can not be authenticated.
Unauthorized
- if the user doesn't have the required privileges.
task
- Task identifier.
The parameter must be an identifier for the resource type: com.vmware.cis.task
.spec
- Specification on what to get for a task.
If null
, the behavior is equivalent to a TasksTypes.GetSpec
with all properties null
which means
only the data described in Info
will be returned and
the result of the operation will be return.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void get(java.lang.String task, TasksTypes.GetSpec spec, AsyncCallback<Info> asyncCallback, InvocationConfig invocationConfig)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Operation Result:
Information about the specified task.
Operation Errors:
Error
- if the system reports an error while responding to the request.
NotFound
- if the task is not found.
ResourceInaccessible
- if the task's state cannot be accessed.
ServiceUnavailable
- if the system is unable to communicate with a service to complete the request.
Unauthenticated
- if the user can not be authenticated.
Unauthorized
- if the user doesn't have the required privileges.
task
- Task identifier.
The parameter must be an identifier for the resource type: com.vmware.cis.task
.spec
- Specification on what to get for a task.
If null
, the behavior is equivalent to a TasksTypes.GetSpec
with all properties null
which means
only the data described in Info
will be returned and
the result of the operation will be return.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.java.util.Map<java.lang.String,Info> list(TasksTypes.FilterSpec filterSpec, TasksTypes.GetSpec resultSpec)
TasksTypes.FilterSpec
. All tasks must
be in the same provider. This method was added in vSphere API 6.7 U1.
Synchronous method overload. Result of the invocation will be reported as a method return value.
filterSpec
- Specification of matching tasks.
This is currently required. In the future, if it is null
, the behavior
is equivalent to a TasksTypes.FilterSpec
with all
properties null
which means all tasks match the filter.resultSpec
- Specification of what to return for a task.
If null
, the behavior is equivalent to a TasksTypes.GetSpec
with all properties null
which means
only the data describe in Info
will be returned and
the result of the operation will be return.Map
will be an identifier for the
resource type: com.vmware.cis.task
.InvalidArgument
- if any of the specified parameters are invalid.ResourceInaccessible
- if a task's state cannot be accessed or over 1000 tasks matching the TasksTypes.FilterSpec
.ServiceUnavailable
- if the system is unable to communicate with a service to complete the request.Unauthenticated
- if the user can not be authenticated.Unauthorized
- if the user doesn't have the required privileges.java.util.Map<java.lang.String,Info> list(TasksTypes.FilterSpec filterSpec, TasksTypes.GetSpec resultSpec, InvocationConfig invocationConfig)
TasksTypes.FilterSpec
. All tasks must
be in the same provider. This method was added in vSphere API 6.7 U1.
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
filterSpec
- Specification of matching tasks.
This is currently required. In the future, if it is null
, the behavior
is equivalent to a TasksTypes.FilterSpec
with all
properties null
which means all tasks match the filter.resultSpec
- Specification of what to return for a task.
If null
, the behavior is equivalent to a TasksTypes.GetSpec
with all properties null
which means
only the data describe in Info
will be returned and
the result of the operation will be return.invocationConfig
- Configuration for the method invocation.Map
will be an identifier for the
resource type: com.vmware.cis.task
.InvalidArgument
- if any of the specified parameters are invalid.ResourceInaccessible
- if a task's state cannot be accessed or over 1000 tasks matching the TasksTypes.FilterSpec
.ServiceUnavailable
- if the system is unable to communicate with a service to complete the request.Unauthenticated
- if the user can not be authenticated.Unauthorized
- if the user doesn't have the required privileges.void list(TasksTypes.FilterSpec filterSpec, TasksTypes.GetSpec resultSpec, AsyncCallback<java.util.Map<java.lang.String,Info>> asyncCallback)
TasksTypes.FilterSpec
. All tasks must
be in the same provider. This method was added in vSphere API 6.7 U1.
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Operation Result:
Map of task identifier to information about the task.
The key in the return value Map
will be an identifier for the
resource type: com.vmware.cis.task
.
Operation Errors:
InvalidArgument
- if any of the specified parameters are invalid.
ResourceInaccessible
- if a task's state cannot be accessed or over 1000 tasks matching the TasksTypes.FilterSpec
.
ServiceUnavailable
- if the system is unable to communicate with a service to complete the request.
Unauthenticated
- if the user can not be authenticated.
Unauthorized
- if the user doesn't have the required privileges.
filterSpec
- Specification of matching tasks.
This is currently required. In the future, if it is null
, the behavior
is equivalent to a TasksTypes.FilterSpec
with all
properties null
which means all tasks match the filter.resultSpec
- Specification of what to return for a task.
If null
, the behavior is equivalent to a TasksTypes.GetSpec
with all properties null
which means
only the data describe in Info
will be returned and
the result of the operation will be return.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void list(TasksTypes.FilterSpec filterSpec, TasksTypes.GetSpec resultSpec, AsyncCallback<java.util.Map<java.lang.String,Info>> asyncCallback, InvocationConfig invocationConfig)
TasksTypes.FilterSpec
. All tasks must
be in the same provider. This method was added in vSphere API 6.7 U1.
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Operation Result:
Map of task identifier to information about the task.
The key in the return value Map
will be an identifier for the
resource type: com.vmware.cis.task
.
Operation Errors:
InvalidArgument
- if any of the specified parameters are invalid.
ResourceInaccessible
- if a task's state cannot be accessed or over 1000 tasks matching the TasksTypes.FilterSpec
.
ServiceUnavailable
- if the system is unable to communicate with a service to complete the request.
Unauthenticated
- if the user can not be authenticated.
Unauthorized
- if the user doesn't have the required privileges.
filterSpec
- Specification of matching tasks.
This is currently required. In the future, if it is null
, the behavior
is equivalent to a TasksTypes.FilterSpec
with all
properties null
which means all tasks match the filter.resultSpec
- Specification of what to return for a task.
If null
, the behavior is equivalent to a TasksTypes.GetSpec
with all properties null
which means
only the data describe in Info
will be returned and
the result of the operation will be return.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.void cancel(java.lang.String task)
Synchronous method overload. Result of the invocation will be reported as a method return value.
task
- Task identifier.
The parameter must be an identifier for the resource type: com.vmware.cis.task
.Error
- if the system reports an error while responding to the request.NotAllowedInCurrentState
- if the task is already canceled or completed.NotFound
- if the task is not found.ResourceInaccessible
- if the task's state cannot be accessed.ServiceUnavailable
- if the system is unable to communicate with a service to complete the request.Unauthenticated
- if the user can not be authenticated.Unauthorized
- if the user doesn't have the required privileges.Unsupported
- if the task is not cancelable.void cancel(java.lang.String task, InvocationConfig invocationConfig)
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
task
- Task identifier.
The parameter must be an identifier for the resource type: com.vmware.cis.task
.invocationConfig
- Configuration for the method invocation.Error
- if the system reports an error while responding to the request.NotAllowedInCurrentState
- if the task is already canceled or completed.NotFound
- if the task is not found.ResourceInaccessible
- if the task's state cannot be accessed.ServiceUnavailable
- if the system is unable to communicate with a service to complete the request.Unauthenticated
- if the user can not be authenticated.Unauthorized
- if the user doesn't have the required privileges.Unsupported
- if the task is not cancelable.void cancel(java.lang.String task, AsyncCallback<java.lang.Void> asyncCallback)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Operation Errors:
Error
- if the system reports an error while responding to the request.
NotAllowedInCurrentState
- if the task is already canceled or completed.
NotFound
- if the task is not found.
ResourceInaccessible
- if the task's state cannot be accessed.
ServiceUnavailable
- if the system is unable to communicate with a service to complete the request.
Unauthenticated
- if the user can not be authenticated.
Unauthorized
- if the user doesn't have the required privileges.
Unsupported
- if the task is not cancelable.
task
- Task identifier.
The parameter must be an identifier for the resource type: com.vmware.cis.task
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void cancel(java.lang.String task, AsyncCallback<java.lang.Void> asyncCallback, InvocationConfig invocationConfig)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Operation Errors:
Error
- if the system reports an error while responding to the request.
NotAllowedInCurrentState
- if the task is already canceled or completed.
NotFound
- if the task is not found.
ResourceInaccessible
- if the task's state cannot be accessed.
ServiceUnavailable
- if the system is unable to communicate with a service to complete the request.
Unauthenticated
- if the user can not be authenticated.
Unauthorized
- if the user doesn't have the required privileges.
Unsupported
- if the task is not cancelable.
task
- Task identifier.
The parameter must be an identifier for the resource type: com.vmware.cis.task
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.