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

*****************
remove_permission
*****************



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

  

  Removes permissions from a profiling group's resource-based policy that are provided using an action group. The one supported action group that can be removed is ``agentPermission`` which grants ``ConfigureAgent`` and ``PostAgent`` permissions. For more information, see `Resource-based policies in CodeGuru Profiler <https://docs.aws.amazon.com/codeguru/latest/profiler-ug/resource-based-policies.html>`__ in the *Amazon CodeGuru Profiler User Guide*, `ConfigureAgent <https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_ConfigureAgent.html>`__, and `PostAgentProfile <https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_PostAgentProfile.html>`__.

  

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


  **Request Syntax**
  ::

    response = client.remove_permission(
        actionGroup='agentPermissions',
        profilingGroupName='string',
        revisionId='string'
    )
    
  :type actionGroup: string
  :param actionGroup: **[REQUIRED]** 

    Specifies an action group that contains the permissions to remove from a profiling group's resource-based policy. One action group is supported, ``agentPermissions``, which grants ``ConfigureAgent`` and ``PostAgentProfile`` permissions.

    

  
  :type profilingGroupName: string
  :param profilingGroupName: **[REQUIRED]** 

    The name of the profiling group.

    

  
  :type revisionId: string
  :param revisionId: **[REQUIRED]** 

    A universally unique identifier (UUID) for the revision of the resource-based policy from which you want to remove permissions.

    

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

    
    ::

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

    

    - *(dict) --* 

      The structure representing the ``removePermissionResponse``.

      
      

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

        The JSON-formatted resource-based policy on the profiling group after the specified permissions were removed.

        
      

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

        A universally unique identifier (UUID) for the revision of the resource-based policy after the specified permissions were removed. The updated JSON-formatted policy is in the ``policy`` element of the response.

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

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

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

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

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

  