

 Amazon Forecast 不再向新买家开放。Amazon Forecast 的现有客户可以继续照常使用该服务。[了解更多](https://aws.amazon.com/blogs/machine-learning/transition-your-amazon-forecast-usage-to-amazon-sagemaker-canvas/)

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# DescribeWhatIfForecast
<a name="API_DescribeWhatIfForecast"></a>

描述使用 [CreateWhatIfForecast](API_CreateWhatIfForecast.md) 操作创建的假设分析预测。

**重要**  
Amazon Forecast 不再向新买家开放。Amazon Forecast 的现有客户可以继续照常使用该服务。[了解更多](https://aws.amazon.com/blogs/machine-learning/transition-your-amazon-forecast-usage-to-amazon-sagemaker-canvas/) 

除了列出 `CreateWhatIfForecast` 请求中提供的属性外，该操作还列出了以下属性：
+  `CreationTime` 
+  `LastModificationTime` 
+  `Message` - 如果出现错误，则为错误相关的信息。
+  `Status` 

## 请求语法
<a name="API_DescribeWhatIfForecast_RequestSyntax"></a>

```
{
   "WhatIfForecastArn": "{{string}}"
}
```

## 请求参数
<a name="API_DescribeWhatIfForecast_RequestParameters"></a>

请求接受采用 JSON 格式的以下数据。

 ** [WhatIfForecastArn](#API_DescribeWhatIfForecast_RequestSyntax) **   <a name="forecast-DescribeWhatIfForecast-request-WhatIfForecastArn"></a>
您感兴趣的假设分析预测的 Amazon 资源名称（ARN）。  
类型：字符串  
长度限制：最大长度为 300。  
模式：`arn:([a-z\d-]+):forecast:.*:.*:.+`  
必需：是

## 响应语法
<a name="API_DescribeWhatIfForecast_ResponseSyntax"></a>

```
{
   "CreationTime": number,
   "EstimatedTimeRemainingInMinutes": number,
   "ForecastTypes": [ "string" ],
   "LastModificationTime": number,
   "Message": "string",
   "Status": "string",
   "TimeSeriesReplacementsDataSource": { 
      "Format": "string",
      "S3Config": { 
         "KMSKeyArn": "string",
         "Path": "string",
         "RoleArn": "string"
      },
      "Schema": { 
         "Attributes": [ 
            { 
               "AttributeName": "string",
               "AttributeType": "string"
            }
         ]
      },
      "TimestampFormat": "string"
   },
   "TimeSeriesTransformations": [ 
      { 
         "Action": { 
            "AttributeName": "string",
            "Operation": "string",
            "Value": number
         },
         "TimeSeriesConditions": [ 
            { 
               "AttributeName": "string",
               "AttributeValue": "string",
               "Condition": "string"
            }
         ]
      }
   ],
   "WhatIfAnalysisArn": "string",
   "WhatIfForecastArn": "string",
   "WhatIfForecastName": "string"
}
```

## 响应元素
<a name="API_DescribeWhatIfForecast_ResponseElements"></a>

如果此操作成功，则该服务将会发送回 HTTP 200 响应。

服务以 JSON 格式返回以下数据。

 ** [CreationTime](#API_DescribeWhatIfForecast_ResponseSyntax) **   <a name="forecast-DescribeWhatIfForecast-response-CreationTime"></a>
假设分析预测的创建时间。  
类型：时间戳

 ** [EstimatedTimeRemainingInMinutes](#API_DescribeWhatIfForecast_ResponseSyntax) **   <a name="forecast-DescribeWhatIfForecast-response-EstimatedTimeRemainingInMinutes"></a>
完成假设分析预测的大致剩余时间（分钟）。  
类型：长整型

 ** [ForecastTypes](#API_DescribeWhatIfForecast_ResponseSyntax) **   <a name="forecast-DescribeWhatIfForecast-response-ForecastTypes"></a>
生成概率预测的分位数。在 [CreateWhatIfForecast](API_CreateWhatIfForecast.md) 操作中，您最多可以为每个假设分析预测指定五个分位数。如果您未指定分位数，则默认值为 `["0.1", "0.5", "0.9"]`。  
类型：字符串数组  
数组成员：最少 1 项。最多 20 项。  
长度限制：最小长度为 2。最大长度为 4。  
模式：`(^0?\.\d\d?$|^mean$)`

 ** [LastModificationTime](#API_DescribeWhatIfForecast_ResponseSyntax) **   <a name="forecast-DescribeWhatIfForecast-response-LastModificationTime"></a>
上次修改资源的时间。时间戳取决于作业的状态：  
+  `CREATE_PENDING` - `CreationTime`。
+  `CREATE_IN_PROGRESS` - 当前时间戳。
+  `CREATE_STOPPING` - 当前时间戳。
+  `CREATE_STOPPED` - 当作业停止时。
+  `ACTIVE` 或者 `CREATE_FAILED` - 当作业完成或失败时。
类型：时间戳

 ** [Message](#API_DescribeWhatIfForecast_ResponseSyntax) **   <a name="forecast-DescribeWhatIfForecast-response-Message"></a>
如果出现错误，则为错误的信息消息。  
类型：字符串

 ** [Status](#API_DescribeWhatIfForecast_ResponseSyntax) **   <a name="forecast-DescribeWhatIfForecast-response-Status"></a>
假设分析预测的状态。状态包括：  
+  `ACTIVE` 
+  `CREATE_PENDING`, `CREATE_IN_PROGRESS`, `CREATE_FAILED` 
+  `CREATE_STOPPING`, `CREATE_STOPPED` 
+  `DELETE_PENDING`, `DELETE_IN_PROGRESS`, `DELETE_FAILED` 
在访问预测之前，假设分析预测的 `Status` 必须为 `ACTIVE`。
类型：字符串  
长度约束：最大长度为 256。  
模式：`^[a-zA-Z0-9\_]+$`

 ** [TimeSeriesReplacementsDataSource](#API_DescribeWhatIfForecast_ResponseSyntax) **   <a name="forecast-DescribeWhatIfForecast-response-TimeSeriesReplacementsDataSource"></a>
描述替换时间序列的 `S3Config`、`Schema` 和 `Format` 元素的数组。  
类型：[TimeSeriesReplacementsDataSource](API_TimeSeriesReplacementsDataSource.md) 对象

 ** [TimeSeriesTransformations](#API_DescribeWhatIfForecast_ResponseSyntax) **   <a name="forecast-DescribeWhatIfForecast-response-TimeSeriesTransformations"></a>
`Action` 和 `TimeSeriesConditions` 元素的数组，用于描述对哪些时间序列进行了转换。  
类型：[TimeSeriesTransformation](API_TimeSeriesTransformation.md) 对象数组  
数组成员：最少 0 个物品。最多 30 项。

 ** [WhatIfAnalysisArn](#API_DescribeWhatIfForecast_ResponseSyntax) **   <a name="forecast-DescribeWhatIfForecast-response-WhatIfAnalysisArn"></a>
包含该预测的假设分析的 Amazon 资源名称（ARN）。  
类型：字符串  
长度约束：最大长度为 256。  
模式：`arn:([a-z\d-]+):forecast:.*:.*:.+`

 ** [WhatIfForecastArn](#API_DescribeWhatIfForecast_ResponseSyntax) **   <a name="forecast-DescribeWhatIfForecast-response-WhatIfForecastArn"></a>
假设分析预测的 Amazon 资源名称（ARN）。  
类型：字符串  
长度限制：最大长度为 300。  
模式：`arn:([a-z\d-]+):forecast:.*:.*:.+`

 ** [WhatIfForecastName](#API_DescribeWhatIfForecast_ResponseSyntax) **   <a name="forecast-DescribeWhatIfForecast-response-WhatIfForecastName"></a>
假设分析预测的名称。  
类型：字符串  
长度限制：最小长度为 1。最大长度为 63。  
模式：`^[a-zA-Z][a-zA-Z0-9_]*`

## 错误
<a name="API_DescribeWhatIfForecast_Errors"></a>

 ** InvalidInputException **   
我们无法处理该请求，因为其包含无效值或超出有效范围的值。  
HTTP 状态代码：400

 ** ResourceNotFoundException **   
我们找不到具有该 Amazon 资源名称（ARN）的资源。检查 ARN，然后重试。  
HTTP 状态代码：400

## 另请参阅
<a name="API_DescribeWhatIfForecast_SeeAlso"></a>

有关以特定语言之一使用此 API 的更多信息 AWS SDKs，请参阅以下内容：
+  [AWS 命令行界面 V2](https://docs.aws.amazon.com/goto/cli2/forecast-2018-06-26/DescribeWhatIfForecast) 
+  [AWS 适用于.NET 的 SDK V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/forecast-2018-06-26/DescribeWhatIfForecast) 
+  [AWS 适用于 C\+\+ 的 SDK](https://docs.aws.amazon.com/goto/SdkForCpp/forecast-2018-06-26/DescribeWhatIfForecast) 
+  [AWS 适用于 Go v2 的 SDK](https://docs.aws.amazon.com/goto/SdkForGoV2/forecast-2018-06-26/DescribeWhatIfForecast) 
+  [AWS 适用于 Java 的 SDK V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/forecast-2018-06-26/DescribeWhatIfForecast) 
+  [AWS JavaScript V3 版软件开发工具包](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/forecast-2018-06-26/DescribeWhatIfForecast) 
+  [AWS 适用于 Kotlin 的 SDK](https://docs.aws.amazon.com/goto/SdkForKotlin/forecast-2018-06-26/DescribeWhatIfForecast) 
+  [AWS 适用于 PHP 的 SDK V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/forecast-2018-06-26/DescribeWhatIfForecast) 
+  [AWS Python 软件开发工具包](https://docs.aws.amazon.com/goto/boto3/forecast-2018-06-26/DescribeWhatIfForecast) 
+  [AWS 适用于 Ruby V3 的 SDK](https://docs.aws.amazon.com/goto/SdkForRubyV3/forecast-2018-06-26/DescribeWhatIfForecast) 