listResourceComplianceSummaries method
Future<ListResourceComplianceSummariesResult>
listResourceComplianceSummaries({
- List<
ComplianceStringFilter> ? filters, - int? maxResults,
- String? nextToken,
Returns a resource-level summary count. The summary includes information about compliant and non-compliant statuses and detailed compliance-item severity counts, according to the filter criteria you specify.
May throw InvalidFilter. May throw InvalidNextToken. May throw InternalServerError.
Parameter filters
:
One or more filters. Use a filter to return a more specific list of
results.
Parameter maxResults
:
The maximum number of items to return for this call. The call also returns
a token that you can specify in a subsequent call to get the next set of
results.
Parameter nextToken
:
A token to start the list. Use this token to get the next set of results.
Implementation
Future<ListResourceComplianceSummariesResult>
listResourceComplianceSummaries({
List<ComplianceStringFilter>? filters,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
50,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonSSM.ListResourceComplianceSummaries'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (filters != null) 'Filters': filters,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListResourceComplianceSummariesResult.fromJson(jsonResponse.body);
}