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

******************
get_indexing_rules
******************



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

  

  Retrieves all indexing rules.

   

  Indexing rules are used to determine the server-side sampling rate for spans ingested through the CloudWatchLogs destination and indexed by X-Ray. 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/GetIndexingRules>`_  


  **Request Syntax**
  ::

    response = client.get_indexing_rules(
        NextToken='string'
    )
    
  :type NextToken: string
  :param NextToken: 

    Specify the pagination token returned by a previous request to retrieve the next page of indexes.

    

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

    
    ::

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

    

    - *(dict) --* 
      

      - **IndexingRules** *(list) --* 

        Retrieves all indexing rules.

        
        

        - *(dict) --* 

          Rule used to determine the server-side sampling rate for spans ingested through the CloudWatchLogs destination and indexed by X-Ray.

          
          

          - **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.

                
          
        
      
    
      

      - **NextToken** *(string) --* 

        Specify the pagination token returned by a previous request to retrieve the next page of indexes.

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

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

  