Connects an array of PricingRuleArns to a defined PricingPlan. The maximum number PricingRuleArn that can be associated in one call is 30.
Parameters:
Raises:
Source code in docs_src/capo_billingconductor/_services/async_billingconductor.py
| async def associate_pricing_rules(
self,
arn: "capo_billingconductor.types.pricing_plan_arn.PricingPlanArn",
pricing_rule_arns: "capo_billingconductor.types.pricing_rule_arns_non_empty_input.PricingRuleArnsNonEmptyInput",
*,
config_overrides: Optional[AsyncbillingconductorClientConfig] = None,
) -> "capo_billingconductor.types.associate_pricing_rules_output.AssociatePricingRulesOutput":
"""<p>Connects an array of <code>PricingRuleArns</code> to a defined <code>PricingPlan</code>. The maximum number <code>PricingRuleArn</code> that can be associated in one call is 30. </p>
Args:
arn: <p> The <code>PricingPlanArn</code> that the <code>PricingRuleArns</code> are associated with. </p>
pricing_rule_arns: <p> The <code>PricingRuleArns</code> that are associated with the Pricing Plan. </p>
Raises:
capo_billingconductor.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action. </p>
capo_billingconductor.errors.conflict_exception.ConflictException: <p>You can cause an inconsistent state by updating or deleting a resource. </p>
capo_billingconductor.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred while processing a request. </p>
capo_billingconductor.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource that doesn't exist. </p>
capo_billingconductor.errors.service_limit_exceeded_exception.ServiceLimitExceededException: <p>The request would cause a service limit to exceed. </p>
capo_billingconductor.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. </p>
capo_billingconductor.errors.validation_exception.ValidationException: <p>The input doesn't match with the constraints specified by Amazon Web Services services.</p>
capo_billingconductor.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_billingconductor.types.associate_pricing_rules_input.AssociatePricingRulesInput]",
) -> AsyncOperationResponse[
"capo_billingconductor.types.associate_pricing_rules_output.AssociatePricingRulesOutput"
]:
import capo_billingconductor._operations.aws_billing_conductor.associate_pricing_rules
(
output,
http_response,
) = await capo_billingconductor._operations.aws_billing_conductor.associate_pricing_rules.async_associate_pricing_rules(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AssociatePricingRules")
)
input_: capo_billingconductor.types.associate_pricing_rules_input.AssociatePricingRulesInput = {
"arn": arn,
"pricing_rule_arns": pricing_rule_arns,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|