pub struct QueryForecast { /* private fields */ }
Expand description
Fluent builder constructing a request to QueryForecast
.
Retrieves a forecast for a single item, filtered by the supplied criteria.
The criteria is a key-value pair. The key is either item_id
(or the equivalent non-timestamp, non-target field) from the TARGET_TIME_SERIES
dataset, or one of the forecast dimensions specified as part of the FeaturizationConfig
object.
By default, QueryForecast
returns the complete date range for the filtered forecast. You can request a specific date range.
To get the full forecast, use the CreateForecastExportJob operation.
The forecasts generated by Amazon Forecast are in the same timezone as the dataset that was used to create the predictor.
Implementations§
source§impl QueryForecast
impl QueryForecast
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<QueryForecast, AwsResponseRetryClassifier>, SdkError<QueryForecastError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<QueryForecast, AwsResponseRetryClassifier>, SdkError<QueryForecastError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<QueryForecastOutput, SdkError<QueryForecastError>>
pub async fn send(
self
) -> Result<QueryForecastOutput, SdkError<QueryForecastError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn forecast_arn(self, input: impl Into<String>) -> Self
pub fn forecast_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the forecast to query.
sourcepub fn set_forecast_arn(self, input: Option<String>) -> Self
pub fn set_forecast_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the forecast to query.
sourcepub fn start_date(self, input: impl Into<String>) -> Self
pub fn start_date(self, input: impl Into<String>) -> Self
The start date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For example, 2015-01-01T08:00:00.
sourcepub fn set_start_date(self, input: Option<String>) -> Self
pub fn set_start_date(self, input: Option<String>) -> Self
The start date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For example, 2015-01-01T08:00:00.
sourcepub fn end_date(self, input: impl Into<String>) -> Self
pub fn end_date(self, input: impl Into<String>) -> Self
The end date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For example, 2015-01-01T20:00:00.
sourcepub fn set_end_date(self, input: Option<String>) -> Self
pub fn set_end_date(self, input: Option<String>) -> Self
The end date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For example, 2015-01-01T20:00:00.
sourcepub fn filters(self, k: impl Into<String>, v: impl Into<String>) -> Self
pub fn filters(self, k: impl Into<String>, v: impl Into<String>) -> Self
Adds a key-value pair to Filters
.
To override the contents of this collection use set_filters
.
The filtering criteria to apply when retrieving the forecast. For example, to get the forecast for client_21
in the electricity usage dataset, specify the following:
{"item_id" : "client_21"}
To get the full forecast, use the CreateForecastExportJob operation.
sourcepub fn set_filters(self, input: Option<HashMap<String, String>>) -> Self
pub fn set_filters(self, input: Option<HashMap<String, String>>) -> Self
The filtering criteria to apply when retrieving the forecast. For example, to get the forecast for client_21
in the electricity usage dataset, specify the following:
{"item_id" : "client_21"}
To get the full forecast, use the CreateForecastExportJob operation.
sourcepub fn next_token(self, input: impl Into<String>) -> Self
pub fn next_token(self, input: impl Into<String>) -> Self
If the result of the previous request was truncated, the response includes a NextToken
. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.
sourcepub fn set_next_token(self, input: Option<String>) -> Self
pub fn set_next_token(self, input: Option<String>) -> Self
If the result of the previous request was truncated, the response includes a NextToken
. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.
Trait Implementations§
source§impl Clone for QueryForecast
impl Clone for QueryForecast
source§fn clone(&self) -> QueryForecast
fn clone(&self) -> QueryForecast
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more