getApproximateUsageRecords method
Retrieves estimated usage records for hourly granularity or resource-level data at daily granularity.
May throw DataUnavailableException.
May throw LimitExceededException.
Parameter approximationDimension :
The service to evaluate for the usage records. You can choose
resource-level data at daily granularity, or hourly granularity with or
without resource-level data.
Parameter granularity :
How granular you want the data to be. You can enable data at hourly or
daily granularity.
Parameter services :
The service metadata for the service or services you want to query. If not
specified, all elements are returned.
Implementation
Future<GetApproximateUsageRecordsResponse> getApproximateUsageRecords({
required ApproximationDimension approximationDimension,
required Granularity granularity,
List<String>? services,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSInsightsIndexService.GetApproximateUsageRecords'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ApproximationDimension': approximationDimension.value,
'Granularity': granularity.value,
if (services != null) 'Services': services,
},
);
return GetApproximateUsageRecordsResponse.fromJson(jsonResponse.body);
}