:doc:`Inspector2 <../../inspector2>` / Client / list_account_permissions

************************
list_account_permissions
************************



.. py:method:: Inspector2.Client.list_account_permissions(**kwargs)

  

  Lists the permissions an account has to configure Amazon Inspector. If the account is a member account or standalone account with resources managed by an Organizations policy, the operation returns fewer permissions.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/inspector2-2020-06-08/ListAccountPermissions>`_  


  **Request Syntax**
  ::

    response = client.list_account_permissions(
        service='EC2'|'ECR'|'LAMBDA',
        maxResults=123,
        nextToken='string'
    )
    
  :type service: string
  :param service: 

    The service scan type to check permissions for.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results the response can return. If your request would return more than the maximum the response will return a ``nextToken`` value, use this value when you call the action again to get the remaining results.

    

  
  :type nextToken: string
  :param nextToken: 

    A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. If your response returns more than the ``maxResults`` maximum value it will also return a ``nextToken`` value. For subsequent calls, use the NextToken value returned from the previous request to continue listing results after the first page.

    

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

    
    ::

      {
          'permissions': [
              {
                  'service': 'EC2'|'ECR'|'LAMBDA',
                  'operation': 'ENABLE_SCANNING'|'DISABLE_SCANNING'|'ENABLE_REPOSITORY'|'DISABLE_REPOSITORY'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **permissions** *(list) --* 

        Contains details on the permissions an account has to configure Amazon Inspector.

        
        

        - *(dict) --* 

          Contains information on the permissions an account has within Amazon Inspector.

          
          

          - **service** *(string) --* 

            The services that the permissions allow an account to perform the given operations for.

            
          

          - **operation** *(string) --* 

            The operations that can be performed with the given permissions.

            
      
    
      

      - **nextToken** *(string) --* 

        A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the ``NextToken`` value returned from the previous request to continue listing results after the first page.

        
  
  **Exceptions**
  
  *   :py:class:`Inspector2.Client.exceptions.ValidationException`

  
  *   :py:class:`Inspector2.Client.exceptions.AccessDeniedException`

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

  
  *   :py:class:`Inspector2.Client.exceptions.InternalServerException`

  