- Navigation GuideYou are on a Client landing page. Commands (operations) are listed on this page. The Client constructor type is linked at the bottom.
ForecastClient
Provides APIs for creating and managing Amazon Forecast resources.
Installation
npm install @aws-sdk/client-forecast
yarn add @aws-sdk/client-forecast
pnpm add @aws-sdk/client-forecast
ForecastClient Operations
Command | Summary |
---|
Command | Summary |
---|---|
CreateAutoPredictorCommand | Creates an Amazon Forecast predictor. Amazon Forecast creates predictors with AutoPredictor, which involves applying the optimal combination of algorithms to each time series in your datasets. You can use CreateAutoPredictor to create new predictors or upgrade/retrain existing predictors. Creating new predictors The following parameters are required when creating a new predictor:
When creating a new predictor, do not specify a value for Upgrading and retraining predictors The following parameters are required when retraining or upgrading a predictor:
When upgrading or retraining a predictor, only specify values for the |
CreateDatasetCommand | Creates an Amazon Forecast dataset. The information about the dataset that you provide helps Forecast understand how to consume the data for model training. This includes the following:
After creating a dataset, you import your training data into it and add the dataset to a dataset group. You use the dataset group to create a predictor. For more information, see Importing datasets . To get a list of all your datasets, use the ListDatasets operation. For example Forecast datasets, see the Amazon Forecast Sample GitHub repository . The |
CreateDatasetGroupCommand | Creates a dataset group, which holds a collection of related datasets. You can add datasets to the dataset group when you create the dataset group, or later by using the UpdateDatasetGroup operation. After creating a dataset group and adding datasets, you use the dataset group when you create a predictor. For more information, see Dataset groups . To get a list of all your datasets groups, use the ListDatasetGroups operation. The |
CreateDatasetImportJobCommand | Imports your training data to an Amazon Forecast dataset. You provide the location of your training data in an Amazon Simple Storage Service (Amazon S3) bucket and the Amazon Resource Name (ARN) of the dataset that you want to import the data to. You must specify a DataSource object that includes an Identity and Access Management (IAM) role that Amazon Forecast can assume to access the data, as Amazon Forecast makes a copy of your data and processes it in an internal Amazon Web Services system. For more information, see Set up permissions . The training data must be in CSV or Parquet format. The delimiter must be a comma (,). You can specify the path to a specific file, the S3 bucket, or to a folder in the S3 bucket. For the latter two cases, Amazon Forecast imports all files up to the limit of 10,000 files. Because dataset imports are not aggregated, your most recent dataset import is the one that is used when training a predictor or generating a forecast. Make sure that your most recent dataset import contains all of the data you want to model off of, and not just the new data collected since the previous import. To get a list of all your dataset import jobs, filtered by specified criteria, use the ListDatasetImportJobs operation. |
CreateExplainabilityCommand | Explainability is only available for Forecasts and Predictors generated from an AutoPredictor (CreateAutoPredictor) Creates an Amazon Forecast Explainability. Explainability helps you better understand how the attributes in your datasets impact forecast. Amazon Forecast uses a metric called Impact scores to quantify the relative impact of each attribute and determine whether they increase or decrease forecast values. To enable Forecast Explainability, your predictor must include at least one of the following: related time series, item metadata, or additional datasets like Holidays and the Weather Index. CreateExplainability accepts either a Predictor ARN or Forecast ARN. To receive aggregated Impact scores for all time series and time points in your datasets, provide a Predictor ARN. To receive Impact scores for specific time series and time points, provide a Forecast ARN. CreateExplainability with a Predictor ARN You can only have one Explainability resource per predictor. If you already enabled The following parameters are required when providing a Predictor ARN:
Do not specify a value for the following parameters:
CreateExplainability with a Forecast ARN You can specify a maximum of 50 time series and 500 time points. The following parameters are required when providing a Predictor ARN:
If you set TimeSeriesGranularity to “SPECIFIC”, you must also provide the following:
If you set TimePointGranularity to “SPECIFIC”, you must also provide the following:
|
CreateExplainabilityExportCommand | Exports an Explainability resource created by the CreateExplainability operation. Exported files are exported to an Amazon Simple Storage Service (Amazon S3) bucket. You must specify a DataDestination object that includes an Amazon S3 bucket and an Identity and Access Management (IAM) role that Amazon Forecast can assume to access the Amazon S3 bucket. For more information, see aws-forecast-iam-roles. The |
CreateForecastCommand | Creates a forecast for each item in the The range of the forecast is determined by the To get a list of all your forecasts, use the ListForecasts operation. The forecasts generated by Amazon Forecast are in the same time zone as the dataset that was used to create the predictor. For more information, see howitworks-forecast. The By default, a forecast includes predictions for every item ( |
CreateForecastExportJobCommand | Exports a forecast created by the CreateForecast operation to your Amazon Simple Storage Service (Amazon S3) bucket. The forecast file name will match the following conventions: where the You must specify a DataDestination object that includes an Identity and Access Management (IAM) role that Amazon Forecast can assume to access the Amazon S3 bucket. For more information, see aws-forecast-iam-roles. For more information, see howitworks-forecast. To get a list of all your forecast export jobs, use the ListForecastExportJobs operation. The |
CreateMonitorCommand | Creates a predictor monitor resource for an existing auto predictor. Predictor monitoring allows you to see how your predictor's performance changes over time. For more information, see Predictor Monitoring . |
CreatePredictorBacktestExportJobCommand | Exports backtest forecasts and accuracy metrics generated by the CreateAutoPredictor or CreatePredictor operations. Two folders containing CSV or Parquet files are exported to your specified S3 bucket. The export file names will match the following conventions: The You must specify a DataDestination object that includes an Amazon S3 bucket and an Identity and Access Management (IAM) role that Amazon Forecast can assume to access the Amazon S3 bucket. For more information, see aws-forecast-iam-roles. The |
CreatePredictorCommand | This operation creates a legacy predictor that does not include all the predictor functionalities provided by Amazon Forecast. To create a predictor that is compatible with all aspects of Forecast, use CreateAutoPredictor. Creates an Amazon Forecast predictor. In the request, provide a dataset group and either specify an algorithm or let Amazon Forecast choose an algorithm for you using AutoML. If you specify an algorithm, you also can override algorithm-specific hyperparameters. Amazon Forecast uses the algorithm to train a predictor using the latest version of the datasets in the specified dataset group. You can then generate a forecast using the CreateForecast operation. To see the evaluation metrics, use the GetAccuracyMetrics operation. You can specify a featurization configuration to fill and aggregate the data fields in the For RELATED_TIME_SERIES datasets, By default, predictors are trained and evaluated at the 0.1 (P10), 0.5 (P50), and 0.9 (P90) quantiles. You can choose custom forecast types to train and evaluate your predictor by setting the AutoML If you want Amazon Forecast to evaluate each algorithm and choose the one that minimizes the When AutoML is enabled, the following properties are disallowed:
To get a list of all of your predictors, use the ListPredictors operation. Before you can use the predictor to create a forecast, the |
CreateWhatIfAnalysisCommand | What-if analysis is a scenario modeling technique where you make a hypothetical change to a time series and compare the forecasts generated by these changes against the baseline, unchanged time series. It is important to remember that the purpose of a what-if analysis is to understand how a forecast can change given different modifications to the baseline time series. For example, imagine you are a clothing retailer who is considering an end of season sale to clear space for new styles. After creating a baseline forecast, you can use a what-if analysis to investigate how different sales tactics might affect your goals. You could create a scenario where everything is given a 25% markdown, and another where everything is given a fixed dollar markdown. You could create a scenario where the sale lasts for one week and another where the sale lasts for one month. With a what-if analysis, you can compare many different scenarios against each other. Note that a what-if analysis is meant to display what the forecasting model has learned and how it will behave in the scenarios that you are evaluating. Do not blindly use the results of the what-if analysis to make business decisions. For instance, forecasts might not be accurate for novel scenarios where there is no reference available to determine whether a forecast is good. The TimeSeriesSelector object defines the items that you want in the what-if analysis. |
CreateWhatIfForecastCommand | A what-if forecast is a forecast that is created from a modified version of the baseline forecast. Each what-if forecast incorporates either a replacement dataset or a set of transformations to the original dataset. |
CreateWhatIfForecastExportCommand | Exports a forecast created by the CreateWhatIfForecast operation to your Amazon Simple Storage Service (Amazon S3) bucket. The forecast file name will match the following conventions: The You must specify a DataDestination object that includes an Identity and Access Management (IAM) role that Amazon Forecast can assume to access the Amazon S3 bucket. For more information, see aws-forecast-iam-roles. For more information, see howitworks-forecast. To get a list of all your what-if forecast export jobs, use the ListWhatIfForecastExports operation. The |
DeleteDatasetCommand | Deletes an Amazon Forecast dataset that was created using the CreateDataset operation. You can only delete datasets that have a status of Forecast does not automatically update any dataset groups that contain the deleted dataset. In order to update the dataset group, use the UpdateDatasetGroup operation, omitting the deleted dataset's ARN. |
DeleteDatasetGroupCommand | Deletes a dataset group created using the CreateDatasetGroup operation. You can only delete dataset groups that have a status of This operation deletes only the dataset group, not the datasets in the group. |
DeleteDatasetImportJobCommand | Deletes a dataset import job created using the CreateDatasetImportJob operation. You can delete only dataset import jobs that have a status of |
DeleteExplainabilityCommand | Deletes an Explainability resource. You can delete only predictor that have a status of |
DeleteExplainabilityExportCommand | Deletes an Explainability export. |
DeleteForecastCommand | Deletes a forecast created using the CreateForecast operation. You can delete only forecasts that have a status of You can't delete a forecast while it is being exported. After a forecast is deleted, you can no longer query the forecast. |
DeleteForecastExportJobCommand | Deletes a forecast export job created using the CreateForecastExportJob operation. You can delete only export jobs that have a status of |
DeleteMonitorCommand | Deletes a monitor resource. You can only delete a monitor resource with a status of |
DeletePredictorBacktestExportJobCommand | Deletes a predictor backtest export job. |
DeletePredictorCommand | Deletes a predictor created using the DescribePredictor or CreatePredictor operations. You can delete only predictor that have a status of |
DeleteResourceTreeCommand | Deletes an entire resource tree. This operation will delete the parent resource and its child resources. Child resources are resources that were created from another resource. For example, when a forecast is generated from a predictor, the forecast is the child resource and the predictor is the parent resource. Amazon Forecast resources possess the following parent-child resource hierarchies:
|
DeleteWhatIfAnalysisCommand | Deletes a what-if analysis created using the CreateWhatIfAnalysis operation. You can delete only what-if analyses that have a status of You can't delete a what-if analysis while any of its forecasts are being exported. |
DeleteWhatIfForecastCommand | Deletes a what-if forecast created using the CreateWhatIfForecast operation. You can delete only what-if forecasts that have a status of You can't delete a what-if forecast while it is being exported. After a what-if forecast is deleted, you can no longer query the what-if analysis. |
DeleteWhatIfForecastExportCommand | Deletes a what-if forecast export created using the CreateWhatIfForecastExport operation. You can delete only what-if forecast exports that have a status of |
DescribeAutoPredictorCommand | Describes a predictor created using the CreateAutoPredictor operation. |
DescribeDatasetCommand | Describes an Amazon Forecast dataset created using the CreateDataset operation. In addition to listing the parameters specified in the
|
DescribeDatasetGroupCommand | Describes a dataset group created using the CreateDatasetGroup operation. In addition to listing the parameters provided in the
|
DescribeDatasetImportJobCommand | Describes a dataset import job created using the CreateDatasetImportJob operation. In addition to listing the parameters provided in the
|
DescribeExplainabilityCommand | Describes an Explainability resource created using the CreateExplainability operation. |
DescribeExplainabilityExportCommand | Describes an Explainability export created using the CreateExplainabilityExport operation. |
DescribeForecastCommand | Describes a forecast created using the CreateForecast operation. In addition to listing the properties provided in the
|
DescribeForecastExportJobCommand | Describes a forecast export job created using the CreateForecastExportJob operation. In addition to listing the properties provided by the user in the
|
DescribeMonitorCommand | Describes a monitor resource. In addition to listing the properties provided in the CreateMonitor request, this operation lists the following properties:
|
DescribePredictorBacktestExportJobCommand | Describes a predictor backtest export job created using the CreatePredictorBacktestExportJob operation. In addition to listing the properties provided by the user in the
|
DescribePredictorCommand | This operation is only valid for legacy predictors created with CreatePredictor. If you are not using a legacy predictor, use DescribeAutoPredictor. Describes a predictor created using the CreatePredictor operation. In addition to listing the properties provided in the
|
DescribeWhatIfAnalysisCommand | Describes the what-if analysis created using the CreateWhatIfAnalysis operation. In addition to listing the properties provided in the
|
DescribeWhatIfForecastCommand | Describes the what-if forecast created using the CreateWhatIfForecast operation. In addition to listing the properties provided in the
|
DescribeWhatIfForecastExportCommand | Describes the what-if forecast export created using the CreateWhatIfForecastExport operation. In addition to listing the properties provided in the
|
GetAccuracyMetricsCommand | Provides metrics on the accuracy of the models that were trained by the CreatePredictor operation. Use metrics to see how well the model performed and to decide whether to use the predictor to generate a forecast. For more information, see Predictor Metrics . This operation generates metrics for each backtest window that was evaluated. The number of backtest windows ( The parameters of the Before you can get accuracy metrics, the |
ListDatasetGroupsCommand | Returns a list of dataset groups created using the CreateDatasetGroup operation. For each dataset group, this operation returns a summary of its properties, including its Amazon Resource Name (ARN). You can retrieve the complete set of properties by using the dataset group ARN with the DescribeDatasetGroup operation. |
ListDatasetImportJobsCommand | Returns a list of dataset import jobs created using the CreateDatasetImportJob operation. For each import job, this operation returns a summary of its properties, including its Amazon Resource Name (ARN). You can retrieve the complete set of properties by using the ARN with the DescribeDatasetImportJob operation. You can filter the list by providing an array of Filter objects. |
ListDatasetsCommand | 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. |
ListExplainabilitiesCommand | Returns a list of Explainability resources created using the CreateExplainability operation. This operation returns a summary for each Explainability. You can filter the list using an array of Filter objects. To retrieve the complete set of properties for a particular Explainability resource, use the ARN with the DescribeExplainability operation. |
ListExplainabilityExportsCommand | Returns a list of Explainability exports created using the CreateExplainabilityExport operation. This operation returns a summary for each Explainability export. You can filter the list using an array of Filter objects. To retrieve the complete set of properties for a particular Explainability export, use the ARN with the DescribeExplainability operation. |
ListForecastExportJobsCommand | Returns a list of forecast export jobs created using the CreateForecastExportJob operation. For each forecast export job, this operation returns a summary of its properties, including its Amazon Resource Name (ARN). To retrieve the complete set of properties, use the ARN with the DescribeForecastExportJob operation. You can filter the list using an array of Filter objects. |
ListForecastsCommand | Returns a list of forecasts created using the CreateForecast operation. For each forecast, this operation returns a summary of its properties, including its Amazon Resource Name (ARN). To retrieve the complete set of properties, specify the ARN with the DescribeForecast operation. You can filter the list using an array of Filter objects. |
ListMonitorEvaluationsCommand | Returns a list of the monitoring evaluation results and predictor events collected by the monitor resource during different windows of time. For information about monitoring see predictor-monitoring. For more information about retrieving monitoring results see Viewing Monitoring Results . |
ListMonitorsCommand | Returns a list of monitors created with the CreateMonitor operation and CreateAutoPredictor operation. For each monitor resource, this operation returns of a summary of its properties, including its Amazon Resource Name (ARN). You can retrieve a complete set of properties of a monitor resource by specify the monitor's ARN in the DescribeMonitor operation. |
ListPredictorBacktestExportJobsCommand | Returns a list of predictor backtest export jobs created using the CreatePredictorBacktestExportJob operation. This operation returns a summary for each backtest export job. You can filter the list using an array of Filter objects. To retrieve the complete set of properties for a particular backtest export job, use the ARN with the DescribePredictorBacktestExportJob operation. |
ListPredictorsCommand | Returns a list of predictors created using the CreateAutoPredictor or CreatePredictor operations. For each predictor, this operation returns a summary of its properties, including its Amazon Resource Name (ARN). You can retrieve the complete set of properties by using the ARN with the DescribeAutoPredictor and DescribePredictor operations. You can filter the list using an array of Filter objects. |
ListTagsForResourceCommand | Lists the tags for an Amazon Forecast resource. |
ListWhatIfAnalysesCommand | Returns a list of what-if analyses created using the CreateWhatIfAnalysis operation. For each what-if analysis, this operation returns a summary of its properties, including its Amazon Resource Name (ARN). You can retrieve the complete set of properties by using the what-if analysis ARN with the DescribeWhatIfAnalysis operation. |
ListWhatIfForecastExportsCommand | Returns a list of what-if forecast exports created using the CreateWhatIfForecastExport operation. For each what-if forecast export, this operation returns a summary of its properties, including its Amazon Resource Name (ARN). You can retrieve the complete set of properties by using the what-if forecast export ARN with the DescribeWhatIfForecastExport operation. |
ListWhatIfForecastsCommand | Returns a list of what-if forecasts created using the CreateWhatIfForecast operation. For each what-if forecast, this operation returns a summary of its properties, including its Amazon Resource Name (ARN). You can retrieve the complete set of properties by using the what-if forecast ARN with the DescribeWhatIfForecast operation. |
ResumeResourceCommand | Resumes a stopped monitor resource. |
StopResourceCommand | Stops a resource. The resource undergoes the following states: This operation can be applied to the following resources (and their corresponding child resources):
|
TagResourceCommand | Associates the specified tags to a resource with the specified |
UntagResourceCommand | Deletes the specified tags from a resource. |
UpdateDatasetGroupCommand | Replaces the datasets in a dataset group with the specified datasets. The |
ForecastClient Configuration
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
defaultsMode Optional | DefaultsMode | Provider<DefaultsMode> | The @smithy/smithy-client#DefaultsMode that will be used to determine how certain default configuration options are resolved in the SDK. |
disableHostPrefix Optional | boolean | Disable dynamically changing the endpoint of the client based on the hostPrefix trait of an operation. |
extensions Optional | RuntimeExtension[] | Optional extensions |
logger Optional | Logger | Optional logger for logging debug/info/warn/error. |
maxAttempts Optional | number | Provider<number> | Value for how many times a request will be made at most in case of retry. |
profile Optional | string | Setting a client profile is similar to setting a value for the AWS_PROFILE environment variable. Setting a profile on a client in code only affects the single client instance, unlike AWS_PROFILE.When set, and only for environments where an AWS configuration file exists, fields configurable by this file will be retrieved from the specified profile within that file. Conflicting code configuration and environment variables will still have higher priority.For client credential resolution that involves checking the AWS configuration file, the client's profile (this value) will be used unless a different profile is set in the credential provider options. |
region Optional | string | Provider<string> | The AWS region to which this client will send requests |
requestHandler Optional | __HttpHandlerUserInput | The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. |
retryMode Optional | string | Provider<string> | Specifies which retry algorithm to use. |
useDualstackEndpoint Optional | boolean | Provider<boolean> | Enables IPv6/IPv4 dualstack endpoint. |
useFipsEndpoint Optional | boolean | Provider<boolean> | Enables FIPS compatible endpoints. |
Additional config fields are described in the full configuration type: ForecastClientConfig