:doc:`Comprehend <../../comprehend>` / Client / list_datasets

*************
list_datasets
*************



.. py:method:: Comprehend.Client.list_datasets(**kwargs)

  

  List the datasets that you have configured in this Region. For more information about datasets, see `Flywheel overview <https://docs.aws.amazon.com/comprehend/latest/dg/flywheels-about.html>`__ in the *Amazon Comprehend Developer Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDatasets>`_  


  **Request Syntax**
  ::

    response = client.list_datasets(
        FlywheelArn='string',
        Filter={
            'Status': 'CREATING'|'COMPLETED'|'FAILED',
            'DatasetType': 'TRAIN'|'TEST',
            'CreationTimeAfter': datetime(2015, 1, 1),
            'CreationTimeBefore': datetime(2015, 1, 1)
        },
        NextToken='string',
        MaxResults=123
    )
    
  :type FlywheelArn: string
  :param FlywheelArn: 

    The Amazon Resource Number (ARN) of the flywheel.

    

  
  :type Filter: dict
  :param Filter: 

    Filters the datasets to be returned in the response.

    

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

      Filter the datasets based on the dataset status.

      

    
    - **DatasetType** *(string) --* 

      Filter the datasets based on the dataset type.

      

    
    - **CreationTimeAfter** *(datetime) --* 

      Filter the datasets to include datasets created after the specified time.

      

    
    - **CreationTimeBefore** *(datetime) --* 

      Filter the datasets to include datasets created before the specified time.

      

    
  
  :type NextToken: string
  :param NextToken: 

    Identifies the next page of results to return.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    Maximum number of results to return in a response. The default is 100.

    

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

    
    ::

      {
          'DatasetPropertiesList': [
              {
                  'DatasetArn': 'string',
                  'DatasetName': 'string',
                  'DatasetType': 'TRAIN'|'TEST',
                  'DatasetS3Uri': 'string',
                  'Description': 'string',
                  'Status': 'CREATING'|'COMPLETED'|'FAILED',
                  'Message': 'string',
                  'NumberOfDocuments': 123,
                  'CreationTime': datetime(2015, 1, 1),
                  'EndTime': datetime(2015, 1, 1)
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **DatasetPropertiesList** *(list) --* 

        The dataset properties list.

        
        

        - *(dict) --* 

          Properties associated with the dataset.

          
          

          - **DatasetArn** *(string) --* 

            The ARN of the dataset.

            
          

          - **DatasetName** *(string) --* 

            The name of the dataset.

            
          

          - **DatasetType** *(string) --* 

            The dataset type (training data or test data).

            
          

          - **DatasetS3Uri** *(string) --* 

            The S3 URI where the dataset is stored.

            
          

          - **Description** *(string) --* 

            Description of the dataset.

            
          

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

            The dataset status. While the system creates the dataset, the status is ``CREATING``. When the dataset is ready to use, the status changes to ``COMPLETED``.

            
          

          - **Message** *(string) --* 

            A description of the status of the dataset.

            
          

          - **NumberOfDocuments** *(integer) --* 

            The number of documents in the dataset.

            
          

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

            Creation time of the dataset.

            
          

          - **EndTime** *(datetime) --* 

            Time when the data from the dataset becomes available in the data lake.

            
      
    
      

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

        Identifies the next page of results to return.

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

  
  *   :py:class:`Comprehend.Client.exceptions.TooManyRequestsException`

  
  *   :py:class:`Comprehend.Client.exceptions.InvalidFilterException`

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

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

  