:doc:`BillingConductor <../../billingconductor>` / Client / create_pricing_rule

*******************
create_pricing_rule
*******************



.. py:method:: BillingConductor.Client.create_pricing_rule(**kwargs)

  

  Creates a pricing rule can be associated to a pricing plan, or a set of pricing plans.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/billingconductor-2021-07-30/CreatePricingRule>`_  


  **Request Syntax**
  ::

    response = client.create_pricing_rule(
        ClientToken='string',
        Name='string',
        Description='string',
        Scope='GLOBAL'|'SERVICE'|'BILLING_ENTITY'|'SKU',
        Type='MARKUP'|'DISCOUNT'|'TIERING',
        ModifierPercentage=123.0,
        Service='string',
        Tags={
            'string': 'string'
        },
        BillingEntity='string',
        Tiering={
            'FreeTier': {
                'Activated': True|False
            }
        },
        UsageType='string',
        Operation='string'
    )
    
  :type ClientToken: string
  :param ClientToken: 

    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.

    This field is autopopulated if not provided.

  
  :type Name: string
  :param Name: **[REQUIRED]** 

    The pricing rule name. The names must be unique to each pricing rule.

    

  
  :type Description: string
  :param Description: 

    The pricing rule description.

    

  
  :type Scope: string
  :param Scope: **[REQUIRED]** 

    The scope of pricing rule that indicates if it's globally applicable, or it's service-specific.

    

  
  :type Type: string
  :param Type: **[REQUIRED]** 

    The type of pricing rule.

    

  
  :type ModifierPercentage: float
  :param ModifierPercentage: 

    A percentage modifier that's applied on the public pricing rates. Your entry will be rounded to the nearest 2 decimal places.

    

  
  :type Service: string
  :param Service: 

    If the ``Scope`` attribute is set to ``SERVICE`` or ``SKU``, the attribute indicates which service the ``PricingRule`` is applicable for.

    

  
  :type Tags: dict
  :param Tags: 

    A map that contains tag keys and tag values that are attached to a pricing rule.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  :type BillingEntity: string
  :param BillingEntity: 

    The seller of services provided by Amazon Web Services, their affiliates, or third-party providers selling services via Amazon Web Services Marketplace.

    

  
  :type Tiering: dict
  :param Tiering: 

    The set of tiering configurations for the pricing rule.

    

  
    - **FreeTier** *(dict) --* **[REQUIRED]** 

      The possible Amazon Web Services Free Tier configurations.

      

    
      - **Activated** *(boolean) --* **[REQUIRED]** 

        Activate or deactivate Amazon Web Services Free Tier.

        

      
    
  
  :type UsageType: string
  :param UsageType: 

    Usage type is the unit that each service uses to measure the usage of a specific type of resource.

     

    If the ``Scope`` attribute is set to ``SKU``, this attribute indicates which usage type the ``PricingRule`` is modifying. For example, ``USW2-BoxUsage:m2.2xlarge`` describes an `` M2 High Memory Double Extra Large`` instance in the US West (Oregon) Region.

    

  
  :type Operation: string
  :param Operation: 

    Operation is the specific Amazon Web Services action covered by this line item. This describes the specific usage of the line item.

     

    If the ``Scope`` attribute is set to ``SKU``, this attribute indicates which operation the ``PricingRule`` is modifying. For example, a value of ``RunInstances:0202`` indicates the operation of running an Amazon EC2 instance.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'Arn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Arn** *(string) --* 

        The Amazon Resource Name (ARN) of the created pricing rule.

        
  
  **Exceptions**
  
  *   :py:class:`BillingConductor.Client.exceptions.ConflictException`

  
  *   :py:class:`BillingConductor.Client.exceptions.ThrottlingException`

  
  *   :py:class:`BillingConductor.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`BillingConductor.Client.exceptions.ValidationException`

  
  *   :py:class:`BillingConductor.Client.exceptions.ServiceLimitExceededException`

  
  *   :py:class:`BillingConductor.Client.exceptions.InternalServerException`

  