searchTopics method

Future<SearchTopicsResponse> searchTopics({
  1. required String awsAccountId,
  2. required List<TopicSearchFilter> filters,
  3. int? maxResults,
  4. String? nextToken,
})

Searches for any Q topic that exists in an Quick account.

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

Parameter awsAccountId : The ID of the Amazon Web Services account that contains the topic that you want to find.

Parameter filters : The filters that you want to use to search for the topic.

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

Parameter nextToken : The token for the next set of results, or null if there are no more results.

Implementation

Future<SearchTopicsResponse> searchTopics({
  required String awsAccountId,
  required List<TopicSearchFilter> 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/topics',
    exceptionFnMap: _exceptionFns,
  );
  return SearchTopicsResponse.fromJson(response);
}