listFindingsV2 method
Retrieves a list of findings generated by the specified analyzer.
ListFindings and ListFindingsV2 both use
access-analyzer:ListFindings in the Action
element of an IAM policy statement. You must have permission to perform
the access-analyzer:ListFindings action.
To learn about filter keys that you can use to retrieve a list of findings, see IAM Access Analyzer filter keys in the IAM User Guide.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter analyzerArn :
The ARN
of the analyzer to retrieve findings from.
Parameter filter :
A filter to match for the findings to return.
Parameter maxResults :
The maximum number of results to return in the response.
Parameter nextToken :
A token used for pagination of results returned.
Implementation
Future<ListFindingsV2Response> listFindingsV2({
required String analyzerArn,
Map<String, Criterion>? filter,
int? maxResults,
String? nextToken,
SortCriteria? sort,
}) async {
final $payload = <String, dynamic>{
'analyzerArn': analyzerArn,
if (filter != null) 'filter': filter,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (sort != null) 'sort': sort,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/findingv2',
exceptionFnMap: _exceptionFns,
);
return ListFindingsV2Response.fromJson(response);
}