import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { CreateHITRequest, CreateHITResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link CreateHITCommand}. */ export interface CreateHITCommandInput extends CreateHITRequest { } /** * @public * * The output of {@link CreateHITCommand}. */ export interface CreateHITCommandOutput extends CreateHITResponse, __MetadataBearer { } declare const CreateHITCommand_base: { new (input: CreateHITCommandInput): import("@smithy/core/client").CommandImpl; new (input: CreateHITCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

The CreateHIT operation creates a new Human Intelligence Task (HIT). * The new HIT is made available for Workers to find and accept on the Amazon Mechanical * Turk website.

*

* This operation allows you to specify a new HIT by passing in values for the properties of the HIT, such as its title, reward amount and number of assignments. When you pass these values to CreateHIT, a new HIT is created for you, with a new HITTypeID. The HITTypeID can be used to create additional HITs in the future without needing to specify common parameters such as the title, description and reward amount each time.

*

An alternative way to create HITs is to first generate a HITTypeID using the CreateHITType operation and then call the CreateHITWithHITType operation. This is the recommended best practice for Requesters who are creating large numbers of HITs. *

* *

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

*
* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { MTurkClient, CreateHITCommand } from "@aws-sdk/client-mturk"; // ES Modules import * // const { MTurkClient, CreateHITCommand } = require("@aws-sdk/client-mturk"); // CommonJS import * // import type { MTurkClientConfig } from "@aws-sdk/client-mturk"; * const config = {}; // type is MTurkClientConfig * const client = new MTurkClient(config); * const input = { // CreateHITRequest * MaxAssignments: Number("int"), * AutoApprovalDelayInSeconds: Number("long"), * LifetimeInSeconds: Number("long"), // required * AssignmentDurationInSeconds: Number("long"), // required * Reward: "STRING_VALUE", // required * Title: "STRING_VALUE", // required * Keywords: "STRING_VALUE", * Description: "STRING_VALUE", // required * Question: "STRING_VALUE", * RequesterAnnotation: "STRING_VALUE", * QualificationRequirements: [ // QualificationRequirementList * { // QualificationRequirement * QualificationTypeId: "STRING_VALUE", // required * Comparator: "LessThan" || "LessThanOrEqualTo" || "GreaterThan" || "GreaterThanOrEqualTo" || "EqualTo" || "NotEqualTo" || "Exists" || "DoesNotExist" || "In" || "NotIn", // required * IntegerValues: [ // IntegerList * Number("int"), * ], * LocaleValues: [ // LocaleList * { // Locale * Country: "STRING_VALUE", // required * Subdivision: "STRING_VALUE", * }, * ], * RequiredToPreview: true || false, * ActionsGuarded: "Accept" || "PreviewAndAccept" || "DiscoverPreviewAndAccept", * }, * ], * UniqueRequestToken: "STRING_VALUE", * AssignmentReviewPolicy: { // ReviewPolicy * PolicyName: "STRING_VALUE", // required * Parameters: [ // PolicyParameterList * { // PolicyParameter * Key: "STRING_VALUE", * Values: [ // StringList * "STRING_VALUE", * ], * MapEntries: [ // ParameterMapEntryList * { // ParameterMapEntry * Key: "STRING_VALUE", * Values: [ * "STRING_VALUE", * ], * }, * ], * }, * ], * }, * HITReviewPolicy: { * PolicyName: "STRING_VALUE", // required * Parameters: [ * { * Key: "STRING_VALUE", * Values: [ * "STRING_VALUE", * ], * MapEntries: [ * { * Key: "STRING_VALUE", * Values: [ * "STRING_VALUE", * ], * }, * ], * }, * ], * }, * HITLayoutId: "STRING_VALUE", * HITLayoutParameters: [ // HITLayoutParameterList * { // HITLayoutParameter * Name: "STRING_VALUE", // required * Value: "STRING_VALUE", // required * }, * ], * }; * const command = new CreateHITCommand(input); * const response = await client.send(command); * // { // CreateHITResponse * // HIT: { // HIT * // HITId: "STRING_VALUE", * // HITTypeId: "STRING_VALUE", * // HITGroupId: "STRING_VALUE", * // HITLayoutId: "STRING_VALUE", * // CreationTime: new Date("TIMESTAMP"), * // Title: "STRING_VALUE", * // Description: "STRING_VALUE", * // Question: "STRING_VALUE", * // Keywords: "STRING_VALUE", * // HITStatus: "Assignable" || "Unassignable" || "Reviewable" || "Reviewing" || "Disposed", * // MaxAssignments: Number("int"), * // Reward: "STRING_VALUE", * // AutoApprovalDelayInSeconds: Number("long"), * // Expiration: new Date("TIMESTAMP"), * // AssignmentDurationInSeconds: Number("long"), * // RequesterAnnotation: "STRING_VALUE", * // QualificationRequirements: [ // QualificationRequirementList * // { // QualificationRequirement * // QualificationTypeId: "STRING_VALUE", // required * // Comparator: "LessThan" || "LessThanOrEqualTo" || "GreaterThan" || "GreaterThanOrEqualTo" || "EqualTo" || "NotEqualTo" || "Exists" || "DoesNotExist" || "In" || "NotIn", // required * // IntegerValues: [ // IntegerList * // Number("int"), * // ], * // LocaleValues: [ // LocaleList * // { // Locale * // Country: "STRING_VALUE", // required * // Subdivision: "STRING_VALUE", * // }, * // ], * // RequiredToPreview: true || false, * // ActionsGuarded: "Accept" || "PreviewAndAccept" || "DiscoverPreviewAndAccept", * // }, * // ], * // HITReviewStatus: "NotReviewed" || "MarkedForReview" || "ReviewedAppropriate" || "ReviewedInappropriate", * // NumberOfAssignmentsPending: Number("int"), * // NumberOfAssignmentsAvailable: Number("int"), * // NumberOfAssignmentsCompleted: Number("int"), * // }, * // }; * * ``` * * @param CreateHITCommandInput - {@link CreateHITCommandInput} * @returns {@link CreateHITCommandOutput} * @see {@link CreateHITCommandInput} for command's `input` shape. * @see {@link CreateHITCommandOutput} for command's `response` shape. * @see {@link MTurkClientResolvedConfig | config} for MTurkClient's `config` shape. * * @throws {@link RequestError} (client fault) *

Your request is invalid.

* * @throws {@link ServiceFault} (server fault) *

Amazon Mechanical Turk is temporarily unable to process your request. Try your call again.

* * @throws {@link MTurkServiceException} *

Base exception class for all service exceptions from MTurk service.

* * * @public */ export declare class CreateHITCommand extends CreateHITCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CreateHITRequest; output: CreateHITResponse; }; sdk: { input: CreateHITCommandInput; output: CreateHITCommandOutput; }; }; }