listLongTermPricing method

Future<ListLongTermPricingResult> listLongTermPricing({
  1. int? maxResults,
  2. String? nextToken,
})

Lists all long-term pricing types.

May throw InvalidNextTokenException. May throw InvalidResourceException.

Parameter maxResults : The maximum number of ListLongTermPricing objects to return.

Parameter nextToken : Because HTTP requests are stateless, this is the starting point for your next list of ListLongTermPricing to return.

Implementation

Future<ListLongTermPricingResult> listLongTermPricing({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSIESnowballJobManagementService.ListLongTermPricing'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListLongTermPricingResult.fromJson(jsonResponse.body);
}