libZSservicesZSamazonka-mechanicalturkZSamazonka-mechanicalturk
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.MechanicalTurk.CreateHITWithHITType

Description

The CreateHITWithHITType operation creates a new Human Intelligence Task (HIT) using an existing HITTypeID generated by the CreateHITType operation.

This is an alternative way to create HITs from the CreateHIT operation. This is the recommended best practice for Requesters who are creating large numbers of HITs.

CreateHITWithHITType also supports several ways to provide question data: by providing a value for the Question parameter that fully specifies the contents of the HIT, or by providing a HitLayoutId and associated HitLayoutParameters.

If a HIT is created with 10 or more maximum assignments, there is an additional fee. For more information, see Amazon Mechanical Turk Pricing.

Synopsis

Creating a Request

data CreateHITWithHITType Source #

See: newCreateHITWithHITType smart constructor.

Constructors

CreateHITWithHITType' 

Fields

  • hITReviewPolicy :: Maybe ReviewPolicy

    The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based on the policy.

  • uniqueRequestToken :: Maybe Text

    A unique identifier for this request which allows you to retry the call on error without creating duplicate HITs. This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the server. If the HIT already exists in the system from a previous call using the same UniqueRequestToken, subsequent calls will return a AWS.MechanicalTurk.HitAlreadyExists error with a message containing the HITId.

    Note: It is your responsibility to ensure uniqueness of the token. The unique token expires after 24 hours. Subsequent calls using the same UniqueRequestToken made after the 24 hour limit could create duplicate HITs.

  • requesterAnnotation :: Maybe Text

    An arbitrary data field. The RequesterAnnotation parameter lets your application attach arbitrary data to the HIT for tracking purposes. For example, this parameter could be an identifier internal to the Requester's application that corresponds with the HIT.

    The RequesterAnnotation parameter for a HIT is only visible to the Requester who created the HIT. It is not shown to the Worker, or any other Requester.

    The RequesterAnnotation parameter may be different for each HIT you submit. It does not affect how your HITs are grouped.

  • maxAssignments :: Maybe Int

    The number of times the HIT can be accepted and completed before the HIT becomes unavailable.

  • hITLayoutId :: Maybe Text

    The HITLayoutId allows you to use a pre-existing HIT design with placeholder values and create an additional HIT by providing those values as HITLayoutParameters.

    Constraints: Either a Question parameter or a HITLayoutId parameter must be provided.

  • hITLayoutParameters :: Maybe [HITLayoutParameter]

    If the HITLayoutId is provided, any placeholder values must be filled in with values using the HITLayoutParameter structure. For more information, see HITLayout.

  • question :: Maybe Text

    The data the person completing the HIT uses to produce the results.

    Constraints: Must be a QuestionForm data structure, an ExternalQuestion data structure, or an HTMLQuestion data structure. The XML question data must not be larger than 64 kilobytes (65,535 bytes) in size, including whitespace.

    Either a Question parameter or a HITLayoutId parameter must be provided.

  • assignmentReviewPolicy :: Maybe ReviewPolicy

    The Assignment-level Review Policy applies to the assignments under the HIT. You can specify for Mechanical Turk to take various actions based on the policy.

  • hITTypeId :: Text

    The HIT type ID you want to create this HIT with.

  • lifetimeInSeconds :: Integer

    An amount of time, in seconds, after which the HIT is no longer available for users to accept. After the lifetime of the HIT elapses, the HIT no longer appears in HIT searches, even if not all of the assignments for the HIT have been accepted.

Instances

Instances details
Eq CreateHITWithHITType Source # 
Instance details

Defined in Amazonka.MechanicalTurk.CreateHITWithHITType

Read CreateHITWithHITType Source # 
Instance details

Defined in Amazonka.MechanicalTurk.CreateHITWithHITType

Show CreateHITWithHITType Source # 
Instance details

Defined in Amazonka.MechanicalTurk.CreateHITWithHITType

Generic CreateHITWithHITType Source # 
Instance details

Defined in Amazonka.MechanicalTurk.CreateHITWithHITType

Associated Types

type Rep CreateHITWithHITType :: Type -> Type #

NFData CreateHITWithHITType Source # 
Instance details

Defined in Amazonka.MechanicalTurk.CreateHITWithHITType

Methods

rnf :: CreateHITWithHITType -> () #

Hashable CreateHITWithHITType Source # 
Instance details

Defined in Amazonka.MechanicalTurk.CreateHITWithHITType

ToJSON CreateHITWithHITType Source # 
Instance details

Defined in Amazonka.MechanicalTurk.CreateHITWithHITType

AWSRequest CreateHITWithHITType Source # 
Instance details

Defined in Amazonka.MechanicalTurk.CreateHITWithHITType

Associated Types

type AWSResponse CreateHITWithHITType #

ToHeaders CreateHITWithHITType Source # 
Instance details

Defined in Amazonka.MechanicalTurk.CreateHITWithHITType

ToPath CreateHITWithHITType Source # 
Instance details

