

 Amazon Forecast 不再提供給新客戶。Amazon Forecast 的現有客戶可以繼續正常使用服務。[進一步了解」](https://aws.amazon.com/blogs/machine-learning/transition-your-amazon-forecast-usage-to-amazon-sagemaker-canvas/)

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# ListWhatIfForecasts
<a name="API_ListWhatIfForecasts"></a>

傳回使用 [CreateWhatIfForecast](API_CreateWhatIfForecast.md)操作建立的假設預測清單。對於每個假設預測，此操作會傳回其屬性的摘要，包括其 Amazon Resource Name (ARN)。您可以使用 [DescribeWhatIfForecast](API_DescribeWhatIfForecast.md)操作的假設預測 ARN 來擷取完整的屬性集。

**重要**  
Amazon Forecast 不再提供給新客戶。Amazon Forecast 的現有客戶可以繼續正常使用服務。[進一步了解」](https://aws.amazon.com/blogs/machine-learning/transition-your-amazon-forecast-usage-to-amazon-sagemaker-canvas/) 

## 請求語法
<a name="API_ListWhatIfForecasts_RequestSyntax"></a>

```
{
   "Filters": [ 
      { 
         "Condition": "string",
         "Key": "string",
         "Value": "string"
      }
   ],
   "MaxResults": number,
   "NextToken": "string"
}
```

## 請求參數
<a name="API_ListWhatIfForecasts_RequestParameters"></a>

請求接受採用 JSON 格式的下列資料。

 ** [Filters](#API_ListWhatIfForecasts_RequestSyntax) **   <a name="forecast-ListWhatIfForecasts-request-Filters"></a>
篩選條件陣列。對於每個篩選條件，您提供條件和相符陳述式。條件為 `IS`或 `IS_NOT`，指定要分別包含或排除符合清單中陳述式的假設預測匯出任務。比對陳述式包含索引鍵和值。  
 **篩選條件屬性**   
+  `Condition` - 要套用的條件。有效值為 `IS` 和 `IS_NOT`。若要包含符合 陳述式的預測匯出任務，請指定 `IS`。若要排除相符的預測匯出任務，請指定 `IS_NOT`。
+  `Key` - 要篩選的參數名稱。有效值為 `WhatIfForecastArn` 和 `Status`。
+  `Value` - 要比對的值。
例如，若要列出匯出名為 *electricityWhatIfForecast* 之預測的所有任務，請指定下列篩選條件：  
 `"Filters": [ { "Condition": "IS", "Key": "WhatIfForecastArn", "Value": "arn:aws:forecast:us-west-2:<acct-id>:forecast/electricityWhatIfForecast" } ]`   
類型：[Filter](API_Filter.md) 物件陣列  
必要：否

 ** [MaxResults](#API_ListWhatIfForecasts_RequestSyntax) **   <a name="forecast-ListWhatIfForecasts-request-MaxResults"></a>
回應中要傳回的項目數。  
類型：整數  
有效範圍：最小值為 1。最大值為 100。  
必要：否

 ** [NextToken](#API_ListWhatIfForecasts_RequestSyntax) **   <a name="forecast-ListWhatIfForecasts-request-NextToken"></a>
如果先前請求的結果遭到截斷，回應會包含 `NextToken`。若要擷取下一組結果，請在下一個 中使用字符  請求。字符會在 24 小時後過期。  
類型：字串  
長度限制：長度下限為 1。長度上限為 3000。  
模式：`.+`  
必要：否

## 回應語法
<a name="API_ListWhatIfForecasts_ResponseSyntax"></a>

```
{
   "NextToken": "string",
   "WhatIfForecasts": [ 
      { 
         "CreationTime": number,
         "LastModificationTime": number,
         "Message": "string",
         "Status": "string",
         "WhatIfAnalysisArn": "string",
         "WhatIfForecastArn": "string",
         "WhatIfForecastName": "string"
      }
   ]
}
```

## 回應元素
<a name="API_ListWhatIfForecasts_ResponseElements"></a>

如果動作成功，則服務傳回 HTTP 200 回應。

服務會傳回下列 JSON 格式的資料。

 ** [NextToken](#API_ListWhatIfForecasts_ResponseSyntax) **   <a name="forecast-ListWhatIfForecasts-response-NextToken"></a>
如果先前請求的結果遭到截斷，回應會包含 `NextToken`。若要擷取下一組結果，請在下一個 中使用字符  請求。字符會在 24 小時後過期。  
類型：字串  
長度限制：長度下限為 1。長度上限為 3000。  
模式：`.+`

 ** [WhatIfForecasts](#API_ListWhatIfForecasts_ResponseSyntax) **   <a name="forecast-ListWhatIfForecasts-response-WhatIfForecasts"></a>
描述相符預測的`WhatIfForecasts`物件陣列。  
類型：[WhatIfForecastSummary](API_WhatIfForecastSummary.md) 物件陣列

## 錯誤
<a name="API_ListWhatIfForecasts_Errors"></a>

 ** InvalidInputException **   
我們無法處理請求，因為它包含無效的值或超過有效範圍的值。  
HTTP 狀態碼：400

 ** InvalidNextTokenException **   
字符無效。字符會在 24 小時後過期。  
HTTP 狀態碼：400

## 另請參閱
<a name="API_ListWhatIfForecasts_SeeAlso"></a>

如需在其中一種語言特定 AWS SDKs中使用此 API 的詳細資訊，請參閱下列內容：
+  [AWS 命令列界面 V2](https://docs.aws.amazon.com/goto/cli2/forecast-2018-06-26/ListWhatIfForecasts) 
+  [AWS 適用於 .NET V4 的 SDK](https://docs.aws.amazon.com/goto/DotNetSDKV4/forecast-2018-06-26/ListWhatIfForecasts) 
+  [AWS 適用於 C\$1\$1 的 SDK](https://docs.aws.amazon.com/goto/SdkForCpp/forecast-2018-06-26/ListWhatIfForecasts) 
+  [AWS 適用於 Go 的 SDK v2](https://docs.aws.amazon.com/goto/SdkForGoV2/forecast-2018-06-26/ListWhatIfForecasts) 
+  [AWS 適用於 Java V2 的開發套件](https://docs.aws.amazon.com/goto/SdkForJavaV2/forecast-2018-06-26/ListWhatIfForecasts) 
+  [AWS 適用於 JavaScript V3 的 SDK](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/forecast-2018-06-26/ListWhatIfForecasts) 
+  [AWS 適用於 Kotlin 的 SDK](https://docs.aws.amazon.com/goto/SdkForKotlin/forecast-2018-06-26/ListWhatIfForecasts) 
+  [AWS 適用於 PHP V3 的 SDK](https://docs.aws.amazon.com/goto/SdkForPHPV3/forecast-2018-06-26/ListWhatIfForecasts) 
+  [AWS 適用於 Python 的 SDK](https://docs.aws.amazon.com/goto/boto3/forecast-2018-06-26/ListWhatIfForecasts) 
+  [AWS 適用於 Ruby V3 的 SDK](https://docs.aws.amazon.com/goto/SdkForRubyV3/forecast-2018-06-26/ListWhatIfForecasts) 