The DisassociateQualificationFromWorker revokes a previously granted Qualification from a user.
You can provide a text message explaining why the Qualification was revoked. The user who had the Qualification can see this message.
Parameters:
-
worker_id
(CustomerId)
–
The ID of the Worker who possesses the Qualification to be revoked.
-
qualification_type_id
(EntityId)
–
The ID of the Qualification type of the Qualification to be revoked.
-
reason
(Optional[String], default:
None
)
–
A text message that explains why the Qualification was revoked. The user who had the Qualification sees this message.
Raises:
Source code in docs_src/capo_mturk/_services/async_m_turk.py
| async def disassociate_qualification_from_worker(
self,
worker_id: "capo_mturk.types.customer_id.CustomerId",
qualification_type_id: "capo_mturk.types.entity_id.EntityId",
*,
config_overrides: Optional[AsyncMTurkClientConfig] = None,
reason: Optional["capo_mturk.types.string.String"] = None,
) -> "capo_mturk.types.disassociate_qualification_from_worker_response.DisassociateQualificationFromWorkerResponse":
"""<p> The <code>DisassociateQualificationFromWorker</code> revokes a previously granted Qualification from a user. </p> <p> You can provide a text message explaining why the Qualification was revoked. The user who had the Qualification can see this message. </p>
Args:
worker_id: <p>The ID of the Worker who possesses the Qualification to be revoked.</p>
qualification_type_id: <p>The ID of the Qualification type of the Qualification to be revoked.</p>
reason: <p>A text message that explains why the Qualification was revoked. The user who had the Qualification sees this message.</p>
Raises:
capo_mturk.errors.request_error.RequestError: <p>Your request is invalid.</p>
capo_mturk.errors.service_fault.ServiceFault: <p>Amazon Mechanical Turk is temporarily unable to process your request. Try your call again.</p>
capo_mturk.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_mturk.types.disassociate_qualification_from_worker_request.DisassociateQualificationFromWorkerRequest]",
) -> AsyncOperationResponse[
"capo_mturk.types.disassociate_qualification_from_worker_response.DisassociateQualificationFromWorkerResponse"
]:
import capo_mturk._operations.m_turk_requester_service_v20170117.disassociate_qualification_from_worker
(
output,
http_response,
) = await capo_mturk._operations.m_turk_requester_service_v20170117.disassociate_qualification_from_worker.async_disassociate_qualification_from_worker(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DisassociateQualificationFromWorker")
)
input_: capo_mturk.types.disassociate_qualification_from_worker_request.DisassociateQualificationFromWorkerRequest = {
"worker_id": worker_id,
"qualification_type_id": qualification_type_id,
}
if reason is not None:
input_["reason"] = reason
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|