getUsageTotals method
Retrieves (queries) aggregated usage data for an account.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter timeRange :
The inclusive time period to retrieve the data for. Valid values are:
MONTH_TO_DATE, for the current calendar month to date; and, PAST_30_DAYS,
for the preceding 30 days. If you don't specify a value for this
parameter, Amazon Macie provides aggregated usage data for the preceding
30 days.
Implementation
Future<GetUsageTotalsResponse> getUsageTotals({
String? timeRange,
}) async {
final $query = <String, List<String>>{
if (timeRange != null) 'timeRange': [timeRange],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/usage',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetUsageTotalsResponse.fromJson(response);
}