getOpsSummary method
View a summary of operations metadata (OpsData) based on specified filters and aggregators. OpsData can include information about Amazon Web Services Systems Manager OpsCenter operational workitems (OpsItems) as well as information about any Amazon Web Services resource or service configured to report OpsData to Amazon Web Services Systems Manager Explorer.
May throw InternalServerError.
May throw InvalidAggregatorException.
May throw InvalidFilter.
May throw InvalidNextToken.
May throw InvalidTypeNameException.
May throw ResourceDataSyncNotFoundException.
Parameter aggregators :
Optional aggregators that return counts of OpsData based on one or more
expressions.
Parameter filters :
Optional filters used to scope down the returned OpsData.
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.
Parameter resultAttributes :
The OpsData data type to return.
Parameter syncName :
Specify the name of a resource data sync to get.
Implementation
Future<GetOpsSummaryResult> getOpsSummary({
List<OpsAggregator>? aggregators,
List<OpsFilter>? filters,
int? maxResults,
String? nextToken,
List<OpsResultAttribute>? resultAttributes,
String? syncName,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
50,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonSSM.GetOpsSummary'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (aggregators != null) 'Aggregators': aggregators,
if (filters != null) 'Filters': filters,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (resultAttributes != null) 'ResultAttributes': resultAttributes,
if (syncName != null) 'SyncName': syncName,
},
);
return GetOpsSummaryResult.fromJson(jsonResponse.body);
}