libZSservicesZSamazonka-stepfunctionsZSamazonka-stepfunctions
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.StepFunctions.GetActivityTask

Description

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.

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).

Polling with GetActivityTask can cause latency in some implementations. See Avoid Latency When Polling for Activity Tasks in the Step Functions Developer Guide.

Synopsis

Creating a Request

data GetActivityTask Source #

See: newGetActivityTask smart constructor.

Constructors

GetActivityTask' 

Fields

  • workerName :: Maybe Text

    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.

  • activityArn :: Text

    The Amazon Resource Name (ARN) of the activity to retrieve tasks from (assigned when you create the task using CreateActivity.)

Instances

Instances details
Eq GetActivityTask Source # 
Instance details

Defined in Amazonka.StepFunctions.GetActivityTask

Read GetActivityTask Source # 
Instance details

Defined in Amazonka.StepFunctions.GetActivityTask

Show GetActivityTask Source # 
Instance details

Defined in Amazonka.StepFunctions.GetActivityTask

Generic GetActivityTask Source # 
Instance details

Defined in Amazonka.StepFunctions.GetActivityTask

Associated Types

type Rep GetActivityTask :: Type -> Type #

NFData GetActivityTask Source # 
Instance details

Defined in Amazonka.StepFunctions.GetActivityTask

Methods

rnf :: GetActivityTask -> () #

Hashable GetActivityTask Source # 
Instance details

Defined in Amazonka.StepFunctions.GetActivityTask

ToJSON GetActivityTask Source # 
Instance details

Defined in Amazonka.StepFunctions.GetActivityTask

AWSRequest GetActivityTask Source # 
Instance details

Defined in Amazonka.StepFunctions.GetActivityTask

Associated Types

type AWSResponse GetActivityTask #

ToHeaders GetActivityTask Source # 
Instance details

Defined in Amazonka.StepFunctions.GetActivityTask

ToPath GetActivityTask Source # 
Instance details

Defined in Amazonka.StepFunctions.GetActivityTask

ToQuery GetActivityTask Source # 
Instance details

Defined in Amazonka.StepFunctions.GetActivityTask

type Rep GetActivityTask Source # 
Instance details

Defined in Amazonka.StepFunctions.GetActivityTask

type Rep GetActivityTask = D1 ('MetaData "GetActivityTask" "Amazonka.StepFunctions.GetActivityTask" "libZSservicesZSamazonka-stepfunctionsZSamazonka-stepfunctions" 'False) (C1 ('MetaCons "GetActivityTask'" 'PrefixI 'True) (S1 ('MetaSel ('Just "workerName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "activityArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))
type AWSResponse GetActivityTask Source # 
Instance details

Defined in Amazonka.StepFunctions.GetActivityTask

newGetActivityTask Source #

Create a value of GetActivityTask with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:workerName:GetActivityTask', getActivityTask_workerName - 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.

$sel:activityArn:GetActivityTask', getActivityTask_activityArn - The Amazon Resource Name (ARN) of the activity to retrieve tasks from (assigned when you create the task using CreateActivity.)

Request Lenses

getActivityTask_workerName :: 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.

getActivityTask_activityArn :: 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

data GetActivityTaskResponse Source #

See: newGetActivityTaskResponse smart constructor.

Constructors

GetActivityTaskResponse' 

Fields

  • input :: Maybe (Sensitive Text)

    The string that contains the JSON input data for the task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

  • taskToken :: Maybe Text

    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.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq GetActivityTaskResponse Source # 
Instance details

Defined in Amazonka.StepFunctions.GetActivityTask

Show GetActivityTaskResponse Source # 
Instance details

Defined in Amazonka.StepFunctions.GetActivityTask

Generic GetActivityTaskResponse Source # 
Instance details

Defined in Amazonka.StepFunctions.GetActivityTask

Associated Types

type Rep GetActivityTaskResponse :: Type -> Type #

NFData GetActivityTaskResponse Source # 
Instance details

Defined in Amazonka.StepFunctions.GetActivityTask

Methods

rnf :: GetActivityTaskResponse -> () #

type Rep GetActivityTaskResponse Source # 
Instance details

Defined in Amazonka.StepFunctions.GetActivityTask

type Rep GetActivityTaskResponse = D1 ('MetaData "GetActivityTaskResponse" "Amazonka.StepFunctions.GetActivityTask" "libZSservicesZSamazonka-stepfunctionsZSamazonka-stepfunctions" 'False) (C1 ('MetaCons "GetActivityTaskResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "input") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Sensitive Text))) :*: (S1 ('MetaSel ('Just "taskToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newGetActivityTaskResponse Source #

Create a value of GetActivityTaskResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:input:GetActivityTaskResponse', getActivityTaskResponse_input - The string that contains the JSON input data for the task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

$sel:taskToken:GetActivityTaskResponse', getActivityTaskResponse_taskToken - 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.

$sel:httpStatus:GetActivityTaskResponse', getActivityTaskResponse_httpStatus - The response's http status code.

Response Lenses

getActivityTaskResponse_input :: Lens' GetActivityTaskResponse (Maybe Text) Source #

The string that contains the JSON input data for the task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

getActivityTaskResponse_taskToken :: 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.