Copyright | (c) 2013-2021 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 |
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
- data CreateHITWithHITType = CreateHITWithHITType' {
- hITReviewPolicy :: Maybe ReviewPolicy
- uniqueRequestToken :: Maybe Text
- requesterAnnotation :: Maybe Text
- maxAssignments :: Maybe Int
- hITLayoutId :: Maybe Text
- hITLayoutParameters :: Maybe [HITLayoutParameter]
- question :: Maybe Text
- assignmentReviewPolicy :: Maybe ReviewPolicy
- hITTypeId :: Text
- lifetimeInSeconds :: Integer
- newCreateHITWithHITType :: Text -> Integer -> CreateHITWithHITType
- createHITWithHITType_hITReviewPolicy :: Lens' CreateHITWithHITType (Maybe ReviewPolicy)
- createHITWithHITType_uniqueRequestToken :: Lens' CreateHITWithHITType (Maybe Text)
- createHITWithHITType_requesterAnnotation :: Lens' CreateHITWithHITType (Maybe Text)
- createHITWithHITType_maxAssignments :: Lens' CreateHITWithHITType (Maybe Int)
- createHITWithHITType_hITLayoutId :: Lens' CreateHITWithHITType (Maybe Text)
- createHITWithHITType_hITLayoutParameters :: Lens' CreateHITWithHITType (Maybe [HITLayoutParameter])
- createHITWithHITType_question :: Lens' CreateHITWithHITType (Maybe Text)
- createHITWithHITType_assignmentReviewPolicy :: Lens' CreateHITWithHITType (Maybe ReviewPolicy)
- createHITWithHITType_hITTypeId :: Lens' CreateHITWithHITType Text
- createHITWithHITType_lifetimeInSeconds :: Lens' CreateHITWithHITType Integer
- data CreateHITWithHITTypeResponse = CreateHITWithHITTypeResponse' {
- hit :: Maybe HIT
- httpStatus :: Int
- newCreateHITWithHITTypeResponse :: Int -> CreateHITWithHITTypeResponse
- createHITWithHITTypeResponse_hit :: Lens' CreateHITWithHITTypeResponse (Maybe HIT)
- createHITWithHITTypeResponse_httpStatus :: Lens' CreateHITWithHITTypeResponse Int
Creating a Request
data CreateHITWithHITType Source #
See: newCreateHITWithHITType
smart constructor.
CreateHITWithHITType' | |
|
Instances
newCreateHITWithHITType Source #
:: Text | |
-> Integer | |
-> CreateHITWithHITType |
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.
CreateHITWithHITTypeResponse' | |
|
Instances
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.
createHITWithHITTypeResponse_httpStatus :: Lens' CreateHITWithHITTypeResponse Int Source #
The response's http status code.