listKeywordsForDataSource method

Future<ListKeywordsForDataSourceResponse> listKeywordsForDataSource({
  1. required DataSourceType source,
  2. int? maxResults,
  3. String? nextToken,
})

Returns a list of keywords that are pre-mapped to the specified control data source.

May throw AccessDeniedException. May throw InternalServerException. May throw ValidationException.

Parameter source : The control mapping data source that the keywords apply to.

Parameter maxResults : Represents the maximum number of results on a page or for an API request call.

Parameter nextToken : The pagination token that's used to fetch the next set of results.

Implementation

Future<ListKeywordsForDataSourceResponse> listKeywordsForDataSource({
  required DataSourceType source,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final $query = <String, List<String>>{
    'source': [source.value],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/dataSourceKeywords',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListKeywordsForDataSourceResponse.fromJson(response);
}