listPricingPlansAssociatedWithPricingRule method
Future<ListPricingPlansAssociatedWithPricingRuleOutput>
listPricingPlansAssociatedWithPricingRule({})
A list of the pricing plans that are associated with a pricing rule.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter pricingRuleArn :
The pricing rule Amazon Resource Name (ARN) for which associations will be
listed.
Parameter billingPeriod :
The pricing plan billing period for which associations will be listed.
Parameter maxResults :
The optional maximum number of pricing rule associations to retrieve.
Parameter nextToken :
The optional pagination token returned by a previous call.
Implementation
Future<ListPricingPlansAssociatedWithPricingRuleOutput>
listPricingPlansAssociatedWithPricingRule({
required String pricingRuleArn,
String? billingPeriod,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $payload = <String, dynamic>{
'PricingRuleArn': pricingRuleArn,
if (billingPeriod != null) 'BillingPeriod': billingPeriod,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/list-pricing-plans-associated-with-pricing-rule',
exceptionFnMap: _exceptionFns,
);
return ListPricingPlansAssociatedWithPricingRuleOutput.fromJson(response);
}