:doc:`XRay <../../xray>` / Client / update_indexing_rule

********************
update_indexing_rule
********************



.. py:method:: XRay.Client.update_indexing_rule(**kwargs)

  

  Modifies an indexing rule’s configuration.

   

  Indexing rules are used for determining the sampling rate for spans indexed from CloudWatch Logs. For more information, see `Transaction Search <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Transaction-Search.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/UpdateIndexingRule>`_  


  **Request Syntax**
  ::

    response = client.update_indexing_rule(
        Name='string',
        Rule={
            'Probabilistic': {
                'DesiredSamplingPercentage': 123.0
            }
        }
    )
    
  :type Name: string
  :param Name: **[REQUIRED]** 

    Name of the indexing rule to be updated.

    

  
  :type Rule: dict
  :param Rule: **[REQUIRED]** 

    Rule configuration to be updated.

    .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``Probabilistic``. 

  
    - **Probabilistic** *(dict) --* 

      Indexing rule configuration that is used to probabilistically sample traceIds.

      

    
      - **DesiredSamplingPercentage** *(float) --* **[REQUIRED]** 

        Configured sampling percentage of traceIds. Note that sampling can be subject to limits to ensure completeness of data.

        

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

    
    ::

      {
          'IndexingRule': {
              'Name': 'string',
              'ModifiedAt': datetime(2015, 1, 1),
              'Rule': {
                  'Probabilistic': {
                      'DesiredSamplingPercentage': 123.0,
                      'ActualSamplingPercentage': 123.0
                  }
              }
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **IndexingRule** *(dict) --* 

        Updated indexing rule.

        
        

        - **Name** *(string) --* 

          The name of the indexing rule.

          
        

        - **ModifiedAt** *(datetime) --* 

          Displays when the rule was last modified, in Unix time seconds.

          
        

        - **Rule** *(dict) --* 

          The indexing rule.

          .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``Probabilistic``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                    'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


        
          

          - **Probabilistic** *(dict) --* 

            Indexing rule configuration that is used to probabilistically sample traceIds.

            
            

            - **DesiredSamplingPercentage** *(float) --* 

              Configured sampling percentage of traceIds. Note that sampling can be subject to limits to ensure completeness of data.

              
            

            - **ActualSamplingPercentage** *(float) --* 

              Applied sampling percentage of traceIds.

              
        
      
    
  
  **Exceptions**
  
  *   :py:class:`XRay.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`XRay.Client.exceptions.ThrottledException`

  
  *   :py:class:`XRay.Client.exceptions.ResourceNotFoundException`

  