async def search_related_items(
self,
domain_id: "capo_connectcases.types.domain_id.DomainId",
case_id: "capo_connectcases.types.case_id.CaseId",
*,
config_overrides: Optional[AsyncConnectCasesClientConfig] = None,
max_results: Optional[int] = None,
next_token: Optional["capo_connectcases.types.next_token.NextToken"] = None,
filters: Optional[
"capo_connectcases.types.related_item_filter_list.RelatedItemFilterList"
] = None,
) -> "capo_connectcases.types.search_related_items_response.SearchRelatedItemsResponse":
"""<p>Searches for related items that are associated with a case.</p> <note> <p>If no filters are provided, this returns all related items associated with a case.</p> </note>
Args:
domain_id: <p>The unique identifier of the Cases domain. </p>
case_id: <p>A unique identifier of the case.</p>
max_results: <p>The maximum number of results to return per page.</p>
next_token: <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
filters: <p>The list of types of related items and their parameters to use for filtering.</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.search_related_items_request.SearchRelatedItemsRequest]",
) -> AsyncOperationResponse[
"capo_connectcases.types.search_related_items_response.SearchRelatedItemsResponse"
]:
import capo_connectcases._operations.amazon_connect_cases.search_related_items
(
output,
http_response,
) = await capo_connectcases._operations.amazon_connect_cases.search_related_items.async_search_related_items(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_input(
input_: "capo_connectcases.types.search_related_items_request.SearchRelatedItemsRequest",
) -> dict[str, Any]:
import capo_connectcases.types.search_related_items_request
return (
capo_connectcases.types.search_related_items_request.redact_sensitive(
input_
)
)
def _redact_output(
output: "capo_connectcases.types.search_related_items_response.SearchRelatedItemsResponse",
) -> dict[str, Any]:
import capo_connectcases.types.search_related_items_response
return (
capo_connectcases.types.search_related_items_response.redact_sensitive(
output
)
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging(
"SearchRelatedItems",
redact_input=_redact_input,
redact_output=_redact_output,
),
)
input_: capo_connectcases.types.search_related_items_request.SearchRelatedItemsRequest = {
"domain_id": domain_id,
"case_id": case_id,
}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
if filters is not None:
input_["filters"] = filters
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output