Documentation ¶
Overview ¶
Package forecastquery provides the client and types for making API requests to Amazon Forecast Query Service.
Provides APIs for creating and managing Amazon Forecast resources.
See https://docs.aws.amazon.com/goto/WebAPI/forecastquery-2018-06-26 for more information on this service.
See forecastquery package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/forecastquery/
Using the Client ¶
To use Amazon Forecast Query Service with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.
See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/
See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
See the Amazon Forecast Query Service client for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/forecastquery/#New
Index ¶
Constants ¶
const ( ServiceName = "Amazon Forecast Query Service" // Service's name ServiceID = "Forecastquery" // Service's identifier EndpointsID = "forecastquery" // Service's Endpoint identifier )
const ( // ErrCodeInvalidInputException for service response error code // "InvalidInputException". // // The value that you provided was invalid or too long. ErrCodeInvalidInputException = "InvalidInputException" // ErrCodeInvalidNextTokenException for service response error code // "InvalidNextTokenException". // // The token is not valid. Tokens expire after 24 hours. ErrCodeInvalidNextTokenException = "InvalidNextTokenException" // ErrCodeLimitExceededException for service response error code // "LimitExceededException". // // The limit on the number of requests per second has been exceeded. ErrCodeLimitExceededException = "LimitExceededException" // ErrCodeResourceInUseException for service response error code // "ResourceInUseException". // // The specified resource is in use. ErrCodeResourceInUseException = "ResourceInUseException" // ErrCodeResourceNotFoundException for service response error code // "ResourceNotFoundException". // // We can't find that resource. Check the information that you've provided and // try again. ErrCodeResourceNotFoundException = "ResourceNotFoundException" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client provides the API operation methods for making requests to Amazon Forecast Query Service. See this package's package overview docs for details on the service.
The client's methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.
func New ¶
New creates a new instance of the client from the provided Config.
Example:
// Create a client from just a config. svc := forecastquery.New(myConfig)
func (*Client) QueryForecastRequest ¶
func (c *Client) QueryForecastRequest(input *QueryForecastInput) QueryForecastRequest
QueryForecastRequest returns a request value for making API operation for Amazon Forecast Query Service.
Retrieves a forecast 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, the complete date range of the filtered forecast is returned. Optionally, you can request a specific date range within the forecast.
The forecasts generated by Amazon Forecast are in the same timezone as the dataset that was used to create the predictor.
// Example sending a request using QueryForecastRequest. req := client.QueryForecastRequest(params) resp, err := req.Send(context.TODO()) if err == nil { fmt.Println(resp) }
Please also see https://docs.aws.amazon.com/goto/WebAPI/forecastquery-2018-06-26/QueryForecast
type DataPoint ¶
type DataPoint struct { // The timestamp of the specific forecast. Timestamp *string `type:"string"` // The forecast value. Value *float64 `type:"double"` // contains filtered or unexported fields }
The forecast value for a specific date. Part of the Forecast object.
type Forecast ¶
type Forecast struct { // The forecast. // // The string of the string to array map is one of the following values: // // * mean // // * p10 // // * p50 // // * p90 Predictions map[string][]DataPoint `type:"map"` // contains filtered or unexported fields }
Provides information about a forecast. Returned as part of the QueryForecast response.
type QueryForecastInput ¶
type QueryForecastInput struct { // The end date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss'Z' // (ISO 8601 format). For example, "1970-01-01T00:00:00Z." EndDate *string `type:"string"` // The filtering criteria to apply when retrieving the forecast. For example: // // * To get a forecast for a specific item specify the following: {"item_id" // : "client_1"} // // * To get a forecast for a specific item sold in a specific location, specify // the following: {"item_id" : "client_1", "location" : "ny"} // // * To get a forecast for all blue items sold in a specific location, specify // the following: { "location" : "ny", "color":"blue"} // // To get the full forecast, use the operation. // // Filters is a required field Filters map[string]string `min:"1" type:"map" required:"true"` // The Amazon Resource Name (ARN) of the forecast to query. // // ForecastArn is a required field ForecastArn *string `type:"string" required:"true"` // 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. NextToken *string `min:"1" type:"string"` // The start date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss'Z' // (ISO 8601 format) For example, "1970-01-01T00:00:00Z." StartDate *string `type:"string"` // contains filtered or unexported fields }
func (QueryForecastInput) String ¶
func (s QueryForecastInput) String() string
String returns the string representation
func (*QueryForecastInput) Validate ¶
func (s *QueryForecastInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type QueryForecastOutput ¶
type QueryForecastOutput struct { // The forecast. Forecast *Forecast `type:"structure"` // contains filtered or unexported fields }
func (QueryForecastOutput) String ¶
func (s QueryForecastOutput) String() string
String returns the string representation
type QueryForecastRequest ¶
type QueryForecastRequest struct { *aws.Request Input *QueryForecastInput Copy func(*QueryForecastInput) QueryForecastRequest }
QueryForecastRequest is the request type for the QueryForecast API operation.
func (QueryForecastRequest) Send ¶
func (r QueryForecastRequest) Send(ctx context.Context) (*QueryForecastResponse, error)
Send marshals and sends the QueryForecast API request.
type QueryForecastResponse ¶
type QueryForecastResponse struct { *QueryForecastOutput // contains filtered or unexported fields }
QueryForecastResponse is the response type for the QueryForecast API operation.
func (*QueryForecastResponse) SDKResponseMetdata ¶
func (r *QueryForecastResponse) SDKResponseMetdata() *aws.Response
SDKResponseMetdata returns the response metadata for the QueryForecast request.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package forecastqueryiface provides an interface to enable mocking the Amazon Forecast Query Service service client for testing your code.
|
Package forecastqueryiface provides an interface to enable mocking the Amazon Forecast Query Service service client for testing your code. |