:doc:`AccessAnalyzer <../../accessanalyzer>` / Client / list_access_previews

********************
list_access_previews
********************



.. py:method:: AccessAnalyzer.Client.list_access_previews(**kwargs)

  

  Retrieves a list of access previews for the specified analyzer.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListAccessPreviews>`_  


  **Request Syntax**
  ::

    response = client.list_access_previews(
        analyzerArn='string',
        nextToken='string',
        maxResults=123
    )
    
  :type analyzerArn: string
  :param analyzerArn: **[REQUIRED]** 

    The `ARN of the analyzer <https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html#permission-resources>`__ used to generate the access preview.

    

  
  :type nextToken: string
  :param nextToken: 

    A token used for pagination of results returned.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to return in the response.

    

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

    
    ::

      {
          'accessPreviews': [
              {
                  'id': 'string',
                  'analyzerArn': 'string',
                  'createdAt': datetime(2015, 1, 1),
                  'status': 'COMPLETED'|'CREATING'|'FAILED',
                  'statusReason': {
                      'code': 'INTERNAL_ERROR'|'INVALID_CONFIGURATION'
                  }
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **accessPreviews** *(list) --* 

        A list of access previews retrieved for the analyzer.

        
        

        - *(dict) --* 

          Contains a summary of information about an access preview.

          
          

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

            The unique ID for the access preview.

            
          

          - **analyzerArn** *(string) --* 

            The ARN of the analyzer used to generate the access preview.

            
          

          - **createdAt** *(datetime) --* 

            The time at which the access preview was created.

            
          

          - **status** *(string) --* 

            The status of the access preview.

             

            
            * ``Creating`` - The access preview creation is in progress.
             
            * ``Completed`` - The access preview is complete and previews the findings for external access to the resource.
             
            * ``Failed`` - The access preview creation has failed.
            

            
          

          - **statusReason** *(dict) --* 

            Provides more details about the current status of the access preview. For example, if the creation of the access preview fails, a ``Failed`` status is returned. This failure can be due to an internal issue with the analysis or due to an invalid proposed resource configuration.

            
            

            - **code** *(string) --* 

              The reason code for the current status of the access preview.

              
        
      
    
      

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

        A token used for pagination of results returned.

        
  
  **Exceptions**
  
  *   :py:class:`AccessAnalyzer.Client.exceptions.ResourceNotFoundException`

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

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

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

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

  