Interface ITaskManager
interface ITaskManager
Extends com.amazon.apmf.IStandard
The ITaskManager offers operations for submitting and cancelling of Tasks as well as querying
status.
Methods
submit()
Submit (enqueue) a new Task for execution. This will return aITaskRegistration*submit(ITaskRequest*taskRequest)
ITaskRegistration identifier that can be used for subsequent API calls.
Parameters
taskRequest
ITaskRequest* — Required
The Task parameters, including name, constraints etc.
Returns
ITaskRegistration*
On success, return the ITaskRegistration identifying the Task.
Throws
com.amazon.apmf.InvalidArgumentError— If the taskRequest is is invalidcom.amazon.apmf.SecurityError— If the client is not allowed to schedule the submitted taskcom.amazon.apmf.BaseError— For all other errors
tryGetTaskRegistrationByUuid()
Get the Task registration of a previously submitted Task.ITaskRegistration?tryGetTaskRegistrationByUuid(com.amazon.apmf.Uuiduuid)
Parameters
uuid
com.amazon.apmf.Uuid — Required
The Uuid of the Task to be retrieved.
Returns
ITaskRegistration?
The return value is optional and might be absent.
On success, returns an ITaskRegistration, null otherwise.
Throws
com.amazon.apmf.InvalidArgumentError— If the uuid is invalid.com.amazon.apmf.SecurityError— If the client is not allowed to query the task.com.amazon.apmf.BaseError— For all other errors.
tryGetTaskRegistrationByName()
Get the Task registration of a previously submitted Task.ITaskRegistration?tryGetTaskRegistrationByName(stringname)
Parameters
name
string — Required
The unique task name to be retrieved.
Returns
ITaskRegistration?
The return value is optional and might be absent.
On success, returns an ITaskRegistration, null otherwise.
Throws
com.amazon.apmf.InvalidArgumentError— If the task name is invalid.com.amazon.apmf.SecurityError— If the client is not allowed to query the task.com.amazon.apmf.BaseError— For all other errors.
getAllTaskRegistrationsForPackage()
Get the Task Registration of all previously submitted Tasks for the current package.ITaskRegistration*[]getAllTaskRegistrationsForPackage()
Returns
ITaskRegistration*[]
On success, returns an array of ITaskRegistration containing the status of Tasks.
Otherwise returns empty array.
Throws
com.amazon.apmf.BaseError— For any error.

