searchAssets method
Searches for assets in Glue Data Catalog using full-text search, filters, sorting, and aggregations. Returns matching assets with relevance-ranked results.
May throw AccessDeniedException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw ThrottlingException.
Parameter filterClause :
The filter clause to apply to the search. Supports nested AND/OR logic
with attribute-level and map-level filters.
Parameter maxResults :
The maximum number of results to return in the response.
Parameter nextToken :
A continuation token, if this is a continuation call.
Parameter searchText :
The text to search for. At least one of searchText or
filterClause must be provided.
Parameter sort :
The sort criteria for the search results.
Implementation
Future<SearchAssetsOutput> searchAssets({
SearchFilterClause? filterClause,
int? maxResults,
String? nextToken,
String? searchText,
SearchSort? sort,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.SearchAssets'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (filterClause != null) 'FilterClause': filterClause,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (searchText != null) 'SearchText': searchText,
if (sort != null) 'Sort': sort,
},
);
return SearchAssetsOutput.fromJson(jsonResponse.body);
}