Class: Aws::ForecastQueryService::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::ForecastQueryService::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-forecastqueryservice/client.rb
Overview
An API client for ForecastQueryService. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::ForecastQueryService::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#query_forecast(params = {}) ⇒ Types::QueryForecastResponse
Retrieves a forecast for a single item, filtered by the supplied criteria.
-
#query_what_if_forecast(params = {}) ⇒ Types::QueryWhatIfForecastResponse
Retrieves a what-if forecast.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
451 452 453 |
# File 'lib/aws-sdk-forecastqueryservice/client.rb', line 451 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
641 642 643 |
# File 'lib/aws-sdk-forecastqueryservice/client.rb', line 641 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
644 645 646 |
# File 'lib/aws-sdk-forecastqueryservice/client.rb', line 644 def errors_module Errors end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 |
# File 'lib/aws-sdk-forecastqueryservice/client.rb', line 614 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::ForecastQueryService') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-forecastqueryservice' context[:gem_version] = '1.47.0' Seahorse::Client::Request.new(handlers, context) end |
#query_forecast(params = {}) ⇒ Types::QueryForecastResponse
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.
<note markdown=“1”> The forecasts generated by Amazon Forecast are in the same timezone as the dataset that was used to create the predictor.
</note>
[1]: docs.aws.amazon.com/en_us/forecast/latest/dg/API_CreateForecastExportJob.html
539 540 541 542 |
# File 'lib/aws-sdk-forecastqueryservice/client.rb', line 539 def query_forecast(params = {}, = {}) req = build_request(:query_forecast, params) req.send_request() end |
#query_what_if_forecast(params = {}) ⇒ Types::QueryWhatIfForecastResponse
Retrieves a what-if forecast.
605 606 607 608 |
# File 'lib/aws-sdk-forecastqueryservice/client.rb', line 605 def query_what_if_forecast(params = {}, = {}) req = build_request(:query_what_if_forecast, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
634 635 636 |
# File 'lib/aws-sdk-forecastqueryservice/client.rb', line 634 def waiter_names [] end |