:doc:`CloudWatchLogs <../../logs>` / Client / describe_subscription_filters

*****************************
describe_subscription_filters
*****************************



.. py:method:: CloudWatchLogs.Client.describe_subscription_filters(**kwargs)

  

  Lists the subscription filters for the specified log group. You can list all the subscription filters or filter the results by prefix. The results are ASCII-sorted by filter name.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeSubscriptionFilters>`_  


  **Request Syntax**
  ::

    response = client.describe_subscription_filters(
        logGroupName='string',
        filterNamePrefix='string',
        nextToken='string',
        limit=123
    )
    
  :type logGroupName: string
  :param logGroupName: **[REQUIRED]** 

    The name of the log group.

    

  
  :type filterNamePrefix: string
  :param filterNamePrefix: 

    The prefix to match. If you don't specify a value, no prefix filter is applied.

    

  
  :type nextToken: string
  :param nextToken: 

    The token for the next set of items to return. (You received this token from a previous call.)

    

  
  :type limit: integer
  :param limit: 

    The maximum number of items returned. If you don't specify a value, the default is up to 50 items.

    

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

    
    ::

      {
          'subscriptionFilters': [
              {
                  'filterName': 'string',
                  'logGroupName': 'string',
                  'filterPattern': 'string',
                  'destinationArn': 'string',
                  'roleArn': 'string',
                  'distribution': 'Random'|'ByLogStream',
                  'applyOnTransformedLogs': True|False,
                  'creationTime': 123,
                  'fieldSelectionCriteria': 'string',
                  'emitSystemFields': [
                      'string',
                  ]
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **subscriptionFilters** *(list) --* 

        The subscription filters.

        
        

        - *(dict) --* 

          Represents a subscription filter.

          
          

          - **filterName** *(string) --* 

            The name of the subscription filter.

            
          

          - **logGroupName** *(string) --* 

            The name of the log group.

            
          

          - **filterPattern** *(string) --* 

            A symbolic description of how CloudWatch Logs should interpret the data in each log event. For example, a log event can contain timestamps, IP addresses, strings, and so on. You use the filter pattern to specify what to look for in the log event message.

            
          

          - **destinationArn** *(string) --* 

            The Amazon Resource Name (ARN) of the destination.

            
          

          - **roleArn** *(string) --* 
          

          - **distribution** *(string) --* 

            The method used to distribute log data to the destination, which can be either random or grouped by log stream.

            
          

          - **applyOnTransformedLogs** *(boolean) --* 

            This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see `PutTransformer <https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutTransformer.html>`__.

             

            If this value is ``true``, the subscription filter is applied on the transformed version of the log events instead of the original ingested log events.

            
          

          - **creationTime** *(integer) --* 

            The creation time of the subscription filter, expressed as the number of milliseconds after ``Jan 1, 1970 00:00:00 UTC``.

            
          

          - **fieldSelectionCriteria** *(string) --* 

            The filter expression that specifies which log events are processed by this subscription filter based on system fields. Returns the ``fieldSelectionCriteria`` value if it was specified when the subscription filter was created.

            
          

          - **emitSystemFields** *(list) --* 

            The list of system fields that are included in the log events sent to the subscription destination. Returns the ``emitSystemFields`` value if it was specified when the subscription filter was created.

            
            

            - *(string) --* 
        
      
    
      

      - **nextToken** *(string) --* 

        The token for the next set of items to return. The token expires after 24 hours.

        
  
  **Exceptions**
  
  *   :py:class:`CloudWatchLogs.Client.exceptions.InvalidParameterException`

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

  
  *   :py:class:`CloudWatchLogs.Client.exceptions.ServiceUnavailableException`

  