Deletes the related item resource under a case.
This API cannot be used on a FILE type related attachment. To delete this type of file, use the DeleteAttachedFile API
Parameters:
-
domain_id
(DomainId)
–
A unique identifier of the Cases domain.
-
case_id
(CaseId)
–
A unique identifier of the case.
-
related_item_id
(RelatedItemId)
–
A unique identifier of a related item.
Raises:
-
AccessDeniedException
–
You do not have sufficient access to perform this action.
-
InternalServerException
–
We couldn't process your request because of an issue with the server. Try again later.
-
ResourceNotFoundException
–
We couldn't find the requested resource. Check that your resources exists and were created in the same Amazon Web Services Region as your request, and try your request again.
-
ThrottlingException
–
The rate has been exceeded for this API. Please try again after a few minutes.
-
ValidationException
–
The request isn't valid. Check the syntax and try again.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_connectcases/_services/async_connect_cases.py
| async def delete_related_item(
self,
domain_id: "capo_connectcases.types.domain_id.DomainId",
case_id: "capo_connectcases.types.case_id.CaseId",
related_item_id: "capo_connectcases.types.related_item_id.RelatedItemId",
*,
config_overrides: Optional[AsyncConnectCasesClientConfig] = None,
) -> (
"capo_connectcases.types.delete_related_item_response.DeleteRelatedItemResponse"
):
"""<p>Deletes the related item resource under a case.</p> <note> <p>This API cannot be used on a FILE type related attachment. To delete this type of file, use the <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_DeleteAttachedFile.html">DeleteAttachedFile</a> API</p> </note>
Args:
domain_id: <p>A unique identifier of the Cases domain.</p>
case_id: <p>A unique identifier of the case.</p>
related_item_id: <p>A unique identifier of a related item.</p>
Raises:
capo_connectcases.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_connectcases.errors.internal_server_exception.InternalServerException: <p>We couldn't process your request because of an issue with the server. Try again later.</p>
capo_connectcases.errors.resource_not_found_exception.ResourceNotFoundException: <p>We couldn't find the requested resource. Check that your resources exists and were created in the same Amazon Web Services Region as your request, and try your request again.</p>
capo_connectcases.errors.throttling_exception.ThrottlingException: <p>The rate has been exceeded for this API. Please try again after a few minutes.</p>
capo_connectcases.errors.validation_exception.ValidationException: <p>The request isn't valid. Check the syntax and try again.</p>
capo_connectcases.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_connectcases.types.delete_related_item_request.DeleteRelatedItemRequest]",
) -> AsyncOperationResponse[
"capo_connectcases.types.delete_related_item_response.DeleteRelatedItemResponse"
]:
import capo_connectcases._operations.amazon_connect_cases.delete_related_item
(
output,
http_response,
) = await capo_connectcases._operations.amazon_connect_cases.delete_related_item.async_delete_related_item(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteRelatedItem")
)
input_: capo_connectcases.types.delete_related_item_request.DeleteRelatedItemRequest = {
"domain_id": domain_id,
"case_id": case_id,
"related_item_id": related_item_id,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|