getCurrentUserData method
Gets the real-time active user data from the specified Connect Customer instance.
May throw InternalServiceException.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter filters :
The filters to apply to returned user data. You can filter up to the
following limits:
- Queues: 100
- Routing profiles: 100
- Agents: 100
- Contact states: 9
- User hierarchy groups: 1
Currently tagging is only supported on the resources that are passed in the filter.
Parameter instanceId :
The identifier of the Connect Customer instance. You can find
the instance ID in the Amazon Resource Name (ARN) of the instance.
Parameter maxResults :
The maximum number of results to return per page.
Parameter nextToken :
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.
Implementation
Future<GetCurrentUserDataResponse> getCurrentUserData({
required UserDataFilters filters,
required String instanceId,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $payload = <String, dynamic>{
'Filters': filters,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/metrics/userdata/${Uri.encodeComponent(instanceId)}',
exceptionFnMap: _exceptionFns,
);
return GetCurrentUserDataResponse.fromJson(response);
}