

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

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

# DescribeForecast
<a name="API_DescribeForecast"></a>

描述使用 [CreateForecast](API_CreateForecast.md) 操作创建的预测。

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

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

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

```
{
   "ForecastArn": "string"
}
```

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

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

 ** [ForecastArn](#API_DescribeForecast_RequestSyntax) **   <a name="forecast-DescribeForecast-request-ForecastArn"></a>
预测的 Amazon 资源名称（ARN）。  
类型：字符串  
长度约束：最大长度为 256。  
模式：`arn:([a-z\d-]+):forecast:.*:.*:.+`  
必需：是

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

```
{
   "CreationTime": number,
   "DatasetGroupArn": "string",
   "EstimatedTimeRemainingInMinutes": number,
   "ForecastArn": "string",
   "ForecastName": "string",
   "ForecastTypes": [ "string" ],
   "LastModificationTime": number,
   "Message": "string",
   "PredictorArn": "string",
   "Status": "string",
   "TimeSeriesSelector": { 
      "TimeSeriesIdentifiers": { 
         "DataSource": { 
            "S3Config": { 
               "KMSKeyArn": "string",
               "Path": "string",
               "RoleArn": "string"
            }
         },
         "Format": "string",
         "Schema": { 
            "Attributes": [ 
               { 
                  "AttributeName": "string",
                  "AttributeType": "string"
               }
            ]
         }
      }
   }
}
```

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

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

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

 ** [CreationTime](#API_DescribeForecast_ResponseSyntax) **   <a name="forecast-DescribeForecast-response-CreationTime"></a>
预测创建任务的创建时间。  
类型：时间戳

 ** [DatasetGroupArn](#API_DescribeForecast_ResponseSyntax) **   <a name="forecast-DescribeForecast-response-DatasetGroupArn"></a>
提供用于训练预测器的数据的数据集组的 ARN。  
类型：字符串  
长度约束：最大长度为 256。  
模式：`arn:([a-z\d-]+):forecast:.*:.*:.+`

 ** [EstimatedTimeRemainingInMinutes](#API_DescribeForecast_ResponseSyntax) **   <a name="forecast-DescribeForecast-response-EstimatedTimeRemainingInMinutes"></a>
完成预测作业的估计剩余时间（分钟）。  
类型：长整型

 ** [ForecastArn](#API_DescribeForecast_ResponseSyntax) **   <a name="forecast-DescribeForecast-response-ForecastArn"></a>
请求中指定的预测 ARN。  
类型：字符串  
长度约束：最大长度为 256。  
模式：`arn:([a-z\d-]+):forecast:.*:.*:.+`

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

 ** [ForecastTypes](#API_DescribeForecast_ResponseSyntax) **   <a name="forecast-DescribeForecast-response-ForecastTypes"></a>
生成概率预测的分位数。  
类型：字符串数组  
数组成员：最少 1 项。最多 20 项。  
长度限制：最小长度为 2。最大长度为 4。  
模式：`(^0?\.\d\d?$|^mean$)`

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

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

 ** [PredictorArn](#API_DescribeForecast_ResponseSyntax) **   <a name="forecast-DescribeForecast-response-PredictorArn"></a>
用于生成预测的预测器的 ARN。  
类型：字符串  
长度约束：最大长度为 256。  
模式：`arn:([a-z\d-]+):forecast:.*:.*:.+`

 ** [Status](#API_DescribeForecast_ResponseSyntax) **   <a name="forecast-DescribeForecast-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\_]+$`

 ** [TimeSeriesSelector](#API_DescribeForecast_ResponseSyntax) **   <a name="forecast-DescribeForecast-response-TimeSeriesSelector"></a>
要包含在预测中的时间序列。  
类型：[TimeSeriesSelector](API_TimeSeriesSelector.md) 对象

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

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

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

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

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