:doc:`MailManager <../../mailmanager>` / Client / list_archive_searches

*********************
list_archive_searches
*********************



.. py:method:: MailManager.Client.list_archive_searches(**kwargs)

  

  Returns a list of email archive search jobs.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mailmanager-2023-10-17/ListArchiveSearches>`_  


  **Request Syntax**
  ::

    response = client.list_archive_searches(
        ArchiveId='string',
        NextToken='string',
        PageSize=123
    )
    
  :type ArchiveId: string
  :param ArchiveId: **[REQUIRED]** 

    The identifier of the archive.

    

  
  :type NextToken: string
  :param NextToken: 

    If NextToken is returned, there are more results available. The value of NextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.

    

  
  :type PageSize: integer
  :param PageSize: 

    The maximum number of archive search jobs that are returned per call. You can use NextToken to obtain further pages of archives.

    

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

    
    ::

      {
          'Searches': [
              {
                  'SearchId': 'string',
                  'Status': {
                      'SubmissionTimestamp': datetime(2015, 1, 1),
                      'CompletionTimestamp': datetime(2015, 1, 1),
                      'State': 'QUEUED'|'RUNNING'|'COMPLETED'|'FAILED'|'CANCELLED',
                      'ErrorMessage': 'string'
                  }
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      The response containing a list of archive search jobs and their statuses.

      
      

      - **Searches** *(list) --* 

        The list of search job identifiers and statuses.

        
        

        - *(dict) --* 

          Summary details of an archive search job.

          
          

          - **SearchId** *(string) --* 

            The unique identifier of the search job.

            
          

          - **Status** *(dict) --* 

            The current status of the search job.

            
            

            - **SubmissionTimestamp** *(datetime) --* 

              The timestamp of when the search was submitted.

              
            

            - **CompletionTimestamp** *(datetime) --* 

              The timestamp of when the search completed (if finished).

              
            

            - **State** *(string) --* 

              The current state of the search job.

              
            

            - **ErrorMessage** *(string) --* 

              An error message if the search failed.

              
        
      
    
      

      - **NextToken** *(string) --* 

        If present, use to retrieve the next page of results.

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

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

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

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

  