listBillingGroups method
A paginated call to retrieve a list of billing groups for the given billing period. If you don't provide a billing group, the current billing period is used.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter billingPeriod :
The preferred billing period to get billing groups.
Parameter filters :
A ListBillingGroupsFilter that specifies the billing group
and pricing plan to retrieve billing group information.
Parameter maxResults :
The maximum number of billing groups to retrieve.
Parameter nextToken :
The pagination token that's used on subsequent calls to get billing
groups.
Implementation
Future<ListBillingGroupsOutput> listBillingGroups({
String? billingPeriod,
ListBillingGroupsFilter? 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-groups',
exceptionFnMap: _exceptionFns,
);
return ListBillingGroupsOutput.fromJson(response);
}