:doc:`Kinesis <../../kinesis>` / Client / get_resource_policy

*******************
get_resource_policy
*******************



.. py:method:: Kinesis.Client.get_resource_policy(**kwargs)

  

  Returns a policy attached to the specified data stream or consumer. Request patterns can be one of the following:

   

  
  * Data stream pattern: ``arn:aws.*:kinesis:.*:\d{12}:.*stream/\S+``
   
  * Consumer pattern: ``^(arn):aws.*:kinesis:.*:\d{12}:.*stream\/[a-zA-Z0-9_.-]+\/consumer\/[a-zA-Z0-9_.-]+:[0-9]+``
  

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/GetResourcePolicy>`_  


  **Request Syntax**
  ::

    response = client.get_resource_policy(
        ResourceARN='string',
        StreamId='string'
    )
    
  :type ResourceARN: string
  :param ResourceARN: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the data stream or consumer.

    

  
  :type StreamId: string
  :param StreamId: 

    Not Implemented. Reserved for future use.

    

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

    
    ::

      {
          'Policy': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Policy** *(string) --* 

        Details of the resource policy. This is formatted as a JSON string.

        
  
  **Exceptions**
  
  *   :py:class:`Kinesis.Client.exceptions.AccessDeniedException`

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

  
  *   :py:class:`Kinesis.Client.exceptions.LimitExceededException`

  
  *   :py:class:`Kinesis.Client.exceptions.InvalidArgumentException`

  
  *   :py:class:`Kinesis.Client.exceptions.ResourceInUseException`

  