libZSservicesZSamazonka-datapipelineZSamazonka-datapipeline
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.DataPipeline.PollForTask

Description

Task runners call PollForTask to receive a task to perform from AWS Data Pipeline. The task runner specifies which tasks it can perform by setting a value for the workerGroup parameter. The task returned can come from any of the pipelines that match the workerGroup value passed in by the task runner and that was launched using the IAM user credentials specified by the task runner.

If tasks are ready in the work queue, PollForTask returns a response immediately. If no tasks are available in the queue, PollForTask uses long-polling and holds on to a poll connection for up to a 90 seconds, during which time the first newly scheduled task is handed to the task runner. To accomodate this, set the socket timeout in your task runner to 90 seconds. The task runner should not call PollForTask again on the same workerGroup until it receives a response, and this can take up to 90 seconds.

Synopsis

Creating a Request

data PollForTask Source #

Contains the parameters for PollForTask.

See: newPollForTask smart constructor.

Constructors

PollForTask' 

Fields

  • hostname :: Maybe Text

    The public DNS name of the calling task runner.

  • instanceIdentity :: Maybe InstanceIdentity

    Identity information for the EC2 instance that is hosting the task runner. You can get this value from the instance using http://169.254.169.254/latest/meta-data/instance-id. For more information, see Instance Metadata in the Amazon Elastic Compute Cloud User Guide. Passing in this value proves that your task runner is running on an EC2 instance, and ensures the proper AWS Data Pipeline service charges are applied to your pipeline.

  • workerGroup :: Text

    The type of task the task runner is configured to accept and process. The worker group is set as a field on objects in the pipeline when they are created. You can only specify a single value for workerGroup in the call to PollForTask. There are no wildcard values permitted in workerGroup; the string must be an exact, case-sensitive, match.

Instances

Instances details
Eq PollForTask Source # 
Instance details

Defined in Amazonka.DataPipeline.PollForTask

Read PollForTask Source # 
Instance details

Defined in Amazonka.DataPipeline.PollForTask

Show PollForTask Source # 
Instance details

Defined in Amazonka.DataPipeline.PollForTask

Generic PollForTask Source # 
Instance details

Defined in Amazonka.DataPipeline.PollForTask

Associated Types

type Rep PollForTask :: Type -> Type #

NFData PollForTask Source # 
Instance details

Defined in Amazonka.DataPipeline.PollForTask

Methods

rnf :: PollForTask -> () #

Hashable PollForTask Source # 
Instance details

Defined in Amazonka.DataPipeline.PollForTask

ToJSON PollForTask Source # 
Instance details

Defined in Amazonka.DataPipeline.PollForTask

AWSRequest PollForTask Source # 
Instance details

Defined in Amazonka.DataPipeline.PollForTask

Associated Types

type AWSResponse PollForTask #

ToHeaders PollForTask Source # 
Instance details

Defined in Amazonka.DataPipeline.PollForTask

Methods

toHeaders :: PollForTask -> [Header] #

ToPath PollForTask Source # 
Instance details

Defined in Amazonka.DataPipeline.PollForTask

ToQuery PollForTask Source # 
Instance details

Defined in Amazonka.DataPipeline.PollForTask

type Rep PollForTask Source # 
Instance details

Defined in Amazonka.DataPipeline.PollForTask

