Skip to main content

what_if_forecasts

Creates, updates, deletes, gets or lists a what_if_forecasts resource.

Overview

Namewhat_if_forecasts
TypeResource
Idaws.forecast.what_if_forecasts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)When the what-if forecast was created.
estimated_time_remaining_in_minutesinteger (int64)The approximate time remaining to complete the what-if forecast, in minutes.
forecast_typesarrayThe quantiles at which probabilistic forecasts are generated. You can specify up to five quantiles per what-if forecast in the CreateWhatIfForecast operation. If you didn't specify quantiles, the default values are ["0.1", "0.5", "0.9"].
last_modification_timestring (date-time)The last time the resource was modified. The timestamp depends on the status of the job: CREATE_PENDING - The CreationTime. CREATE_IN_PROGRESS - The current timestamp. CREATE_STOPPING - The current timestamp. CREATE_STOPPED - When the job stopped. ACTIVE or CREATE_FAILED - When the job finished or failed.
messagestringIf an error occurred, an informational message about the error.
statusstringThe status of the what-if forecast. States include: ACTIVE CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED CREATE_STOPPING, CREATE_STOPPED DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED The Status of the what-if forecast must be ACTIVE before you can access the forecast. (pattern: <code>^[a-zA-Z0-9_]+$</code>)
time_series_replacements_data_sourceobjectAn array of S3Config, Schema, and Format elements that describe the replacement time series.
time_series_transformationsarrayAn array of Action and TimeSeriesConditions elements that describe what transformations were applied to which time series.
what_if_analysis_arnstringThe Amazon Resource Name (ARN) of the what-if analysis that contains this forecast. (pattern: <code>arn:([a-z\d-]+):forecast:.:.:.+</code>)
what_if_forecast_arnstringThe Amazon Resource Name (ARN) of the what-if forecast. (pattern: <code>arn:([a-z\d-]+):forecast:.:.:.+</code>)
what_if_forecast_namestringThe name of the what-if forecast. (pattern: <code>^[a-zA-Z][a-zA-Z0-9_]*</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_what_if_forecastselectregionDescribes the what-if forecast created using the CreateWhatIfForecast operation. In addition to listing the properties provided in the CreateWhatIfForecast request, this operation lists the following properties: CreationTime LastModificationTime Message - If an error occurred, information about the error. Status
list_what_if_forecastsselectregionReturns 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.
create_what_if_forecastinsertregion, WhatIfForecastName, WhatIfAnalysisArnA 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.
delete_what_if_forecastdeleteregionDeletes a what-if forecast created using the CreateWhatIfForecast operation. You can delete only what-if forecasts that have a status of ACTIVE or CREATE_FAILED. To get the status, use the DescribeWhatIfForecast operation. 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Describes the what-if forecast created using the CreateWhatIfForecast operation. In addition to listing the properties provided in the CreateWhatIfForecast request, this operation lists the following properties: CreationTime LastModificationTime Message - If an error occurred, information about the error. Status

SELECT
creation_time,
estimated_time_remaining_in_minutes,
forecast_types,
last_modification_time,
message,
status,
time_series_replacements_data_source,
time_series_transformations,
what_if_analysis_arn,
what_if_forecast_arn,
what_if_forecast_name
FROM aws.forecast.what_if_forecasts
WHERE region = '{{ region }}' -- required
;

INSERT examples

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.

INSERT INTO aws.forecast.what_if_forecasts (
WhatIfForecastName,
WhatIfAnalysisArn,
TimeSeriesTransformations,
TimeSeriesReplacementsDataSource,
Tags,
region
)
SELECT
'{{ WhatIfForecastName }}' /* required */,
'{{ WhatIfAnalysisArn }}' /* required */,
'{{ TimeSeriesTransformations }}',
'{{ TimeSeriesReplacementsDataSource }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
what_if_forecast_arn
;

DELETE examples

Deletes a what-if forecast created using the CreateWhatIfForecast operation. You can delete only what-if forecasts that have a status of ACTIVE or CREATE_FAILED. To get the status, use the DescribeWhatIfForecast operation. 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.

DELETE FROM aws.forecast.what_if_forecasts
WHERE region = '{{ region }}' --required
;