searchTypes method

Future<SearchTypesOutput> searchTypes({
  1. required String domainIdentifier,
  2. required bool managed,
  3. required TypesSearchScope searchScope,
  4. FilterClause? filters,
  5. int? maxResults,
  6. String? nextToken,
  7. List<SearchInItem>? searchIn,
  8. String? searchText,
  9. SearchSort? sort,
})

Searches for types in Amazon DataZone.

Prerequisites:

  • The --domain-identifier must refer to an existing Amazon DataZone domain.
  • --search-scope must be one of the valid values including: ASSET_TYPE, GLOSSARY_TERM_TYPE, DATA_PRODUCT_TYPE.
  • The --managed flag must be present without a value.
  • The user must have permissions for form or asset types in the domain.
  • If using --filters, ensure that the JSON is valid.
  • Filters contain correct structure (attribute, value, operator).

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

Parameter domainIdentifier : The identifier of the Amazon DataZone domain in which to invoke the SearchTypes action.

Parameter managed : Specifies whether the search is managed.

Parameter searchScope : Specifies the scope of the search for types.

Parameter filters : The filters for the SearchTypes action.

Parameter maxResults : The maximum number of results to return in a single call to SearchTypes. When the number of results to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to SearchTypes to list the next set of results.

Parameter nextToken : When the number of results is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of results, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to SearchTypes to list the next set of results.

Parameter searchIn : The details of the search.

Parameter searchText : Specifies the text for which to search.

Parameter sort : The specifies the way to sort the SearchTypes results.

Implementation

Future<SearchTypesOutput> searchTypes({
  required String domainIdentifier,
  required bool managed,
  required TypesSearchScope searchScope,
  FilterClause? filters,
  int? maxResults,
  String? nextToken,
  List<SearchInItem>? searchIn,
  String? searchText,
  SearchSort? sort,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  final $payload = <String, dynamic>{
    'managed': managed,
    'searchScope': searchScope.value,
    if (filters != null) 'filters': filters,
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
    if (searchIn != null) 'searchIn': searchIn,
    if (searchText != null) 'searchText': searchText,
    if (sort != null) 'sort': sort,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/types-search',
    exceptionFnMap: _exceptionFns,
  );
  return SearchTypesOutput.fromJson(response);
}