searchAnalyses method

Future<SearchAnalysesResponse> searchAnalyses({
  1. required String awsAccountId,
  2. required List<AnalysisSearchFilter> filters,
  3. int? maxResults,
  4. String? nextToken,
})

Searches for analyses that belong to the user specified in the filter.

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

Parameter awsAccountId : The ID of the AWS account that contains the analyses that you're searching for.

Parameter filters : The structure for the search filters that you want to apply to your search.

Parameter maxResults : The maximum number of results to return.

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

Implementation

Future<SearchAnalysesResponse> searchAnalyses({
  required String awsAccountId,
  required List<AnalysisSearchFilter> filters,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(awsAccountId, 'awsAccountId');
  _s.validateStringLength(
    'awsAccountId',
    awsAccountId,
    12,
    12,
    isRequired: true,
  );
  ArgumentError.checkNotNull(filters, 'filters');
  _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/analyses',
    exceptionFnMap: _exceptionFns,
  );
  return SearchAnalysesResponse.fromJson(response);
}