Defined in Amazonka.MechanicalTurk.CreateHITWithHITType

ToQuery CreateHITWithHITType Source # 
Instance details

Defined in Amazonka.MechanicalTurk.CreateHITWithHITType

type Rep CreateHITWithHITType Source # 
Instance details

Defined in Amazonka.MechanicalTurk.CreateHITWithHITType

type Rep CreateHITWithHITType = D1 ('MetaData "CreateHITWithHITType" "Amazonka.MechanicalTurk.CreateHITWithHITType" "libZSservicesZSamazonka-mechanicalturkZSamazonka-mechanicalturk" 'False) (C1 ('MetaCons "CreateHITWithHITType'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "hITReviewPolicy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ReviewPolicy)) :*: S1 ('MetaSel ('Just "uniqueRequestToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "requesterAnnotation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "maxAssignments") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "hITLayoutId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))) :*: ((S1 ('MetaSel ('Just "hITLayoutParameters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [HITLayoutParameter])) :*: S1 ('MetaSel ('Just "question") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "assignmentReviewPolicy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ReviewPolicy)) :*: (S1 ('MetaSel ('Just "hITTypeId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "lifetimeInSeconds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Integer))))))
type AWSResponse CreateHITWithHITType Source # 
Instance details

Defined in Amazonka.MechanicalTurk.CreateHITWithHITType

newCreateHITWithHITType Source #

Create a value of CreateHITWithHITType 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:hITReviewPolicy:CreateHITWithHITType', createHITWithHITType_hITReviewPolicy - The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based on the policy.

$sel:uniqueRequestToken:CreateHITWithHITType', createHITWithHITType_uniqueRequestToken - A unique identifier for this request which allows you to retry the call on error without creating duplicate HITs. This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the server. If the HIT already exists in the system from a previous call using the same UniqueRequestToken, subsequent calls will return a AWS.MechanicalTurk.HitAlreadyExists error with a message containing the HITId.

Note: It is your responsibility to ensure uniqueness of the token. The unique token expires after 24 hours. Subsequent calls using the same UniqueRequestToken made after the 24 hour limit could create duplicate HITs.

$sel:requesterAnnotation:CreateHITWithHITType', createHITWithHITType_requesterAnnotation - An arbitrary data field. The RequesterAnnotation parameter lets your application attach arbitrary data to the HIT for tracking purposes. For example, this parameter could be an identifier internal to the Requester's application that corresponds with the HIT.

The RequesterAnnotation parameter for a HIT is only visible to the Requester who created the HIT. It is not shown to the Worker, or any other Requester.

The RequesterAnnotation parameter may be different for each HIT you submit. It does not affect how your HITs are grouped.

$sel:maxAssignments:CreateHITWithHITType', createHITWithHITType_maxAssignments - The number of times the HIT can be accepted and completed before the HIT becomes unavailable.

$sel:hITLayoutId:CreateHITWithHITType', createHITWithHITType_hITLayoutId - The HITLayoutId allows you to use a pre-existing HIT design with placeholder values and create an additional HIT by providing those values as HITLayoutParameters.

Constraints: Either a Question parameter or a HITLayoutId parameter must be provided.

$sel:hITLayoutParameters:CreateHITWithHITType', createHITWithHITType_hITLayoutParameters - If the HITLayoutId is provided, any placeholder values must be filled in with values using the HITLayoutParameter structure. For more information, see HITLayout.

$sel:question:CreateHITWithHITType', createHITWithHITType_question - The data the person completing the HIT uses to produce the results.

Constraints: Must be a QuestionForm data structure, an ExternalQuestion data structure, or an HTMLQuestion data structure. The XML question data must not be larger than 64 kilobytes (65,535 bytes) in size, including whitespace.

Either a Question parameter or a HITLayoutId parameter must be provided.

$sel:assignmentReviewPolicy:CreateHITWithHITType', createHITWithHITType_assignmentReviewPolicy - The Assignment-level Review Policy applies to the assignments under the HIT. You can specify for Mechanical Turk to take various actions based on the policy.

$sel:hITTypeId:CreateHITWithHITType', createHITWithHITType_hITTypeId - The HIT type ID you want to create this HIT with.

$sel:lifetimeInSeconds:CreateHITWithHITType', createHITWithHITType_lifetimeInSeconds - An amount of time, in seconds, after which the HIT is no longer available for users to accept. After the lifetime of the HIT elapses, the HIT no longer appears in HIT searches, even if not all of the assignments for the HIT have been accepted.

Request Lenses

createHITWithHITType_hITReviewPolicy :: Lens' CreateHITWithHITType (Maybe ReviewPolicy) Source #

The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based on the policy.

createHITWithHITType_uniqueRequestToken :: Lens' CreateHITWithHITType (Maybe Text) Source #

A unique identifier for this request which allows you to retry the call on error without creating duplicate HITs. This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the server. If the HIT already exists in the system from a previous call using the same UniqueRequestToken, subsequent calls will return a AWS.MechanicalTurk.HitAlreadyExists error with a message containing the HITId.

