

 Amazon Forecast は新規顧客には利用できなくなりました。Amazon Forecast の既存のお客様は、通常どおりサービスを引き続き使用できます。[詳細はこちら](https://aws.amazon.com/blogs/machine-learning/transition-your-amazon-forecast-usage-to-amazon-sagemaker-canvas/)

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# CreateWhatIfForecastExport
<a name="API_CreateWhatIfForecastExport"></a>

[CreateWhatIfForecast](API_CreateWhatIfForecast.md) オペレーションによって作成された予測を Amazon Simple Storage Service (Amazon S3) バケットにエクスポートします。予測ファイル名は、次の規則に一致します。

 `≈<ForecastExportJobName>_<ExportTimestamp>_<PartNumber>` 

<ExportTimestamp> コンポーネントは、Java SimpleDateFormat (yyyy-MM-ddTHH-mm-ssZ) です。

**重要**  
Amazon Forecast は新規顧客には利用できなくなりました。Amazon Forecast の既存のお客様は、通常どおりサービスを引き続き使用できます。[詳細はこちら](https://aws.amazon.com/blogs/machine-learning/transition-your-amazon-forecast-usage-to-amazon-sagemaker-canvas/) 

Amazon Forecast が Amazon S3 バケットにアクセスするために引き受けることができる AWS Identity and Access Management (IAM) ロールを含む [DataDestination](API_DataDestination.md) オブジェクトを指定する必要があります。詳細については、「[Amazon Forecast のアクセス許可を設定する](aws-forecast-iam-roles.md)」を参照してください。

詳細については、「[予測の生成](howitworks-forecast.md)」を参照してください。

すべての What-If 予想エクスポートジョブのリストを取得するには、[ListWhatIfForecastExports](API_ListWhatIfForecastExports.md) オペレーションを使用します。

**注記**  
Amazon S3 バケットの予測にアクセスする前に、予測エクスポートジョブの `Status` が `ACTIVE` となっている必要があります。[DescribeWhatIfForecastExport](API_DescribeWhatIfForecastExport.md) オペレーションを使用して、ステータスを取得します。

## リクエストの構文
<a name="API_CreateWhatIfForecastExport_RequestSyntax"></a>

```
{
   "Destination": { 
      "S3Config": { 
         "KMSKeyArn": "string",
         "Path": "string",
         "RoleArn": "string"
      }
   },
   "Format": "string",
   "Tags": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ],
   "WhatIfForecastArns": [ "string" ],
   "WhatIfForecastExportName": "string"
}
```

## リクエストパラメーター
<a name="API_CreateWhatIfForecastExport_RequestParameters"></a>

リクエストは以下のデータを JSON 形式で受け入れます。

 ** [Destination](#API_CreateWhatIfForecastExport_RequestSyntax) **   <a name="forecast-CreateWhatIfForecastExport-request-Destination"></a>
予測を保存する場所と、Amazon Forecast がその場所にアクセスするために引き受けることができる AWS Identity and Access Management (IAM) ロール。予測は Amazon S3 バケットにエクスポートする必要があります。  
暗号化を使用する場合は、 AWS Key Management Service (KMS) キーを含める`Destination`必要があります。IAM ロールは、Amazon Forecast がキーにアクセスすることを許可する必要があります。  
型: [DataDestination](API_DataDestination.md) オブジェクト  
必須: はい

 ** [Format](#API_CreateWhatIfForecastExport_RequestSyntax) **   <a name="forecast-CreateWhatIfForecastExport-request-Format"></a>
エクスポートされたデータの形式は CSV または PARQUETのいずれかです。  
タイプ: 文字列  
長さの制限: 最大長は 7 です。  
パターン: `^CSV|PARQUET$`   
必須: いいえ

 ** [Tags](#API_CreateWhatIfForecastExport_RequestSyntax) **   <a name="forecast-CreateWhatIfForecastExport-request-Tags"></a>
What-If 予想に適用する[タグ](https://docs.aws.amazon.com/forecast/latest/dg/tagging-forecast-resources.html)のリスト。  
型: [Tag](API_Tag.md) オブジェクトの配列  
配列メンバー: 最小数は 0 項目です。最大数は 200 項目です。  
必須: いいえ

 ** [WhatIfForecastArns](#API_CreateWhatIfForecastExport_RequestSyntax) **   <a name="forecast-CreateWhatIfForecastExport-request-WhatIfForecastArns"></a>
エクスポートする What-If 予想 Amazon リソースネーム (ARN) のリスト。  
型: 文字列の配列  
配列メンバー: 最小数は 1 項目です。最大数は 50 項目です。  
長さの制限: 最大長は 300 です。  
パターン: `arn:([a-z\d-]+):forecast:.*:.*:.+`   
必須: はい

 ** [WhatIfForecastExportName](#API_CreateWhatIfForecastExport_RequestSyntax) **   <a name="forecast-CreateWhatIfForecastExport-request-WhatIfForecastExportName"></a>
エクスポートする What-If 予想の名前。  
タイプ: 文字列  
長さの制約: 最小長は 1 です。最大長は 63 です。  
パターン: `^[a-zA-Z][a-zA-Z0-9_]*`   
必須: はい

## レスポンスの構文
<a name="API_CreateWhatIfForecastExport_ResponseSyntax"></a>

```
{
   "WhatIfForecastExportArn": "string"
}
```

## レスポンス要素
<a name="API_CreateWhatIfForecastExport_ResponseElements"></a>

アクションが成功すると、サービスは HTTP 200 レスポンスを返します。

サービスから以下のデータが JSON 形式で返されます。

 ** [WhatIfForecastExportArn](#API_CreateWhatIfForecastExport_ResponseSyntax) **   <a name="forecast-CreateWhatIfForecastExport-response-WhatIfForecastExportArn"></a>
What-If 予想の Amazon リソースネーム (ARN)。  
タイプ: 文字列  
長さの制限: 最大長は 300 です。  
パターン: `arn:([a-z\d-]+):forecast:.*:.*:.+` 

## エラー
<a name="API_CreateWhatIfForecastExport_Errors"></a>

 ** InvalidInputException **   
無効な値または有効な範囲を超える値が含まれているため、リクエストを処理できません。  
HTTP ステータスコード: 400

 ** LimitExceededException **   
アカウントあたりのリソース数の制限を超えました。  
HTTP ステータスコード: 400

 ** ResourceAlreadyExistsException **   
この名前のリソースは既に存在します。別の名前で再試行してください。  
HTTP ステータスコード: 400

 ** ResourceInUseException **   
指定されたリソースは使用中です。  
HTTP ステータスコード: 400

 ** ResourceNotFoundException **   
その Amazon リソースネーム (ARN) を持つリソースが見つかりません。ARN を確認して、もう一度お試しください。  
HTTP ステータスコード: 400

## 以下の資料も参照してください。
<a name="API_CreateWhatIfForecastExport_SeeAlso"></a>

言語固有の AWS SDKs のいずれかでこの API を使用する方法の詳細については、以下を参照してください。
+  [AWS コマンドラインインターフェイス V2](https://docs.aws.amazon.com/goto/cli2/forecast-2018-06-26/CreateWhatIfForecastExport) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/forecast-2018-06-26/CreateWhatIfForecastExport) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/forecast-2018-06-26/CreateWhatIfForecastExport) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/forecast-2018-06-26/CreateWhatIfForecastExport) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/forecast-2018-06-26/CreateWhatIfForecastExport) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/forecast-2018-06-26/CreateWhatIfForecastExport) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/forecast-2018-06-26/CreateWhatIfForecastExport) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/forecast-2018-06-26/CreateWhatIfForecastExport) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/forecast-2018-06-26/CreateWhatIfForecastExport) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/forecast-2018-06-26/CreateWhatIfForecastExport) 