listCustomLineItems method

Future<ListCustomLineItemsOutput> listCustomLineItems({
  1. String? billingPeriod,
  2. ListCustomLineItemsFilter? filters,
  3. int? maxResults,
  4. String? nextToken,
})

A paginated call to get a list of all custom line items (FFLIs) for the given billing period. If you don't provide a billing period, 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 custom line items (FFLIs).

Parameter filters : A ListCustomLineItemsFilter that specifies the custom line item names and/or billing group Amazon Resource Names (ARNs) to retrieve FFLI information.

Parameter maxResults : The maximum number of billing groups to retrieve.

Parameter nextToken : The pagination token that's used on subsequent calls to get custom line items (FFLIs).

Implementation

Future<ListCustomLineItemsOutput> listCustomLineItems({
  String? billingPeriod,
  ListCustomLineItemsFilter? 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-custom-line-items',
    exceptionFnMap: _exceptionFns,
  );
  return ListCustomLineItemsOutput.fromJson(response);
}