Note: It is your responsibility to ensure uniqueness of the token. The unique token expires after 24 hours. Subsequent calls using the same UniqueRequestToken made after the 24 hour limit could create duplicate HITs.

createHITWithHITType_requesterAnnotation :: Lens' CreateHITWithHITType (Maybe Text) Source #

An arbitrary data field. The RequesterAnnotation parameter lets your application attach arbitrary data to the HIT for tracking purposes. For example, this parameter could be an identifier internal to the Requester's application that corresponds with the HIT.

The RequesterAnnotation parameter for a HIT is only visible to the Requester who created the HIT. It is not shown to the Worker, or any other Requester.

The RequesterAnnotation parameter may be different for each HIT you submit. It does not affect how your HITs are grouped.

createHITWithHITType_maxAssignments :: Lens' CreateHITWithHITType (Maybe Int) Source #

The number of times the HIT can be accepted and completed before the HIT becomes unavailable.

createHITWithHITType_hITLayoutId :: Lens' CreateHITWithHITType (Maybe Text) Source #

The HITLayoutId allows you to use a pre-existing HIT design with placeholder values and create an additional HIT by providing those values as HITLayoutParameters.

Constraints: Either a Question parameter or a HITLayoutId parameter must be provided.

createHITWithHITType_hITLayoutParameters :: Lens' CreateHITWithHITType (Maybe [HITLayoutParameter]) Source #

If the HITLayoutId is provided, any placeholder values must be filled in with values using the HITLayoutParameter structure. For more information, see HITLayout.

createHITWithHITType_question :: Lens' CreateHITWithHITType (Maybe Text) Source #

The data the person completing the HIT uses to produce the results.

Constraints: Must be a QuestionForm data structure, an ExternalQuestion data structure, or an HTMLQuestion data structure. The XML question data must not be larger than 64 kilobytes (65,535 bytes) in size, including whitespace.

Either a Question parameter or a HITLayoutId parameter must be provided.

createHITWithHITType_assignmentReviewPolicy :: Lens' CreateHITWithHITType (Maybe ReviewPolicy) Source #

The Assignment-level Review Policy applies to the assignments under the HIT. You can specify for Mechanical Turk to take various actions based on the policy.

createHITWithHITType_hITTypeId :: Lens' CreateHITWithHITType Text Source #

The HIT type ID you want to create this HIT with.

createHITWithHITType_lifetimeInSeconds :: Lens' CreateHITWithHITType Integer Source #

An amount of time, in seconds, after which the HIT is no longer available for users to accept. After the lifetime of the HIT elapses, the HIT no longer appears in HIT searches, even if not all of the assignments for the HIT have been accepted.

Destructuring the Response

data CreateHITWithHITTypeResponse Source #

See: newCreateHITWithHITTypeResponse smart constructor.

Constructors

CreateHITWithHITTypeResponse' 

Fields

  • hit :: Maybe HIT

    Contains the newly created HIT data. For a description of the HIT data structure as it appears in responses, see the HIT Data Structure documentation.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq CreateHITWithHITTypeResponse Source # 
Instance details

Defined in Amazonka.MechanicalTurk.CreateHITWithHITType

Read CreateHITWithHITTypeResponse Source # 
Instance details

Defined in Amazonka.MechanicalTurk.CreateHITWithHITType

Show CreateHITWithHITTypeResponse Source # 
Instance details

Defined in Amazonka.MechanicalTurk.CreateHITWithHITType

Generic CreateHITWithHITTypeResponse Source # 
Instance details

Defined in Amazonka.MechanicalTurk.CreateHITWithHITType

Associated Types

type Rep CreateHITWithHITTypeResponse :: Type -> Type #

NFData CreateHITWithHITTypeResponse Source # 
Instance details

Defined in Amazonka.MechanicalTurk.CreateHITWithHITType

type Rep CreateHITWithHITTypeResponse Source # 
Instance details

Defined in Amazonka.MechanicalTurk.CreateHITWithHITType

type Rep CreateHITWithHITTypeResponse = D1 ('MetaData "CreateHITWithHITTypeResponse" "Amazonka.MechanicalTurk.CreateHITWithHITType" "libZSservicesZSamazonka-mechanicalturkZSamazonka-mechanicalturk" 'False) (C1 ('MetaCons "CreateHITWithHITTypeResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "hit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe HIT)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCreateHITWithHITTypeResponse Source #

Create a value of CreateHITWithHITTypeResponse 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:hit:CreateHITWithHITTypeResponse', createHITWithHITTypeResponse_hit - Contains the newly created HIT data. For a description of the HIT data structure as it appears in responses, see the HIT Data Structure documentation.

$sel:httpStatus:CreateHITWithHITTypeResponse', createHITWithHITTypeResponse_httpStatus - The response's http status code.

Response Lenses

createHITWithHITTypeResponse_hit :: Lens' CreateHITWithHITTypeResponse (Maybe HIT) Source #

Contains the newly created HIT data. For a description of the HIT data structure as it appears in responses, see the HIT Data Structure documentation.