---
title: "POST /#X-Amz-Target=AmazonForecast.ListWhatIfForecasts"
method: POST
path: "/#X-Amz-Target=AmazonForecast.ListWhatIfForecasts"
---

# POST /#X-Amz-Target=AmazonForecast.ListWhatIfForecasts

`POST /#X-Amz-Target=AmazonForecast.ListWhatIfForecasts`

Returns a list of what-if forecasts created using the <a>CreateWhatIfForecast</a> 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 <a>DescribeWhatIfForecast</a> operation.

## Query parameters

- `MaxResults` string
- `NextToken` string

## Headers

- `X-Amz-Target` 'AmazonForecast.ListWhatIfForecasts', required

## Request body

- ListWhatIfForecastsRequest
  - `NextToken` string — If the result of the previous request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of results, use the token in the next&#x2028; request. Tokens expire after 24 hours.
  - `MaxResults` integer — The number of items to return in the response.
  - `Filters` Filter[] — <p>An array of filters. For each filter, you provide a condition and a match statement. The condition is either <code>IS</code> or <code>IS_NOT</code>, which specifies whether to include or exclude the what-if forecast export jobs that match the statement from the list, respectively. The match statement consists of a key and a value.</p> <p> <b>Filter properties</b> </p> <ul> <li> <p> <code>Condition</code> - The condition to apply. Valid values are <code>IS</code> and <code>IS_NOT</code>. To include the forecast export jobs that match the statement, specify <code>IS</code>. To exclude matching forecast export jobs, specify <code>IS_NOT</code>.</p> </li> <li> <p> <code>Key</code> - The name of the parameter to filter on. Valid values are <code>WhatIfForecastArn</code> and <code>Status</code>.</p> </li> <li> <p> <code>Value</code> - The value to match.</p> </li> </ul> <p>For example, to list all jobs that export a forecast named <i>electricityWhatIfForecast</i>, specify the following filter:</p> <p> <code>"Filters": [ { "Condition": "IS", "Key": "WhatIfForecastArn", "Value": "arn:aws:forecast:us-west-2:&lt;acct-id&gt;:forecast/electricityWhatIfForecast" } ]</code> </p>
    - `Key` string, required — The name of the parameter to filter on.
    - `Value` string, required — The value to match.
    - `Condition` 'IS' | 'IS_NOT', required — The condition to apply. To include the objects that match the statement, specify <code>IS</code>. To exclude matching objects, specify <code>IS_NOT</code>.

## Response `200`

Success

- ListWhatIfForecastsResponse
  - `WhatIfForecasts` WhatIfForecastSummary[] — An array of <code>WhatIfForecasts</code> objects that describe the matched forecasts.
    - `WhatIfForecastArn` string — The Amazon Resource Name (ARN) of the what-if forecast.
    - `WhatIfForecastName` string — The name of the what-if forecast.
    - `WhatIfAnalysisArn` string — The Amazon Resource Name (ARN) of the what-if analysis that contains this what-if forecast.
    - `Status` string — <p>The status of the what-if forecast. States include:</p> <ul> <li> <p> <code>ACTIVE</code> </p> </li> <li> <p> <code>CREATE_PENDING</code>, <code>CREATE_IN_PROGRESS</code>, <code>CREATE_FAILED</code> </p> </li> <li> <p> <code>CREATE_STOPPING</code>, <code>CREATE_STOPPED</code> </p> </li> <li> <p> <code>DELETE_PENDING</code>, <code>DELETE_IN_PROGRESS</code>, <code>DELETE_FAILED</code> </p> </li> </ul> <note> <p>The <code>Status</code> of the what-if analysis must be <code>ACTIVE</code> before you can access the analysis.</p> </note>
    - `Message` string — If an error occurred, an informational message about the error.
    - `CreationTime` string, date-time — When the what-if forecast was created.
    - `LastModificationTime` string, date-time — <p>The last time the resource was modified. The timestamp depends on the status of the job:</p> <ul> <li> <p> <code>CREATE_PENDING</code> - The <code>CreationTime</code>.</p> </li> <li> <p> <code>CREATE_IN_PROGRESS</code> - The current timestamp.</p> </li> <li> <p> <code>CREATE_STOPPING</code> - The current timestamp.</p> </li> <li> <p> <code>CREATE_STOPPED</code> - When the job stopped.</p> </li> <li> <p> <code>ACTIVE</code> or <code>CREATE_FAILED</code> - When the job finished or failed.</p> </li> </ul>
  - `NextToken` string — If the result of the previous request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of results, use the token in the next&#x2028; request. Tokens expire after 24 hours.

## Other responses

- `480` — InvalidNextTokenException
- `481` — InvalidInputException

---

[API](https://skmtc.net/aws/apis/forecast.md) · [All operations](https://skmtc.net/aws/apis/forecast/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/forecast/versions/3d1c872d2ac9/schema)
