The DeleteQualificationType deletes a Qualification type and deletes any HIT types that are associated with the Qualification type.
This operation does not revoke Qualifications already assigned to Workers because the Qualifications might be needed for active HITs. If there are any pending requests for the Qualification type, Amazon Mechanical Turk rejects those requests. After you delete a Qualification type, you can no longer use it to create HITs or HIT types.
DeleteQualificationType must wait for all the HITs that use the deleted Qualification type to be deleted before completing. It may take up to 48 hours before DeleteQualificationType completes and the unique name of the Qualification type is available for reuse with CreateQualificationType.
Parameters:
-
qualification_type_id
(EntityId)
–
The ID of the QualificationType to dispose.
Raises:
Source code in docs_src/capo_mturk/_services/async_m_turk.py
| async def delete_qualification_type(
self,
qualification_type_id: "capo_mturk.types.entity_id.EntityId",
*,
config_overrides: Optional[AsyncMTurkClientConfig] = None,
) -> "capo_mturk.types.delete_qualification_type_response.DeleteQualificationTypeResponse":
"""<p> The <code>DeleteQualificationType</code> deletes a Qualification type and deletes any HIT types that are associated with the Qualification type. </p> <p>This operation does not revoke Qualifications already assigned to Workers because the Qualifications might be needed for active HITs. If there are any pending requests for the Qualification type, Amazon Mechanical Turk rejects those requests. After you delete a Qualification type, you can no longer use it to create HITs or HIT types.</p> <note> <p>DeleteQualificationType must wait for all the HITs that use the deleted Qualification type to be deleted before completing. It may take up to 48 hours before DeleteQualificationType completes and the unique name of the Qualification type is available for reuse with CreateQualificationType.</p> </note>
Args:
qualification_type_id: <p>The ID of the QualificationType to dispose.</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.delete_qualification_type_request.DeleteQualificationTypeRequest]",
) -> AsyncOperationResponse[
"capo_mturk.types.delete_qualification_type_response.DeleteQualificationTypeResponse"
]:
import capo_mturk._operations.m_turk_requester_service_v20170117.delete_qualification_type
(
output,
http_response,
) = await capo_mturk._operations.m_turk_requester_service_v20170117.delete_qualification_type.async_delete_qualification_type(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteQualificationType")
)
input_: capo_mturk.types.delete_qualification_type_request.DeleteQualificationTypeRequest = {
"qualification_type_id": qualification_type_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|