list_datasets

list_datasets(**kwargs)

Returns a list of datasets created using the CreateDataset 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 operation.

See also: AWS API Documentation

Request Syntax

response = client.list_datasets(
    NextToken='string',
    MaxResults=123
)
Parameters
  • NextToken (string) -- 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.
  • MaxResults (integer) -- The number of items to return in the response.
Return type

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 operation. To get the complete set of properties, call the DescribeDataset 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 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

  • ForecastService.Client.exceptions.InvalidNextTokenException