Provides a list of analysis segments for a real-time analysis session for voice.
Voice data is retained for 24 hours. You must invoke this API during that time.
Parameters:
-
instance_id
(Optional[InstanceId], default:
None
)
–
The identifier of the Amazon Connect instance.
-
contact_id
(Optional[ContactId], default:
None
)
–
The identifier of the contact.
-
max_results
(Optional[MaxResults], default:
None
)
–
The maximum number of results to return per page.
-
next_token
(Optional[NextToken], default:
None
)
–
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.
Raises:
Source code in docs_src/capo_connect_contact_lens/_services/async_connect_contact_lens.py
| async def list_realtime_contact_analysis_segments(
self,
*,
config_overrides: Optional[AsyncConnectContactLensClientConfig] = None,
instance_id: Optional[
"capo_connect_contact_lens.types.instance_id.InstanceId"
] = None,
contact_id: Optional[
"capo_connect_contact_lens.types.contact_id.ContactId"
] = None,
max_results: Optional[
"capo_connect_contact_lens.types.max_results.MaxResults"
] = None,
next_token: Optional[
"capo_connect_contact_lens.types.next_token.NextToken"
] = None,
) -> "capo_connect_contact_lens.types.list_realtime_contact_analysis_segments_response.ListRealtimeContactAnalysisSegmentsResponse":
"""<p>Provides a list of analysis segments for a real-time analysis session for voice.</p> <note> <p>Voice data is retained for 24 hours. You must invoke this API during that time.</p> </note>
Args:
instance_id: <p>The identifier of the Amazon Connect instance.</p>
contact_id: <p>The identifier of the contact.</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>
Raises:
capo_connect_contact_lens.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_connect_contact_lens.errors.internal_service_exception.InternalServiceException: <p>Request processing failed due to an error or failure with the service.</p>
capo_connect_contact_lens.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
capo_connect_contact_lens.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
capo_connect_contact_lens.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
capo_connect_contact_lens.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_connect_contact_lens.types.list_realtime_contact_analysis_segments_request.ListRealtimeContactAnalysisSegmentsRequest]",
) -> AsyncOperationResponse[
"capo_connect_contact_lens.types.list_realtime_contact_analysis_segments_response.ListRealtimeContactAnalysisSegmentsResponse"
]:
import capo_connect_contact_lens._operations.amazon_connect_contact_lens.list_realtime_contact_analysis_segments
(
output,
http_response,
) = await capo_connect_contact_lens._operations.amazon_connect_contact_lens.list_realtime_contact_analysis_segments.async_list_realtime_contact_analysis_segments(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListRealtimeContactAnalysisSegments")
)
input_: capo_connect_contact_lens.types.list_realtime_contact_analysis_segments_request.ListRealtimeContactAnalysisSegmentsRequest = {}
if instance_id is not None:
input_["instance_id"] = instance_id
if contact_id is not None:
input_["contact_id"] = contact_id
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|