Skip to content

list_pricing_rules_associated_to_pricing_plan

list_pricing_rules_associated_to_pricing_plan(
    pricing_plan_arn: PricingPlanArn,
    *,
    config_overrides: Optional[billingconductorClientConfig] = None,
    billing_period: Optional[BillingPeriod] = None,
    max_results: Optional[MaxPricingPlanResults] = None,
    next_token: Optional[Token] = None,
) -> ListPricingRulesAssociatedToPricingPlanOutput

Lists the pricing rules that are associated with a pricing plan.

Parameters:

  • billing_period (Optional[BillingPeriod], default: None ) –

    The billing period for which the pricing rule associations are to be listed.

  • pricing_plan_arn (PricingPlanArn) –

    The Amazon Resource Name (ARN) of the pricing plan for which associations are to be listed.

  • max_results (Optional[MaxPricingPlanResults], default: None ) –

    The optional maximum number of pricing rule associations to retrieve.

  • next_token (Optional[Token], default: None ) –

    The optional pagination token returned by a previous call.

Raises:

Source code in docs_src/capo_billingconductor/_services/billingconductor.py
def list_pricing_rules_associated_to_pricing_plan(
    self,
    pricing_plan_arn: "capo_billingconductor.types.pricing_plan_arn.PricingPlanArn",
    *,
    config_overrides: Optional[billingconductorClientConfig] = None,
    billing_period: Optional[
        "capo_billingconductor.types.billing_period.BillingPeriod"
    ] = None,
    max_results: Optional[
        "capo_billingconductor.types.max_pricing_plan_results.MaxPricingPlanResults"
    ] = None,
    next_token: Optional["capo_billingconductor.types.token.Token"] = None,
) -> "capo_billingconductor.types.list_pricing_rules_associated_to_pricing_plan_output.ListPricingRulesAssociatedToPricingPlanOutput":
    """<p> Lists the pricing rules that are associated with a pricing plan. </p>

    Args:
        billing_period: <p> The billing period for which the pricing rule associations are to be listed. </p>
        pricing_plan_arn: <p> The Amazon Resource Name (ARN) of the pricing plan for which associations are to be listed.</p>
        max_results: <p>The optional maximum number of pricing rule associations to retrieve.</p>
        next_token: <p> The optional pagination token returned by a previous call. </p>

    Raises:
        capo_billingconductor.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action. </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.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.
    """

    def _handler(
        req: "OperationRequest[capo_billingconductor.types.list_pricing_rules_associated_to_pricing_plan_input.ListPricingRulesAssociatedToPricingPlanInput]",
    ) -> OperationResponse[
        "capo_billingconductor.types.list_pricing_rules_associated_to_pricing_plan_output.ListPricingRulesAssociatedToPricingPlanOutput"
    ]:
        import capo_billingconductor._operations.aws_billing_conductor.list_pricing_rules_associated_to_pricing_plan

        output, http_response = (
            capo_billingconductor._operations.aws_billing_conductor.list_pricing_rules_associated_to_pricing_plan.list_pricing_rules_associated_to_pricing_plan(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListPricingRulesAssociatedToPricingPlan"),
    )
    input_: capo_billingconductor.types.list_pricing_rules_associated_to_pricing_plan_input.ListPricingRulesAssociatedToPricingPlanInput = {
        "pricing_plan_arn": pricing_plan_arn
    }
    if billing_period is not None:
        input_["billing_period"] = billing_period
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output