listPricingRulesAssociatedToPricingPlan method
Lists the pricing rules that are associated with a pricing plan.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter pricingPlanArn :
The Amazon Resource Name (ARN) of the pricing plan for which associations
are to be listed.
Parameter billingPeriod :
The billing period for which the pricing rule associations are to 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<ListPricingRulesAssociatedToPricingPlanOutput>
listPricingRulesAssociatedToPricingPlan({
required String pricingPlanArn,
String? billingPeriod,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $payload = <String, dynamic>{
'PricingPlanArn': pricingPlanArn,
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-rules-associated-to-pricing-plan',
exceptionFnMap: _exceptionFns,
);
return ListPricingRulesAssociatedToPricingPlanOutput.fromJson(response);
}