listPricingRules method
Describes a pricing rule that can be associated to a pricing plan, or set of pricing plans.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter billingPeriod :
The preferred billing period to get the pricing plan.
Parameter filters :
A DescribePricingRuleFilter that specifies the Amazon
Resource Name (ARNs) of pricing rules to retrieve pricing rules
information.
Parameter maxResults :
The maximum number of pricing rules to retrieve.
Parameter nextToken :
The pagination token that's used on subsequent call to get pricing rules.
Implementation
Future<ListPricingRulesOutput> listPricingRules({
String? billingPeriod,
ListPricingRulesFilter? filters,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $payload = <String, dynamic>{
if (billingPeriod != null) 'BillingPeriod': billingPeriod,
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: '/list-pricing-rules',
exceptionFnMap: _exceptionFns,
);
return ListPricingRulesOutput.fromJson(response);
}