Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface ITaskRegistration

interface ITaskRegistration
Extends com.amazon.apmf.IStandard The ITaskRegistration represents a submitted task and offers operations to update, query information, and attach observers to the submitted task.

Methods

update()

void update(ITaskRequest* taskRequest)
Update a previously submitted Task with new parameters. Use ITaskRequestBuilder to build a valid ITaskRequest. Note that update will apply to subsequent iterations of a repeating task (retry upon failure or repetition) if the task is already executing. Update will fail if a non repeating task is already executing. Note that calling update will cancel in-progress retries and reset the retry count. Note that update() keeps the same Uuid. This also means all existing observers are not invalidated.

Parameters

taskRequest
ITaskRequest* — Required The new Task parameters.

Throws


remove()

void remove()
Remove this Task. Note that remove will apply to subsequent iterations of a repeating task (retry upon failure or repetition) if the task is already executing. Remove will fail if a non repeating task is already executing. Note that remove() will fail if Task is already running and only prevent future iterations (retry upon failure or repetition).

Throws


getTaskStatus()

ITaskStatus* getTaskStatus()
Get the status of this Task.

Returns

ITaskStatus* On success, returns an ITaskStatus containing the status of Task.

Throws


registerTaskObserver()

com.amazon.apmf.ISubscription* registerTaskObserver(ITaskObserver* observer)
Register an observer for a Task. This method will instruct Task Manager to notify the observer on updates to the Task status. See ITaskObserver for additional observer information.

Parameters

observer
ITaskObserver* — Required An ITaskObserver instance to be notified on updates from Task.

Returns

com.amazon.apmf.ISubscription* A Subscription object that uniquely identifying this observer.

getUuid()

com.amazon.apmf.Uuid getUuid()
Get the Uuid of this task. The Uuid is assigned by the system and can be used to uniquely identify and query the task.

Returns

com.amazon.apmf.Uuid The uuid of the task

getName()

string getName()
Get the unique name of this task. If the name is not set by the user, the task name is the system generated Uuid.

Returns

string The unique task name.
Last modified on October 29, 2026