Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Used by workers to retrieve a task (with the specified activity ARN) which has been scheduled for execution by a running state machine. This initiates a long poll, where the service holds the HTTP connection open and responds as soon as a task becomes available (i.e. an execution of a task of this type is needed.) The maximum time the service holds on to the request before responding is 60 seconds. If no task is available within 60 seconds, the poll returns a taskToken
with a null string.
Important: Workers should set their client side socket timeout to at least 65 seconds (5 seconds higher than the maximum time the service may hold the poll request).
- getActivityTask :: Text -> GetActivityTask
- data GetActivityTask
- gatWorkerName :: Lens' GetActivityTask (Maybe Text)
- gatActivityARN :: Lens' GetActivityTask Text
- getActivityTaskResponse :: Int -> GetActivityTaskResponse
- data GetActivityTaskResponse
- gatrsInput :: Lens' GetActivityTaskResponse (Maybe Text)
- gatrsTaskToken :: Lens' GetActivityTaskResponse (Maybe Text)
- gatrsResponseStatus :: Lens' GetActivityTaskResponse Int
Creating a Request
Creates a value of GetActivityTask
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
gatWorkerName
- You can provide an arbitrary name in order to identify the worker that the task is assigned to. This name is used when it is logged in the execution history.gatActivityARN
- The Amazon Resource Name (ARN) of the activity to retrieve tasks from (assigned when you create the task usingCreateActivity
.)
data GetActivityTask Source #
See: getActivityTask
smart constructor.
Request Lenses
gatWorkerName :: Lens' GetActivityTask (Maybe Text) Source #
You can provide an arbitrary name in order to identify the worker that the task is assigned to. This name is used when it is logged in the execution history.
gatActivityARN :: Lens' GetActivityTask Text Source #
The Amazon Resource Name (ARN) of the activity to retrieve tasks from (assigned when you create the task using CreateActivity
.)
Destructuring the Response
getActivityTaskResponse Source #
Creates a value of GetActivityTaskResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
gatrsInput
- The string that contains the JSON input data for the task.gatrsTaskToken
- A token that identifies the scheduled task. This token must be copied and included in subsequent calls toSendTaskHeartbeat
,SendTaskSuccess
orSendTaskFailure
in order to report the progress or completion of the task.gatrsResponseStatus
- -- | The response status code.
data GetActivityTaskResponse Source #
See: getActivityTaskResponse
smart constructor.
Response Lenses
gatrsInput :: Lens' GetActivityTaskResponse (Maybe Text) Source #
The string that contains the JSON input data for the task.
gatrsTaskToken :: Lens' GetActivityTaskResponse (Maybe Text) Source #
A token that identifies the scheduled task. This token must be copied and included in subsequent calls to SendTaskHeartbeat
, SendTaskSuccess
or SendTaskFailure
in order to report the progress or completion of the task.
gatrsResponseStatus :: Lens' GetActivityTaskResponse Int Source #
- - | The response status code.