listBillEstimates method

Future<ListBillEstimatesResponse> listBillEstimates({
  1. FilterTimestamp? createdAtFilter,
  2. FilterTimestamp? expiresAtFilter,
  3. List<ListBillEstimatesFilter>? filters,
  4. int? maxResults,
  5. String? nextToken,
})

Lists all bill estimates for the account.

May throw DataUnavailableException.

Parameter createdAtFilter : Filter bill estimates based on the creation date.

Parameter expiresAtFilter : Filter bill estimates based on the expiration date.

Parameter filters : Filters to apply to the list of bill estimates.

Parameter maxResults : The maximum number of results to return per page.

Parameter nextToken : A token to retrieve the next page of results.

Implementation

Future<ListBillEstimatesResponse> listBillEstimates({
  FilterTimestamp? createdAtFilter,
  FilterTimestamp? expiresAtFilter,
  List<ListBillEstimatesFilter>? filters,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    25,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AWSBCMPricingCalculator.ListBillEstimates'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (createdAtFilter != null) 'createdAtFilter': createdAtFilter,
      if (expiresAtFilter != null) 'expiresAtFilter': expiresAtFilter,
      if (filters != null) 'filters': filters,
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
    },
  );

  return ListBillEstimatesResponse.fromJson(jsonResponse.body);
}