:doc:`Personalize <../../personalize>` / Client / list_datasets

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



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

  

  Returns the list of datasets contained in the given dataset group. The response provides the properties for each dataset, including the Amazon Resource Name (ARN). For more information on datasets, see `CreateDataset <https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDataset.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/personalize-2018-05-22/ListDatasets>`_  


  **Request Syntax**
  ::

    response = client.list_datasets(
        datasetGroupArn='string',
        nextToken='string',
        maxResults=123
    )
    
  :type datasetGroupArn: string
  :param datasetGroupArn: 

    The Amazon Resource Name (ARN) of the dataset group that contains the datasets to list.

    

  
  :type nextToken: string
  :param nextToken: 

    A token returned from the previous call to ``ListDatasets`` for getting the next set of dataset import jobs (if they exist).

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of datasets to return.

    

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

    
    ::

      {
          'datasets': [
              {
                  'name': 'string',
                  'datasetArn': 'string',
                  'datasetType': 'string',
                  'status': 'string',
                  'creationDateTime': datetime(2015, 1, 1),
                  'lastUpdatedDateTime': datetime(2015, 1, 1)
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **datasets** *(list) --* 

        An array of ``Dataset`` objects. Each object provides metadata information.

        
        

        - *(dict) --* 

          Provides a summary of the properties of a dataset. For a complete listing, call the `DescribeDataset <https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeDataset.html>`__ API.

          
          

          - **name** *(string) --* 

            The name of the dataset.

            
          

          - **datasetArn** *(string) --* 

            The Amazon Resource Name (ARN) of the dataset.

            
          

          - **datasetType** *(string) --* 

            The dataset type. One of the following values:

             

            
            * Interactions
             
            * Items
             
            * Users
             
            * Event-Interactions
            

            
          

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

            The status of the dataset.

             

            A dataset can be in one of the following states:

             

            
            * CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
             
            * DELETE PENDING > DELETE IN_PROGRESS
            

            
          

          - **creationDateTime** *(datetime) --* 

            The date and time (in Unix time) that the dataset was created.

            
          

          - **lastUpdatedDateTime** *(datetime) --* 

            The date and time (in Unix time) that the dataset was last updated.

            
      
    
      

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

        A token for getting the next set of datasets (if they exist).

        
  
  **Exceptions**
  
  *   :py:class:`Personalize.Client.exceptions.InvalidInputException`

  
  *   :py:class:`Personalize.Client.exceptions.InvalidNextTokenException`

  