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

***********************
describe_index_policies
***********************



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

  

  Returns the field index policies of the specified log group. For more information about field index policies, see `PutIndexPolicy <https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutIndexPolicy.html>`__.

   

  If a specified log group has a log-group level index policy, that policy is returned by this operation.

   

  If a specified log group doesn't have a log-group level index policy, but an account-wide index policy applies to it, that account-wide policy is returned by this operation.

   

  To find information about only account-level policies, use `DescribeAccountPolicies <https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeAccountPolicies.html>`__ instead.

  

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


  **Request Syntax**
  ::

    response = client.describe_index_policies(
        logGroupIdentifiers=[
            'string',
        ],
        nextToken='string'
    )
    
  :type logGroupIdentifiers: list
  :param logGroupIdentifiers: **[REQUIRED]** 

    An array containing the name or ARN of the log group that you want to retrieve field index policies for.

    

  
    - *(string) --* 

    

  :type nextToken: string
  :param nextToken: 

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

    

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

    
    ::

      {
          'indexPolicies': [
              {
                  'logGroupIdentifier': 'string',
                  'lastUpdateTime': 123,
                  'policyDocument': 'string',
                  'policyName': 'string',
                  'source': 'ACCOUNT'|'LOG_GROUP'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **indexPolicies** *(list) --* 

        An array containing the field index policies.

        
        

        - *(dict) --* 

          This structure contains information about one field index policy in this account.

          
          

          - **logGroupIdentifier** *(string) --* 

            The ARN of the log group that this index policy applies to.

            
          

          - **lastUpdateTime** *(integer) --* 

            The date and time that this index policy was most recently updated.

            
          

          - **policyDocument** *(string) --* 

            The policy document for this index policy, in JSON format.

            
          

          - **policyName** *(string) --* 

            The name of this policy. Responses about log group-level field index policies don't have this field, because those policies don't have names.

            
          

          - **source** *(string) --* 

            This field indicates whether this is an account-level index policy or an index policy that applies only to a single log group.

            
      
    
      

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

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

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

  