:doc:`TimestreamQuery <../../timestream-query>` / Client / list_scheduled_queries

**********************
list_scheduled_queries
**********************



.. py:method:: TimestreamQuery.Client.list_scheduled_queries(**kwargs)

  

  Gets a list of all scheduled queries in the caller's Amazon account and Region. ``ListScheduledQueries`` is eventually consistent.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/ListScheduledQueries>`_  


  **Request Syntax**
  ::

    response = client.list_scheduled_queries(
        MaxResults=123,
        NextToken='string'
    )
    
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of items to return in the output. If the total number of items available is more than the value specified, a ``NextToken`` is provided in the output. To resume pagination, provide the ``NextToken`` value as the argument to the subsequent call to ``ListScheduledQueriesRequest``.

    

  
  :type NextToken: string
  :param NextToken: 

    A pagination token to resume pagination.

    

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

    
    ::

      {
          'ScheduledQueries': [
              {
                  'Arn': 'string',
                  'Name': 'string',
                  'CreationTime': datetime(2015, 1, 1),
                  'State': 'ENABLED'|'DISABLED',
                  'PreviousInvocationTime': datetime(2015, 1, 1),
                  'NextInvocationTime': datetime(2015, 1, 1),
                  'ErrorReportConfiguration': {
                      'S3Configuration': {
                          'BucketName': 'string',
                          'ObjectKeyPrefix': 'string',
                          'EncryptionOption': 'SSE_S3'|'SSE_KMS'
                      }
                  },
                  'TargetDestination': {
                      'TimestreamDestination': {
                          'DatabaseName': 'string',
                          'TableName': 'string'
                      }
                  },
                  'LastRunStatus': 'AUTO_TRIGGER_SUCCESS'|'AUTO_TRIGGER_FAILURE'|'MANUAL_TRIGGER_SUCCESS'|'MANUAL_TRIGGER_FAILURE'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ScheduledQueries** *(list) --* 

        A list of scheduled queries.

        
        

        - *(dict) --* 

          Scheduled Query

          
          

          - **Arn** *(string) --* 

            The Amazon Resource Name.

            
          

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

            The name of the scheduled query.

            
          

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

            The creation time of the scheduled query.

            
          

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

            State of scheduled query.

            
          

          - **PreviousInvocationTime** *(datetime) --* 

            The last time the scheduled query was run.

            
          

          - **NextInvocationTime** *(datetime) --* 

            The next time the scheduled query is to be run.

            
          

          - **ErrorReportConfiguration** *(dict) --* 

            Configuration for scheduled query error reporting.

            
            

            - **S3Configuration** *(dict) --* 

              The S3 configuration for the error reports.

              
              

              - **BucketName** *(string) --* 

                Name of the S3 bucket under which error reports will be created.

                
              

              - **ObjectKeyPrefix** *(string) --* 

                Prefix for the error report key. Timestream by default adds the following prefix to the error report path.

                
              

              - **EncryptionOption** *(string) --* 

                Encryption at rest options for the error reports. If no encryption option is specified, Timestream will choose SSE_S3 as default.

                
          
        
          

          - **TargetDestination** *(dict) --* 

            Target data source where final scheduled query result will be written.

            
            

            - **TimestreamDestination** *(dict) --* 

              Query result destination details for Timestream data source.

              
              

              - **DatabaseName** *(string) --* 

                Timestream database name.

                
              

              - **TableName** *(string) --* 

                Timestream table name.

                
          
        
          

          - **LastRunStatus** *(string) --* 

            Status of the last scheduled query run.

            
      
    
      

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

        A token to specify where to start paginating. This is the NextToken from a previously truncated response.

        
  
  **Exceptions**
  
  *   :py:class:`TimestreamQuery.Client.exceptions.AccessDeniedException`

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

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

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

  
  *   :py:class:`TimestreamQuery.Client.exceptions.InvalidEndpointException`

  