create_pricing_rule
async
¶
create_pricing_rule(
name: PricingRuleName,
scope: PricingRuleScope,
type: PricingRuleType,
*,
config_overrides: Optional[AsyncbillingconductorClientConfig] = None,
client_token: Optional[ClientToken] = None,
description: Optional[PricingRuleDescription] = None,
modifier_percentage: Optional[ModifierPercentage] = None,
service: Optional[Service] = None,
tags: Optional[TagMap] = None,
billing_entity: Optional[BillingEntity] = None,
tiering: Optional[CreateTieringInput] = None,
usage_type: Optional[UsageType] = None,
operation: Optional[Operation] = None,
) -> CreatePricingRuleOutput
Creates a pricing rule can be associated to a pricing plan, or a set of pricing plans.
Parameters:
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier that you specify to ensure idempotency of the request. Idempotency ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries complete successfully without performing any further actions.
-
name(PricingRuleName) –The pricing rule name. The names must be unique to each pricing rule.
-
description(Optional[PricingRuleDescription], default:None) –The pricing rule description.
-
scope(PricingRuleScope) –The scope of pricing rule that indicates if it's globally applicable, or it's service-specific.
-
type(PricingRuleType) –The type of pricing rule.
-
modifier_percentage(Optional[ModifierPercentage], default:None) –A percentage modifier that's applied on the public pricing rates. Your entry will be rounded to the nearest 2 decimal places.
-
service(Optional[Service], default:None) –If the
Scopeattribute is set toSERVICEorSKU, the attribute indicates which service thePricingRuleis applicable for. -
tags(Optional[TagMap], default:None) –A map that contains tag keys and tag values that are attached to a pricing rule.
-
billing_entity(Optional[BillingEntity], default:None) –The seller of services provided by Amazon Web Services, their affiliates, or third-party providers selling services via Amazon Web Services Marketplace.
-
tiering(Optional[CreateTieringInput], default:None) –The set of tiering configurations for the pricing rule.
-
usage_type(Optional[UsageType], default:None) –Usage type is the unit that each service uses to measure the usage of a specific type of resource.
If the
Scopeattribute is set toSKU, this attribute indicates which usage type thePricingRuleis modifying. For example,USW2-BoxUsage:m2.2xlargedescribes anM2 High Memory Double Extra Largeinstance in the US West (Oregon) Region. -
operation(Optional[Operation], default:None) –Operation is the specific Amazon Web Services action covered by this line item. This describes the specific usage of the line item.
If the
Scopeattribute is set toSKU, this attribute indicates which operation thePricingRuleis modifying. For example, a value ofRunInstances:0202indicates the operation of running an Amazon EC2 instance.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ConflictException–You can cause an inconsistent state by updating or deleting a resource.
-
InternalServerException–An unexpected error occurred while processing a request.
-
ServiceLimitExceededException–The request would cause a service limit to exceed.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The input doesn't match with the constraints specified by Amazon Web Services services.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_billingconductor/_services/async_billingconductor.py
2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 | |