getBillingGroupCostReport method
Retrieves the margin summary report, which includes the Amazon Web Services cost and charged amount (pro forma cost) by Amazon Web Services service for a specific billing group.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter arn :
The Amazon Resource Number (ARN) that uniquely identifies the billing
group.
Parameter billingPeriodRange :
A time range for which the margin summary is effective. You can specify up
to 12 months.
Parameter groupBy :
A list of strings that specify the attributes that are used to break down
costs in the margin summary reports for the billing group. For example,
you can view your costs by the Amazon Web Services service name or the
billing period.
Parameter maxResults :
The maximum number of margin summary reports to retrieve.
Parameter nextToken :
The pagination token used on subsequent calls to get reports.
Implementation
Future<GetBillingGroupCostReportOutput> getBillingGroupCostReport({
required String arn,
BillingPeriodRange? billingPeriodRange,
List<GroupByAttributeName>? groupBy,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
200,
300,
);
final $payload = <String, dynamic>{
'Arn': arn,
if (billingPeriodRange != null) 'BillingPeriodRange': billingPeriodRange,
if (groupBy != null) 'GroupBy': groupBy.map((e) => e.value).toList(),
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/get-billing-group-cost-report',
exceptionFnMap: _exceptionFns,
);
return GetBillingGroupCostReportOutput.fromJson(response);
}