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

**************************
describe_resource_policies
**************************



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

  

  Lists the resource policies in this account.

  

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


  **Request Syntax**
  ::

    response = client.describe_resource_policies(
        nextToken='string',
        limit=123,
        resourceArn='string',
        policyScope='ACCOUNT'|'RESOURCE'
    )
    
  :type nextToken: string
  :param nextToken: 

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

    

  
  :type limit: integer
  :param limit: 

    The maximum number of resource policies to be displayed with one call of this API.

    

  
  :type resourceArn: string
  :param resourceArn: 

    The ARN of the CloudWatch Logs resource for which to query the resource policy.

    

  
  :type policyScope: string
  :param policyScope: 

    Specifies the scope of the resource policy. Valid values are ``ACCOUNT`` or ``RESOURCE``. When not specified, defaults to ``ACCOUNT``.

    

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

    
    ::

      {
          'resourcePolicies': [
              {
                  'policyName': 'string',
                  'policyDocument': 'string',
                  'lastUpdatedTime': 123,
                  'policyScope': 'ACCOUNT'|'RESOURCE',
                  'resourceArn': 'string',
                  'revisionId': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **resourcePolicies** *(list) --* 

        The resource policies that exist in this account.

        
        

        - *(dict) --* 

          A policy enabling one or more entities to put logs to a log group in this account.

          
          

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

            The name of the resource policy.

            
          

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

            The details of the policy.

            
          

          - **lastUpdatedTime** *(integer) --* 

            Timestamp showing when this policy was last updated, expressed as the number of milliseconds after ``Jan 1, 1970 00:00:00 UTC``.

            
          

          - **policyScope** *(string) --* 

            Specifies scope of the resource policy. Valid values are ACCOUNT or RESOURCE.

            
          

          - **resourceArn** *(string) --* 

            The ARN of the CloudWatch Logs resource to which the resource policy is attached. Only populated for resource-scoped policies.

            
          

          - **revisionId** *(string) --* 

            The revision ID of the resource policy. Only populated for resource-scoped policies.

            
      
    
      

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

  