listBillingGroupCostReports method

Future<ListBillingGroupCostReportsOutput> listBillingGroupCostReports({
  1. String? billingPeriod,
  2. ListBillingGroupCostReportsFilter? filters,
  3. int? maxResults,
  4. String? nextToken,
})

A paginated call to retrieve a summary report of actual Amazon Web Services charges and the calculated Amazon Web Services charges based on the associated pricing plan of a billing group.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter billingPeriod : The preferred billing period for your report.

Parameter filters : A ListBillingGroupCostReportsFilter to specify billing groups to retrieve reports from.

Parameter maxResults : The maximum number of reports to retrieve.

Parameter nextToken : The pagination token that's used on subsequent calls to get reports.

Implementation

Future<ListBillingGroupCostReportsOutput> listBillingGroupCostReports({
  String? billingPeriod,
  ListBillingGroupCostReportsFilter? filters,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $payload = <String, dynamic>{
    if (billingPeriod != null) 'BillingPeriod': billingPeriod,
    if (filters != null) 'Filters': filters,
    if (maxResults != null) 'MaxResults': maxResults,
    if (nextToken != null) 'NextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/list-billing-group-cost-reports',
    exceptionFnMap: _exceptionFns,
  );
  return ListBillingGroupCostReportsOutput.fromJson(response);
}