listDataTablePrimaryValues method
Lists all primary value combinations for a given data table. Returns the unique combinations of primary attribute values that identify records in the table. Up to 100 records are returned per request.
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 primary values should be
listed.
Parameter instanceId :
The unique identifier for the Amazon Connect instance.
Parameter maxResults :
The maximum number of data table primary 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 primary values matching specific criteria.
Parameter recordIds :
Optional list of specific record IDs to retrieve. Used for CloudFormation
to effectively describe records by ID. If NextToken is provided, this
parameter is ignored.
Implementation
Future<ListDataTablePrimaryValuesResponse> listDataTablePrimaryValues({
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-primary',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListDataTablePrimaryValuesResponse.fromJson(response);
}