searchImageSets method

Future<SearchImageSetsResponse> searchImageSets({
  1. required String datastoreId,
  2. int? maxResults,
  3. String? nextToken,
  4. SearchCriteria? searchCriteria,
})

Search image sets based on defined input attributes.

By default, SearchImageSets uses the updatedAt field for sorting in descending order from newest to oldest.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter datastoreId : The identifier of the data store where the image sets reside.

Parameter maxResults : The maximum number of results that can be returned in a search.

Parameter nextToken : The token used for pagination of results returned in the response. Use the token returned from the previous request to continue results where the previous request ended.

Parameter searchCriteria : The search criteria that filters by applying a maximum of 1 item to SearchByAttribute.

Implementation

Future<SearchImageSetsResponse> searchImageSets({
  required String datastoreId,
  int? maxResults,
  String? nextToken,
  SearchCriteria? searchCriteria,
}) async {
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: searchCriteria,
    method: 'POST',
    requestUri:
        '/datastore/${Uri.encodeComponent(datastoreId)}/searchImageSets',
    queryParams: $query,
    hostPrefix: 'runtime-',
    exceptionFnMap: _exceptionFns,
  );
  return SearchImageSetsResponse.fromJson(response);
}