Notification - Amazon Mechanical Turk

Notification

Description

The Notification data structure describes a HIT event notification for a HIT type.

Elements

The Notification structure can contain the elements described in the following table. When the structure is used in a request, elements described as Required must be included for the request to succeed.

Name Description Required

Destination

The destination for notification messages.

Type: String

  • For Amazon Simple Queue Service (Amazon SQS) notifications (if Transport is SQS), this is the URL for your Amazon SQS queue. For more information, see Notification Handling Using Amazon SQS.

  • For Amazon Simple Notification Service (Amazon SNS) notifications (if Transport is SNS), this is the ARN for your Amazon SNS topic. For more information, see Notification Handling Using Amazon SNS.

Default: None

Yes

Transport

The method Amazon Mechanical Turk uses to send the notification.

Type: String

Valid Values: SQS | SNS

Default: None

Yes

Version

The version of the Notification data structure schema to use.

Type: String

Valid Values: 2014-08-15

Default: None

Yes

EventTypes

The array of one or more events that should cause notifications to be sent. The Ping event is only valid for the SendTestEventNotification operation.

Type: Array of Strings

Valid Values: AssignmentAccepted | AssignmentAbandoned | AssignmentReturned | AssignmentSubmitted | AssignmentRejected | AssignmentApproved | HITCreated | HITExtended | HITDisposed | HITReviewable | HITExpired | Ping

Default: None

Yes

Example

In the following example, the notification specification specifies that an event notification message will be published to an SNS topic when a Worker accepts a HIT.

{ Destination:"arn:aws:sns:us-east-1:7429088EXAMPLE:my_mturk_topic", Transport: "SNS", Version:"2014-08-15", EventTypes:["AssignmentAccepted"] }