Skip to content

delete_pricing_plan

delete_pricing_plan(
    arn: PricingPlanArn,
    *,
    config_overrides: Optional[billingconductorClientConfig] = None,
) -> DeletePricingPlanOutput

Deletes a pricing plan. The pricing plan must not be associated with any billing groups to delete successfully.

Parameters:

  • arn (PricingPlanArn) –

    The Amazon Resource Name (ARN) of the pricing plan that you're deleting.

Raises:

Source code in docs_src/capo_billingconductor/_services/billingconductor.py
def delete_pricing_plan(
    self,
    arn: "capo_billingconductor.types.pricing_plan_arn.PricingPlanArn",
    *,
    config_overrides: Optional[billingconductorClientConfig] = None,
) -> (
    "capo_billingconductor.types.delete_pricing_plan_output.DeletePricingPlanOutput"
):
    """<p>Deletes a pricing plan. The pricing plan must not be associated with any billing groups to delete successfully.</p>

    Args:
        arn: <p>The Amazon Resource Name (ARN) of the pricing plan that you're deleting. </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.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.delete_pricing_plan_input.DeletePricingPlanInput]",
    ) -> OperationResponse[
        "capo_billingconductor.types.delete_pricing_plan_output.DeletePricingPlanOutput"
    ]:
        import capo_billingconductor._operations.aws_billing_conductor.delete_pricing_plan

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeletePricingPlan")
    )
    input_: capo_billingconductor.types.delete_pricing_plan_input.DeletePricingPlanInput = {
        "arn": arn
    }

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