listExclusions method
List exclusions that are generated by the assessment run.
May throw InternalException. May throw InvalidInputException. May throw AccessDeniedException. May throw NoSuchEntityException.
Parameter assessmentRunArn
:
The ARN of the assessment run that generated the exclusions that you want
to list.
Parameter maxResults
:
You can use this parameter to indicate the maximum number of items you
want in the response. The default value is 100. The maximum value is 500.
Parameter nextToken
:
You can use this parameter when paginating results. Set the value of this
parameter to null on your first call to the ListExclusionsRequest action.
Subsequent calls to the action fill nextToken in the request with the
value of nextToken from the previous response to continue listing data.
Implementation
Future<ListExclusionsResponse> listExclusions({
required String assessmentRunArn,
int? maxResults,
String? nextToken,
}) async {
ArgumentError.checkNotNull(assessmentRunArn, 'assessmentRunArn');
_s.validateStringLength(
'assessmentRunArn',
assessmentRunArn,
1,
300,
isRequired: true,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
300,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'InspectorService.ListExclusions'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'assessmentRunArn': assessmentRunArn,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
},
);
return ListExclusionsResponse.fromJson(jsonResponse.body);
}