describeSavingsPlansOfferings method

Future<DescribeSavingsPlansOfferingsResponse> describeSavingsPlansOfferings({
  1. List<CurrencyCode>? currencies,
  2. List<String>? descriptions,
  3. List<int>? durations,
  4. List<SavingsPlanOfferingFilterElement>? filters,
  5. int? maxResults,
  6. String? nextToken,
  7. List<String>? offeringIds,
  8. List<String>? operations,
  9. List<SavingsPlanPaymentOption>? paymentOptions,
  10. List<SavingsPlanType>? planTypes,
  11. SavingsPlanProductType? productType,
  12. List<String>? serviceCodes,
  13. List<String>? usageTypes,
})

Describes the specified Savings Plans offerings.

May throw ValidationException. May throw InternalServerException.

Parameter currencies : The currencies.

Parameter descriptions : The descriptions.

Parameter durations : The durations, in seconds.

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.

Parameter offeringIds : The IDs of the offerings.

Parameter operations : The specific AWS operation for the line item in the billing report.

Parameter paymentOptions : The payment options.

Parameter planTypes : The plan type.

Parameter productType : The product type.

Parameter serviceCodes : The services.

Parameter usageTypes : The usage details of the line item in the billing report.

Implementation

Future<DescribeSavingsPlansOfferingsResponse> describeSavingsPlansOfferings({
  List<CurrencyCode>? currencies,
  List<String>? descriptions,
  List<int>? durations,
  List<SavingsPlanOfferingFilterElement>? filters,
  int? maxResults,
  String? nextToken,
  List<String>? offeringIds,
  List<String>? operations,
  List<SavingsPlanPaymentOption>? paymentOptions,
  List<SavingsPlanType>? planTypes,
  SavingsPlanProductType? productType,
  List<String>? serviceCodes,
  List<String>? usageTypes,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    1000,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    0,
    1024,
  );
  final $payload = <String, dynamic>{
    if (currencies != null)
      'currencies': currencies.map((e) => e.toValue()).toList(),
    if (descriptions != null) 'descriptions': descriptions,
    if (durations != null) 'durations': durations,
    if (filters != null) 'filters': filters,
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
    if (offeringIds != null) 'offeringIds': offeringIds,
    if (operations != null) 'operations': operations,
    if (paymentOptions != null)
      'paymentOptions': paymentOptions.map((e) => e.toValue()).toList(),
    if (planTypes != null)
      'planTypes': planTypes.map((e) => e.toValue()).toList(),
    if (productType != null) 'productType': productType.toValue(),
    if (serviceCodes != null) 'serviceCodes': serviceCodes,
    if (usageTypes != null) 'usageTypes': usageTypes,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/DescribeSavingsPlansOfferings',
    exceptionFnMap: _exceptionFns,
  );
  return DescribeSavingsPlansOfferingsResponse.fromJson(response);
}