Skip to main content

what_if_forecast_exports

Creates, updates, deletes, gets or lists a what_if_forecast_exports resource.

Overview

Namewhat_if_forecast_exports
TypeResource
Idaws.forecast.what_if_forecast_exports

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)When the what-if forecast export was created.
destinationobjectThe destination for an export job. Provide an S3 path, an Identity and Access Management (IAM) role that allows Amazon Forecast to access the location, and an Key Management Service (KMS) key (optional).
estimated_time_remaining_in_minutesinteger (int64)The approximate time remaining to complete the what-if forecast export, in minutes.
formatstringThe format of the exported data, CSV or PARQUET. (pattern: <code>^CSV|PARQUET$</code>)
last_modification_timestring (date-time)The last time the resource was modified. The timestamp depends on the status of the job: CREATE_PENDING - The CreationTime. CREATE_IN_PROGRESS - The current timestamp. CREATE_STOPPING - The current timestamp. CREATE_STOPPED - When the job stopped. ACTIVE or CREATE_FAILED - When the job finished or failed.
messagestringIf an error occurred, an informational message about the error.
statusstringThe status of the what-if forecast. States include: ACTIVE CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED CREATE_STOPPING, CREATE_STOPPED DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED The Status of the what-if forecast export must be ACTIVE before you can access the forecast export.
what_if_forecast_arnsarrayAn array of Amazon Resource Names (ARNs) that represent all of the what-if forecasts exported in this resource.
what_if_forecast_export_arnstringThe Amazon Resource Name (ARN) of the what-if forecast export. (pattern: <code>arn:([a-z\d-]+):forecast:.:.:.+</code>)
what_if_forecast_export_namestringThe name of the what-if forecast export. (pattern: <code>^[a-zA-Z][a-zA-Z0-9_]*</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_what_if_forecast_exportselectregionDescribes the what-if forecast export created using the CreateWhatIfForecastExport operation. In addition to listing the properties provided in the CreateWhatIfForecastExport request, this operation lists the following properties: CreationTime LastModificationTime Message - If an error occurred, information about the error. Status
list_what_if_forecast_exportsselectregionReturns a list of what-if forecast exports created using the CreateWhatIfForecastExport operation. For each what-if forecast export, 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 export ARN with the DescribeWhatIfForecastExport operation.
create_what_if_forecast_exportinsertregion, WhatIfForecastExportName, WhatIfForecastArnsExports a forecast created by the CreateWhatIfForecast operation to your Amazon Simple Storage Service (Amazon S3) bucket. The forecast file name will match the following conventions: ≈<ForecastExportJobName><ExportTimestamp><PartNumber> The <ExportTimestamp> component is in Java SimpleDateFormat (yyyy-MM-ddTHH-mm-ssZ). You must specify a DataDestination object that includes an Identity and Access Management (IAM) role that Amazon Forecast can assume to access the Amazon S3 bucket. For more information, see aws-forecast-iam-roles. For more information, see howitworks-forecast. To get a list of all your what-if forecast export jobs, use the ListWhatIfForecastExports operation. The Status of the forecast export job must be ACTIVE before you can access the forecast in your Amazon S3 bucket. To get the status, use the DescribeWhatIfForecastExport operation.
delete_what_if_forecast_exportdeleteregionDeletes a what-if forecast export created using the CreateWhatIfForecastExport operation. You can delete only what-if forecast exports that have a status of ACTIVE or CREATE_FAILED. To get the status, use the DescribeWhatIfForecastExport operation.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Describes the what-if forecast export created using the CreateWhatIfForecastExport operation. In addition to listing the properties provided in the CreateWhatIfForecastExport request, this operation lists the following properties: CreationTime LastModificationTime Message - If an error occurred, information about the error. Status

SELECT
creation_time,
destination,
estimated_time_remaining_in_minutes,
format,
last_modification_time,
message,
status,
what_if_forecast_arns,
what_if_forecast_export_arn,
what_if_forecast_export_name
FROM aws.forecast.what_if_forecast_exports
WHERE region = '{{ region }}' -- required
;

INSERT examples

Exports a forecast created by the CreateWhatIfForecast operation to your Amazon Simple Storage Service (Amazon S3) bucket. The forecast file name will match the following conventions: ≈<ForecastExportJobName><ExportTimestamp><PartNumber> The <ExportTimestamp> component is in Java SimpleDateFormat (yyyy-MM-ddTHH-mm-ssZ). You must specify a DataDestination object that includes an Identity and Access Management (IAM) role that Amazon Forecast can assume to access the Amazon S3 bucket. For more information, see aws-forecast-iam-roles. For more information, see howitworks-forecast. To get a list of all your what-if forecast export jobs, use the ListWhatIfForecastExports operation. The Status of the forecast export job must be ACTIVE before you can access the forecast in your Amazon S3 bucket. To get the status, use the DescribeWhatIfForecastExport operation.

INSERT INTO aws.forecast.what_if_forecast_exports (
WhatIfForecastExportName,
WhatIfForecastArns,
Destination,
Tags,
Format,
region
)
SELECT
'{{ WhatIfForecastExportName }}' /* required */,
'{{ WhatIfForecastArns }}' /* required */,
'{{ Destination }}',
'{{ Tags }}',
'{{ Format }}',
'{{ region }}'
RETURNING
what_if_forecast_export_arn
;

DELETE examples

Deletes a what-if forecast export created using the CreateWhatIfForecastExport operation. You can delete only what-if forecast exports that have a status of ACTIVE or CREATE_FAILED. To get the status, use the DescribeWhatIfForecastExport operation.

DELETE FROM aws.forecast.what_if_forecast_exports
WHERE region = '{{ region }}' --required
;