MTurkClient#
Auto-generated documentation for MTurk type annotations stubs module mypy-boto3-mturk.
MTurkClient#
Type annotations and code completion for boto3.client("mturk")
.
boto3 documentation
# MTurkClient usage example
from boto3.session import Session
from mypy_boto3_mturk.client import MTurkClient
def get_mturk_client() -> MTurkClient:
return Session().client("mturk")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("mturk").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("mturk")
try:
do_something(client)
except (
client.exceptions.ClientError,
client.exceptions.RequestError,
client.exceptions.ServiceFault,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_mturk.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods#
accept_qualification_request#
The AcceptQualificationRequest
operation approves a Worker's request for a
Qualification.
Type annotations and code completion for boto3.client("mturk").accept_qualification_request
method.
boto3 documentation
# accept_qualification_request method definition
def accept_qualification_request(
self,
*,
QualificationRequestId: str,
IntegerValue: int = ...,
) -> Dict[str, Any]:
...
# accept_qualification_request method usage example with argument unpacking
kwargs: AcceptQualificationRequestRequestRequestTypeDef = { # (1)
"QualificationRequestId": ...,
}
parent.accept_qualification_request(**kwargs)
approve_assignment#
The ApproveAssignment
operation approves the results of a completed
assignment.
Type annotations and code completion for boto3.client("mturk").approve_assignment
method.
boto3 documentation
# approve_assignment method definition
def approve_assignment(
self,
*,
AssignmentId: str,
RequesterFeedback: str = ...,
OverrideRejection: bool = ...,
) -> Dict[str, Any]:
...
# approve_assignment method usage example with argument unpacking
kwargs: ApproveAssignmentRequestRequestTypeDef = { # (1)
"AssignmentId": ...,
}
parent.approve_assignment(**kwargs)
associate_qualification_with_worker#
The AssociateQualificationWithWorker
operation gives a Worker a Qualification.
Type annotations and code completion for boto3.client("mturk").associate_qualification_with_worker
method.
boto3 documentation
# associate_qualification_with_worker method definition
def associate_qualification_with_worker(
self,
*,
QualificationTypeId: str,
WorkerId: str,
IntegerValue: int = ...,
SendNotification: bool = ...,
) -> Dict[str, Any]:
...
# associate_qualification_with_worker method usage example with argument unpacking
kwargs: AssociateQualificationWithWorkerRequestRequestTypeDef = { # (1)
"QualificationTypeId": ...,
"WorkerId": ...,
}
parent.associate_qualification_with_worker(**kwargs)
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("mturk").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
close#
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("mturk").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
create_additional_assignments_for_hit#
The CreateAdditionalAssignmentsForHIT
operation increases the maximum number
of assignments of an existing
HIT.
Type annotations and code completion for boto3.client("mturk").create_additional_assignments_for_hit
method.
boto3 documentation
# create_additional_assignments_for_hit method definition
def create_additional_assignments_for_hit(
self,
*,
HITId: str,
NumberOfAdditionalAssignments: int,
UniqueRequestToken: str = ...,
) -> Dict[str, Any]:
...
# create_additional_assignments_for_hit method usage example with argument unpacking
kwargs: CreateAdditionalAssignmentsForHITRequestRequestTypeDef = { # (1)
"HITId": ...,
"NumberOfAdditionalAssignments": ...,
}
parent.create_additional_assignments_for_hit(**kwargs)
create_hit#
The CreateHIT
operation creates a new Human Intelligence Task (HIT).
Type annotations and code completion for boto3.client("mturk").create_hit
method.
boto3 documentation
# create_hit method definition
def create_hit(
self,
*,
LifetimeInSeconds: int,
AssignmentDurationInSeconds: int,
Reward: str,
Title: str,
Description: str,
MaxAssignments: int = ...,
AutoApprovalDelayInSeconds: int = ...,
Keywords: str = ...,
Question: str = ...,
RequesterAnnotation: str = ...,
QualificationRequirements: Sequence[QualificationRequirementTypeDef] = ..., # (1)
UniqueRequestToken: str = ...,
AssignmentReviewPolicy: ReviewPolicyTypeDef = ..., # (2)
HITReviewPolicy: ReviewPolicyTypeDef = ..., # (2)
HITLayoutId: str = ...,
HITLayoutParameters: Sequence[HITLayoutParameterTypeDef] = ..., # (4)
) -> CreateHITResponseTypeDef: # (5)
...
- See QualificationRequirementTypeDef
- See ReviewPolicyTypeDef
- See ReviewPolicyTypeDef
- See HITLayoutParameterTypeDef
- See CreateHITResponseTypeDef
# create_hit method usage example with argument unpacking
kwargs: CreateHITRequestRequestTypeDef = { # (1)
"LifetimeInSeconds": ...,
"AssignmentDurationInSeconds": ...,
"Reward": ...,
"Title": ...,
"Description": ...,
}
parent.create_hit(**kwargs)
create_hit_type#
The CreateHITType
operation creates a new HIT type.
Type annotations and code completion for boto3.client("mturk").create_hit_type
method.
boto3 documentation
# create_hit_type method definition
def create_hit_type(
self,
*,
AssignmentDurationInSeconds: int,
Reward: str,
Title: str,
Description: str,
AutoApprovalDelayInSeconds: int = ...,
Keywords: str = ...,
QualificationRequirements: Sequence[QualificationRequirementTypeDef] = ..., # (1)
) -> CreateHITTypeResponseTypeDef: # (2)
...
# create_hit_type method usage example with argument unpacking
kwargs: CreateHITTypeRequestRequestTypeDef = { # (1)
"AssignmentDurationInSeconds": ...,
"Reward": ...,
"Title": ...,
"Description": ...,
}
parent.create_hit_type(**kwargs)
create_hit_with_hit_type#
The CreateHITWithHITType
operation creates a new Human Intelligence Task
(HIT) using an existing HITTypeID generated by the CreateHITType
operation.
Type annotations and code completion for boto3.client("mturk").create_hit_with_hit_type
method.
boto3 documentation
# create_hit_with_hit_type method definition
def create_hit_with_hit_type(
self,
*,
HITTypeId: str,
LifetimeInSeconds: int,
MaxAssignments: int = ...,
Question: str = ...,
RequesterAnnotation: str = ...,
UniqueRequestToken: str = ...,
AssignmentReviewPolicy: ReviewPolicyTypeDef = ..., # (1)
HITReviewPolicy: ReviewPolicyTypeDef = ..., # (1)
HITLayoutId: str = ...,
HITLayoutParameters: Sequence[HITLayoutParameterTypeDef] = ..., # (3)
) -> CreateHITWithHITTypeResponseTypeDef: # (4)
...
- See ReviewPolicyTypeDef
- See ReviewPolicyTypeDef
- See HITLayoutParameterTypeDef
- See CreateHITWithHITTypeResponseTypeDef
# create_hit_with_hit_type method usage example with argument unpacking
kwargs: CreateHITWithHITTypeRequestRequestTypeDef = { # (1)
"HITTypeId": ...,
"LifetimeInSeconds": ...,
}
parent.create_hit_with_hit_type(**kwargs)
create_qualification_type#
The CreateQualificationType
operation creates a new Qualification type, which
is represented by a QualificationType
data
structure.
Type annotations and code completion for boto3.client("mturk").create_qualification_type
method.
boto3 documentation
# create_qualification_type method definition
def create_qualification_type(
self,
*,
Name: str,
Description: str,
QualificationTypeStatus: QualificationTypeStatusType, # (1)
Keywords: str = ...,
RetryDelayInSeconds: int = ...,
Test: str = ...,
AnswerKey: str = ...,
TestDurationInSeconds: int = ...,
AutoGranted: bool = ...,
AutoGrantedValue: int = ...,
) -> CreateQualificationTypeResponseTypeDef: # (2)
...
# create_qualification_type method usage example with argument unpacking
kwargs: CreateQualificationTypeRequestRequestTypeDef = { # (1)
"Name": ...,
"Description": ...,
"QualificationTypeStatus": ...,
}
parent.create_qualification_type(**kwargs)
create_worker_block#
The CreateWorkerBlock
operation allows you to prevent a Worker from working
on your
HITs.
Type annotations and code completion for boto3.client("mturk").create_worker_block
method.
boto3 documentation
# create_worker_block method definition
def create_worker_block(
self,
*,
WorkerId: str,
Reason: str,
) -> Dict[str, Any]:
...
# create_worker_block method usage example with argument unpacking
kwargs: CreateWorkerBlockRequestRequestTypeDef = { # (1)
"WorkerId": ...,
"Reason": ...,
}
parent.create_worker_block(**kwargs)
delete_hit#
The DeleteHIT
operation is used to delete HIT that is no longer needed.
Type annotations and code completion for boto3.client("mturk").delete_hit
method.
boto3 documentation
# delete_hit method definition
def delete_hit(
self,
*,
HITId: str,
) -> Dict[str, Any]:
...
# delete_hit method usage example with argument unpacking
kwargs: DeleteHITRequestRequestTypeDef = { # (1)
"HITId": ...,
}
parent.delete_hit(**kwargs)
delete_qualification_type#
The DeleteQualificationType
deletes a Qualification type and deletes any HIT
types that are associated with the Qualification
type.
Type annotations and code completion for boto3.client("mturk").delete_qualification_type
method.
boto3 documentation
# delete_qualification_type method definition
def delete_qualification_type(
self,
*,
QualificationTypeId: str,
) -> Dict[str, Any]:
...
# delete_qualification_type method usage example with argument unpacking
kwargs: DeleteQualificationTypeRequestRequestTypeDef = { # (1)
"QualificationTypeId": ...,
}
parent.delete_qualification_type(**kwargs)
delete_worker_block#
The DeleteWorkerBlock
operation allows you to reinstate a blocked Worker to
work on your
HITs.
Type annotations and code completion for boto3.client("mturk").delete_worker_block
method.
boto3 documentation
# delete_worker_block method definition
def delete_worker_block(
self,
*,
WorkerId: str,
Reason: str = ...,
) -> Dict[str, Any]:
...
# delete_worker_block method usage example with argument unpacking
kwargs: DeleteWorkerBlockRequestRequestTypeDef = { # (1)
"WorkerId": ...,
}
parent.delete_worker_block(**kwargs)
disassociate_qualification_from_worker#
The DisassociateQualificationFromWorker
revokes a previously granted
Qualification from a
user.
Type annotations and code completion for boto3.client("mturk").disassociate_qualification_from_worker
method.
boto3 documentation
# disassociate_qualification_from_worker method definition
def disassociate_qualification_from_worker(
self,
*,
WorkerId: str,
QualificationTypeId: str,
Reason: str = ...,
) -> Dict[str, Any]:
...
# disassociate_qualification_from_worker method usage example with argument unpacking
kwargs: DisassociateQualificationFromWorkerRequestRequestTypeDef = { # (1)
"WorkerId": ...,
"QualificationTypeId": ...,
}
parent.disassociate_qualification_from_worker(**kwargs)
generate_presigned_url#
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for boto3.client("mturk").generate_presigned_url
method.
boto3 documentation
# generate_presigned_url method definition
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
get_account_balance#
The GetAccountBalance
operation retrieves the Prepaid HITs balance in your
Amazon Mechanical Turk account if you are a Prepaid
Requester.
Type annotations and code completion for boto3.client("mturk").get_account_balance
method.