getFreeTierUsage method

Future<GetFreeTierUsageResponse> getFreeTierUsage({
  1. Expression? filter,
  2. int? maxResults,
  3. String? nextToken,
})

Returns a list of all Free Tier usage objects that match your filters.

May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter filter : An expression that specifies the conditions that you want each FreeTierUsage object to meet.

Parameter maxResults : The maximum number of results to return in the response. MaxResults means that there can be up to the specified number of values, but there might be fewer results based on your filters.

Parameter nextToken : The pagination token that indicates the next set of results to retrieve.

Implementation

Future<GetFreeTierUsageResponse> getFreeTierUsage({
  Expression? filter,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AWSFreeTierService.GetFreeTierUsage'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (filter != null) 'filter': filter,
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
    },
  );

  return GetFreeTierUsageResponse.fromJson(jsonResponse.body);
}