:doc:`IoTSiteWise <../../iotsitewise>` / Client / list_access_policies

********************
list_access_policies
********************



.. py:method:: IoTSiteWise.Client.list_access_policies(**kwargs)

  

  Retrieves a paginated list of access policies for an identity (an IAM Identity Center user, an IAM Identity Center group, or an IAM user) or an IoT SiteWise Monitor resource (a portal or project).

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iotsitewise-2019-12-02/ListAccessPolicies>`_  


  **Request Syntax**
  ::

    response = client.list_access_policies(
        identityType='USER'|'GROUP'|'IAM',
        identityId='string',
        resourceType='PORTAL'|'PROJECT',
        resourceId='string',
        iamArn='string',
        nextToken='string',
        maxResults=123
    )
    
  :type identityType: string
  :param identityType: 

    The type of identity (IAM Identity Center user, IAM Identity Center group, or IAM user). This parameter is required if you specify ``identityId``.

    

  
  :type identityId: string
  :param identityId: 

    The ID of the identity. This parameter is required if you specify ``USER`` or ``GROUP`` for ``identityType``.

    

  
  :type resourceType: string
  :param resourceType: 

    The type of resource (portal or project). This parameter is required if you specify ``resourceId``.

    

  
  :type resourceId: string
  :param resourceId: 

    The ID of the resource. This parameter is required if you specify ``resourceType``.

    

  
  :type iamArn: string
  :param iamArn: 

    The ARN of the IAM user. For more information, see `IAM ARNs <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html>`__ in the *IAM User Guide*. This parameter is required if you specify ``IAM`` for ``identityType``.

    

  
  :type nextToken: string
  :param nextToken: 

    The token to be used for the next set of paginated results.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to return for each paginated request.

     

    Default: 50

    

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

    
    ::

      {
          'accessPolicySummaries': [
              {
                  'id': 'string',
                  'identity': {
                      'user': {
                          'id': 'string'
                      },
                      'group': {
                          'id': 'string'
                      },
                      'iamUser': {
                          'arn': 'string'
                      },
                      'iamRole': {
                          'arn': 'string'
                      }
                  },
                  'resource': {
                      'portal': {
                          'id': 'string'
                      },
                      'project': {
                          'id': 'string'
                      }
                  },
                  'permission': 'ADMINISTRATOR'|'VIEWER',
                  'creationDate': datetime(2015, 1, 1),
                  'lastUpdateDate': datetime(2015, 1, 1)
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **accessPolicySummaries** *(list) --* 

        A list that summarizes each access policy.

        
        

        - *(dict) --* 

          Contains an access policy that defines an identity's access to an IoT SiteWise Monitor resource.

          
          

          - **id** *(string) --* 

            The ID of the access policy.

            
          

          - **identity** *(dict) --* 

            The identity (an IAM Identity Center user, an IAM Identity Center group, or an IAM user).

            
            

            - **user** *(dict) --* 

              An IAM Identity Center user identity.

              
              

              - **id** *(string) --* 

                The IAM Identity Center ID of the user.

                
          
            

            - **group** *(dict) --* 

              An IAM Identity Center group identity.

              
              

              - **id** *(string) --* 

                The IAM Identity Center ID of the group.

                
          
            

            - **iamUser** *(dict) --* 

              An IAM user identity.

              
              

              - **arn** *(string) --* 

                The ARN of the IAM user. For more information, see `IAM ARNs <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html>`__ in the *IAM User Guide*.

                 

                .. note::

                  

                  If you delete the IAM user, access policies that contain this identity include an empty ``arn``. You can delete the access policy for the IAM user that no longer exists.

                  

                
          
            

            - **iamRole** *(dict) --* 

              An IAM role identity.

              
              

              - **arn** *(string) --* 

                The ARN of the IAM role. For more information, see `IAM ARNs <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html>`__ in the *IAM User Guide*.

                
          
        
          

          - **resource** *(dict) --* 

            The IoT SiteWise Monitor resource (a portal or project).

            
            

            - **portal** *(dict) --* 

              A portal resource.

              
              

              - **id** *(string) --* 

                The ID of the portal.

                
          
            

            - **project** *(dict) --* 

              A project resource.

              
              

              - **id** *(string) --* 

                The ID of the project.

                
          
        
          

          - **permission** *(string) --* 

            The permissions for the access policy. Note that a project ``ADMINISTRATOR`` is also known as a project owner.

            
          

          - **creationDate** *(datetime) --* 

            The date the access policy was created, in Unix epoch time.

            
          

          - **lastUpdateDate** *(datetime) --* 

            The date the access policy was last updated, in Unix epoch time.

            
      
    
      

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

        The token for the next set of results, or null if there are no additional results.

        
  
  **Exceptions**
  
  *   :py:class:`IoTSiteWise.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`IoTSiteWise.Client.exceptions.InternalFailureException`

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

  