:doc:`CodeGuruProfiler <../../codeguruprofiler>` / Client / get_policy

**********
get_policy
**********



.. py:method:: CodeGuruProfiler.Client.get_policy(**kwargs)

  

  Returns the JSON-formatted resource-based policy on a profiling group.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/GetPolicy>`_  


  **Request Syntax**
  ::

    response = client.get_policy(
        profilingGroupName='string'
    )
    
  :type profilingGroupName: string
  :param profilingGroupName: **[REQUIRED]** 

    The name of the profiling group.

    

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

    
    ::

      {
          'policy': 'string',
          'revisionId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      The structure representing the ``getPolicyResponse``.

      
      

      - **policy** *(string) --* 

        The JSON-formatted resource-based policy attached to the ``ProfilingGroup``.

        
      

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

        A unique identifier for the current revision of the returned policy.

        
  
  **Exceptions**
  
  *   :py:class:`CodeGuruProfiler.Client.exceptions.InternalServerException`

  
  *   :py:class:`CodeGuruProfiler.Client.exceptions.ThrottlingException`

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

  