:doc:`ForecastService <../../forecast>` / Client / list_datasets

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



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

  

  Returns a list of datasets created using the `CreateDataset <https://docs.aws.amazon.com/forecast/latest/dg/API_CreateDataset.html>`__ operation. For each dataset, a summary of its properties, including its Amazon Resource Name (ARN), is returned. To retrieve the complete set of properties, use the ARN with the `DescribeDataset <https://docs.aws.amazon.com/forecast/latest/dg/API_DescribeDataset.html>`__ operation.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/forecast-2018-06-26/ListDatasets>`_  


  **Request Syntax**
  ::

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

    If the result of the previous request was truncated, the response includes a ``NextToken``. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The number of items to return in the response.

    

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

    
    ::

      {
          'Datasets': [
              {
                  'DatasetArn': 'string',
                  'DatasetName': 'string',
                  'DatasetType': 'TARGET_TIME_SERIES'|'RELATED_TIME_SERIES'|'ITEM_METADATA',
                  'Domain': 'RETAIL'|'CUSTOM'|'INVENTORY_PLANNING'|'EC2_CAPACITY'|'WORK_FORCE'|'WEB_TRAFFIC'|'METRICS',
                  'CreationTime': datetime(2015, 1, 1),
                  'LastModificationTime': datetime(2015, 1, 1)
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Datasets** *(list) --* 

        An array of objects that summarize each dataset's properties.

        
        

        - *(dict) --* 

          Provides a summary of the dataset properties used in the `ListDatasets <https://docs.aws.amazon.com/forecast/latest/dg/API_ListDatasets.html>`__ operation. To get the complete set of properties, call the `DescribeDataset <https://docs.aws.amazon.com/forecast/latest/dg/API_DescribeDataset.html>`__ operation, and provide the ``DatasetArn``.

          
          

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

            The Amazon Resource Name (ARN) of the dataset.

            
          

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

            The name of the dataset.

            
          

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

            The dataset type.

            
          

          - **Domain** *(string) --* 

            The domain associated with the dataset.

            
          

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

            When the dataset was created.

            
          

          - **LastModificationTime** *(datetime) --* 

            When you create a dataset, ``LastModificationTime`` is the same as ``CreationTime``. While data is being imported to the dataset, ``LastModificationTime`` is the current time of the ``ListDatasets`` call. After a `CreateDatasetImportJob <https://docs.aws.amazon.com/forecast/latest/dg/API_CreateDatasetImportJob.html>`__ operation has finished, ``LastModificationTime`` is when the import job completed or failed.

            
      
    
      

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

        If the response is truncated, Amazon Forecast returns this token. To retrieve the next set of results, use the token in the next request.

        
  
  **Exceptions**
  
  *   :py:class:`ForecastService.Client.exceptions.InvalidNextTokenException`

  