describeSavingsPlanRates method

Future<DescribeSavingsPlanRatesResponse> describeSavingsPlanRates({
  1. required String savingsPlanId,
  2. List<SavingsPlanRateFilter>? filters,
  3. int? maxResults,
  4. String? nextToken,
})

Describes the specified Savings Plans rates.

May throw ResourceNotFoundException. May throw ValidationException.

Parameter savingsPlanId : The ID of the Savings Plan.

Parameter filters : The filters.

Parameter maxResults : The maximum number of results to return with a single call. To retrieve additional results, make another call with the returned token value.

Parameter nextToken : The token for the next page of results.

Implementation

Future<DescribeSavingsPlanRatesResponse> describeSavingsPlanRates({
  required String savingsPlanId,
  List<SavingsPlanRateFilter>? filters,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(savingsPlanId, 'savingsPlanId');
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    0,
    1024,
  );
  final $payload = <String, dynamic>{
    'savingsPlanId': savingsPlanId,
    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: '/DescribeSavingsPlanRates',
    exceptionFnMap: _exceptionFns,
  );
  return DescribeSavingsPlanRatesResponse.fromJson(response);
}