searchDataSets method

Future<SearchDataSetsResponse> searchDataSets({
  1. required String awsAccountId,
  2. required List<DataSetSearchFilter> filters,
  3. int? maxResults,
  4. String? nextToken,
})

Use the SearchDataSets operation to search for datasets that belong to an account.

May throw AccessDeniedException. May throw InternalFailureException. May throw InvalidNextTokenException. May throw InvalidParameterValueException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter awsAccountId : The Amazon Web Services account ID.

Parameter filters : The filters to apply to the search.

Parameter maxResults : The maximum number of results to be returned per request.

Parameter nextToken : A pagination token that can be used in a subsequent request.

Implementation

Future<SearchDataSetsResponse> searchDataSets({
  required String awsAccountId,
  required List<DataSetSearchFilter> filters,
  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:
        '/accounts/${Uri.encodeComponent(awsAccountId)}/search/data-sets',
    exceptionFnMap: _exceptionFns,
  );
  return SearchDataSetsResponse.fromJson(response);
}