DescribeWhatIfForecastCommand

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

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { ForecastClient, DescribeWhatIfForecastCommand } from "@aws-sdk/client-forecast"; // ES Modules import
// const { ForecastClient, DescribeWhatIfForecastCommand } = require("@aws-sdk/client-forecast"); // CommonJS import
const client = new ForecastClient(config);
const input = { // DescribeWhatIfForecastRequest
  WhatIfForecastArn: "STRING_VALUE", // required
};
const command = new DescribeWhatIfForecastCommand(input);
const response = await client.send(command);
// { // DescribeWhatIfForecastResponse
//   WhatIfForecastName: "STRING_VALUE",
//   WhatIfForecastArn: "STRING_VALUE",
//   WhatIfAnalysisArn: "STRING_VALUE",
//   EstimatedTimeRemainingInMinutes: Number("long"),
//   Status: "STRING_VALUE",
//   Message: "STRING_VALUE",
//   CreationTime: new Date("TIMESTAMP"),
//   LastModificationTime: new Date("TIMESTAMP"),
//   TimeSeriesTransformations: [ // TimeSeriesTransformations
//     { // TimeSeriesTransformation
//       Action: { // Action
//         AttributeName: "STRING_VALUE", // required
//         Operation: "ADD" || "SUBTRACT" || "MULTIPLY" || "DIVIDE", // required
//         Value: Number("double"), // required
//       },
//       TimeSeriesConditions: [ // TimeSeriesConditions
//         { // TimeSeriesCondition
//           AttributeName: "STRING_VALUE", // required
//           AttributeValue: "STRING_VALUE", // required
//           Condition: "EQUALS" || "NOT_EQUALS" || "LESS_THAN" || "GREATER_THAN", // required
//         },
//       ],
//     },
//   ],
//   TimeSeriesReplacementsDataSource: { // TimeSeriesReplacementsDataSource
//     S3Config: { // S3Config
//       Path: "STRING_VALUE", // required
//       RoleArn: "STRING_VALUE", // required
//       KMSKeyArn: "STRING_VALUE",
//     },
//     Schema: { // Schema
//       Attributes: [ // SchemaAttributes
//         { // SchemaAttribute
//           AttributeName: "STRING_VALUE",
//           AttributeType: "string" || "integer" || "float" || "timestamp" || "geolocation",
//         },
//       ],
//     },
//     Format: "STRING_VALUE",
//     TimestampFormat: "STRING_VALUE",
//   },
//   ForecastTypes: [ // ForecastTypes
//     "STRING_VALUE",
//   ],
// };

DescribeWhatIfForecastCommand Input

Parameter
Type
Description
WhatIfForecastArn
Required
string | undefined

The Amazon Resource Name (ARN) of the what-if forecast that you are interested in.

DescribeWhatIfForecastCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
CreationTime
Date | undefined

When the what-if forecast was created.

EstimatedTimeRemainingInMinutes
number | undefined

The approximate time remaining to complete the what-if forecast, in minutes.

ForecastTypes
string[] | undefined

The 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"].

LastModificationTime
Date | undefined

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.

Message
string | undefined

If an error occurred, an informational message about the error.

Status
string | undefined

The 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.

TimeSeriesReplacementsDataSource
TimeSeriesReplacementsDataSource | undefined

An array of S3Config, Schema, and Format elements that describe the replacement time series.

TimeSeriesTransformations
TimeSeriesTransformation[] | undefined

An array of Action and TimeSeriesConditions elements that describe what transformations were applied to which time series.

WhatIfAnalysisArn
string | undefined

The Amazon Resource Name (ARN) of the what-if analysis that contains this forecast.

WhatIfForecastArn
string | undefined

The Amazon Resource Name (ARN) of the what-if forecast.

WhatIfForecastName
string | undefined

The name of the what-if forecast.

Throws

Name
Fault
Details
InvalidInputException
client

We can't process the request because it includes an invalid value or a value that exceeds the valid range.

ResourceNotFoundException
client

We can't find a resource with that Amazon Resource Name (ARN). Check the ARN and try again.

ForecastServiceException
Base exception class for all service exceptions from Forecast service.