:doc:`BackupSearch <../../backupsearch>` / Client / list_search_jobs

****************
list_search_jobs
****************



.. py:method:: BackupSearch.Client.list_search_jobs(**kwargs)

  

  This operation returns a list of search jobs belonging to an account.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/backupsearch-2018-05-10/ListSearchJobs>`_  


  **Request Syntax**
  ::

    response = client.list_search_jobs(
        ByStatus='RUNNING'|'COMPLETED'|'STOPPING'|'STOPPED'|'FAILED',
        NextToken='string',
        MaxResults=123
    )
    
  :type ByStatus: string
  :param ByStatus: 

    Include this parameter to filter list by search job status.

    

  
  :type NextToken: string
  :param NextToken: 

    The next item following a partial list of returned search jobs.

     

    For example, if a request is made to return ``MaxResults`` number of backups, ``NextToken`` allows you to return more items in your list starting at the location pointed to by the next token.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of resource list items to be returned.

    

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

    
    ::

      {
          'SearchJobs': [
              {
                  'SearchJobIdentifier': 'string',
                  'SearchJobArn': 'string',
                  'Name': 'string',
                  'Status': 'RUNNING'|'COMPLETED'|'STOPPING'|'STOPPED'|'FAILED',
                  'CreationTime': datetime(2015, 1, 1),
                  'CompletionTime': datetime(2015, 1, 1),
                  'SearchScopeSummary': {
                      'TotalRecoveryPointsToScanCount': 123,
                      'TotalItemsToScanCount': 123
                  },
                  'StatusMessage': 'string'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **SearchJobs** *(list) --* 

        The search jobs among the list, with details of the returned search jobs.

        
        

        - *(dict) --* 

          This is information pertaining to a search job.

          
          

          - **SearchJobIdentifier** *(string) --* 

            The unique string that specifies the search job.

            
          

          - **SearchJobArn** *(string) --* 

            The unique string that identifies the Amazon Resource Name (ARN) of the specified search job.

            
          

          - **Name** *(string) --* 

            This is the name of the search job.

            
          

          - **Status** *(string) --* 

            This is the status of the search job.

            
          

          - **CreationTime** *(datetime) --* 

            This is the creation time of the search job.

            
          

          - **CompletionTime** *(datetime) --* 

            This is the completion time of the search job.

            
          

          - **SearchScopeSummary** *(dict) --* 

            Returned summary of the specified search job scope, including:

             

            
            * TotalBackupsToScanCount, the number of recovery points returned by the search.
             
            * TotalItemsToScanCount, the number of items returned by the search.
            

            
            

            - **TotalRecoveryPointsToScanCount** *(integer) --* 

              This is the count of the total number of backups that will be scanned in a search.

              
            

            - **TotalItemsToScanCount** *(integer) --* 

              This is the count of the total number of items that will be scanned in a search.

              
        
          

          - **StatusMessage** *(string) --* 

            A status message will be returned for either a earch job with a status of ``ERRORED`` or a status of ``COMPLETED`` jobs with issues.

             

            For example, a message may say that a search contained recovery points unable to be scanned because of a permissions issue.

            
      
    
      

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

        The next item following a partial list of returned backups included in a search job.

         

        For example, if a request is made to return ``MaxResults`` number of backups, ``NextToken`` allows you to return more items in your list starting at the location pointed to by the next token.

        
  
  **Exceptions**
  
  *   :py:class:`BackupSearch.Client.exceptions.ThrottlingException`

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

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

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

  