listDataTableValues method
Lists values stored in a data table with optional filtering by record IDs or primary attribute values. Returns the raw stored values along with metadata such as lock versions and modification timestamps.
May throw AccessDeniedException.
May throw InternalServiceException.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter dataTableId :
The unique identifier for the data table whose values should be listed.
Parameter instanceId :
The unique identifier for the Amazon Connect instance.
Parameter maxResults :
The maximum number of data table values to return in one page of results.
Parameter nextToken :
Specify the pagination token from a previous request to retrieve the next
page of results.
Parameter primaryAttributeValues :
Optional filter to retrieve values for records matching specific primary
attribute criteria.
Parameter recordIds :
Optional list of specific record IDs to retrieve values for.
Implementation
Future<ListDataTableValuesResponse> listDataTableValues({
required String dataTableId,
required String instanceId,
int? maxResults,
String? nextToken,
List<PrimaryAttributeValueFilter>? primaryAttributeValues,
List<String>? recordIds,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final $payload = <String, dynamic>{
if (primaryAttributeValues != null)
'PrimaryAttributeValues': primaryAttributeValues,
if (recordIds != null) 'RecordIds': recordIds,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/data-tables/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(dataTableId)}/values/list',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListDataTableValuesResponse.fromJson(response);
}