Deletes the quick response import job.
Parameters:
-
knowledge_base_id
(UuidOrArn)
–
The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Wisdom Content resource to it.
-
import_job_id
(Uuid)
–
The identifier of the import job to be deleted.
Raises:
-
AccessDeniedException
–
You do not have sufficient access to perform this action.
-
ConflictException
–
The request could not be processed because of conflict in the current state of the resource. For example, if you're using a Create API (such as CreateAssistant) that accepts name, a conflicting resource (usually with the same name) is being created or mutated.
-
ResourceNotFoundException
–
The specified resource does not exist.
-
ValidationException
–
The input fails to satisfy the constraints specified by a service.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_wisdom/_services/wisdom.py
| def delete_import_job(
self,
knowledge_base_id: "capo_wisdom.types.uuid_or_arn.UuidOrArn",
import_job_id: "capo_wisdom.types.uuid.Uuid",
*,
config_overrides: Optional[WisdomClientConfig] = None,
) -> "capo_wisdom.types.delete_import_job_response.DeleteImportJobResponse":
"""<p>Deletes the quick response import job.</p>
Args:
knowledge_base_id: <p>The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Wisdom Content resource to it.</p>
import_job_id: <p>The identifier of the import job to be deleted.</p>
Raises:
capo_wisdom.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_wisdom.errors.conflict_exception.ConflictException: <p>The request could not be processed because of conflict in the current state of the resource. For example, if you're using a <code>Create</code> API (such as <code>CreateAssistant</code>) that accepts name, a conflicting resource (usually with the same name) is being created or mutated.</p>
capo_wisdom.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
capo_wisdom.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by a service.</p>
capo_wisdom.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_wisdom.types.delete_import_job_request.DeleteImportJobRequest]",
) -> OperationResponse[
"capo_wisdom.types.delete_import_job_response.DeleteImportJobResponse"
]:
import capo_wisdom._operations.wisdom_service.delete_import_job
output, http_response = (
capo_wisdom._operations.wisdom_service.delete_import_job.delete_import_job(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteImportJob")
)
input_: capo_wisdom.types.delete_import_job_request.DeleteImportJobRequest = {
"knowledge_base_id": knowledge_base_id,
"import_job_id": import_job_id,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|