describeSavingsPlans method
Describes the specified Savings Plans.
May throw InternalServerException.
May throw ValidationException.
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 savingsPlanArns :
The Amazon Resource Names (ARN) of the Savings Plans.
Parameter savingsPlanIds :
The IDs of the Savings Plans.
Parameter states :
The current states of the Savings Plans.
Implementation
Future<DescribeSavingsPlansResponse> describeSavingsPlans({
List<SavingsPlanFilter>? filters,
int? maxResults,
String? nextToken,
List<String>? savingsPlanArns,
List<String>? savingsPlanIds,
List<SavingsPlanState>? states,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final $payload = <String, dynamic>{
if (filters != null) 'filters': filters,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (savingsPlanArns != null) 'savingsPlanArns': savingsPlanArns,
if (savingsPlanIds != null) 'savingsPlanIds': savingsPlanIds,
if (states != null) 'states': states.map((e) => e.value).toList(),
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/DescribeSavingsPlans',
exceptionFnMap: _exceptionFns,
);
return DescribeSavingsPlansResponse.fromJson(response);
}