listDataSets method

Future<ListDataSetsResponse> listDataSets({
  1. int? maxResults,
  2. String? nextToken,
  3. String? origin,
})

This operation lists your data sets. When listing by origin OWNED, results are sorted by CreatedAt in descending order. When listing by origin ENTITLED, there is no order and the maxResults parameter is ignored.

May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException. May throw InternalServerException.

Parameter maxResults : The maximum number of results returned by a single call.

Parameter nextToken : The token value retrieved from a previous call to access the next page of results.

Parameter origin : A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for subscribers).

Implementation

Future<ListDataSetsResponse> listDataSets({
  int? maxResults,
  String? nextToken,
  String? origin,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    25,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (origin != null) 'origin': [origin],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/v1/data-sets',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListDataSetsResponse.fromJson(response);
}