type Rep PollForTask = D1 ('MetaData "PollForTask" "Amazonka.DataPipeline.PollForTask" "libZSservicesZSamazonka-datapipelineZSamazonka-datapipeline" 'False) (C1 ('MetaCons "PollForTask'" 'PrefixI 'True) (S1 ('MetaSel ('Just "hostname") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "instanceIdentity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe InstanceIdentity)) :*: S1 ('MetaSel ('Just "workerGroup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse PollForTask Source # 
Instance details

Defined in Amazonka.DataPipeline.PollForTask

newPollForTask Source #

Create a value of PollForTask 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:hostname:PollForTask', pollForTask_hostname - The public DNS name of the calling task runner.

$sel:instanceIdentity:PollForTask', pollForTask_instanceIdentity - Identity information for the EC2 instance that is hosting the task runner. You can get this value from the instance using http://169.254.169.254/latest/meta-data/instance-id. For more information, see Instance Metadata in the Amazon Elastic Compute Cloud User Guide. Passing in this value proves that your task runner is running on an EC2 instance, and ensures the proper AWS Data Pipeline service charges are applied to your pipeline.

$sel:workerGroup:PollForTask', pollForTask_workerGroup - The type of task the task runner is configured to accept and process. The worker group is set as a field on objects in the pipeline when they are created. You can only specify a single value for workerGroup in the call to PollForTask. There are no wildcard values permitted in workerGroup; the string must be an exact, case-sensitive, match.

Request Lenses

pollForTask_hostname :: Lens' PollForTask (Maybe Text) Source #

The public DNS name of the calling task runner.

pollForTask_instanceIdentity :: Lens' PollForTask (Maybe InstanceIdentity) Source #

Identity information for the EC2 instance that is hosting the task runner. You can get this value from the instance using http://169.254.169.254/latest/meta-data/instance-id. For more information, see Instance Metadata in the Amazon Elastic Compute Cloud User Guide. Passing in this value proves that your task runner is running on an EC2 instance, and ensures the proper AWS Data Pipeline service charges are applied to your pipeline.

pollForTask_workerGroup :: Lens' PollForTask Text Source #

The type of task the task runner is configured to accept and process. The worker group is set as a field on objects in the pipeline when they are created. You can only specify a single value for workerGroup in the call to PollForTask. There are no wildcard values permitted in workerGroup; the string must be an exact, case-sensitive, match.

Destructuring the Response

data PollForTaskResponse Source #

Contains the output of PollForTask.

See: newPollForTaskResponse smart constructor.

Constructors

PollForTaskResponse' 

Fields

  • taskObject :: Maybe TaskObject

    The information needed to complete the task that is being assigned to the task runner. One of the fields returned in this object is taskId, which contains an identifier for the task being assigned. The calling task runner uses taskId in subsequent calls to ReportTaskProgress and SetTaskStatus.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq PollForTaskResponse Source # 
Instance details

Defined in Amazonka.DataPipeline.PollForTask

Read PollForTaskResponse Source # 
Instance details

Defined in Amazonka.DataPipeline.PollForTask

Show PollForTaskResponse Source # 
Instance details

Defined in Amazonka.DataPipeline.PollForTask

Generic PollForTaskResponse Source # 
Instance details

Defined in Amazonka.DataPipeline.PollForTask

Associated Types

type Rep PollForTaskResponse :: Type -> Type #

NFData PollForTaskResponse Source # 
Instance details

Defined in Amazonka.DataPipeline.PollForTask

Methods

rnf :: PollForTaskResponse -> () #

type Rep PollForTaskResponse Source # 
Instance details

Defined in Amazonka.DataPipeline.PollForTask

type Rep PollForTaskResponse = D1 ('MetaData "PollForTaskResponse" "Amazonka.DataPipeline.PollForTask" "libZSservicesZSamazonka-datapipelineZSamazonka-datapipeline" 'False) (C1 ('MetaCons "PollForTaskResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "taskObject") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe TaskObject)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newPollForTaskResponse Source #

Create a value of PollForTaskResponse 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:taskObject:PollForTaskResponse', pollForTaskResponse_taskObject - The information needed to complete the task that is being assigned to the task runner. One of the fields returned in this object is taskId, which contains an identifier for the task being assigned. The calling task runner uses taskId in subsequent calls to ReportTaskProgress and SetTaskStatus.

$sel:httpStatus:PollForTaskResponse', pollForTaskResponse_httpStatus - The response's http status code.

Response Lenses

pollForTaskResponse_taskObject :: Lens' PollForTaskResponse (Maybe TaskObject) Source #

The information needed to complete the task that is being assigned to the task runner. One of the fields returned in this object is taskId, which contains an identifier for the task being assigned. The calling task runner uses taskId in subsequent calls to ReportTaskProgress and SetTaskStatus.