Interface ForecastqueryAsyncClient

All Superinterfaces:
AutoCloseable, AwsClient, SdkAutoCloseable, SdkClient

@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface ForecastqueryAsyncClient extends AwsClient
Service client for accessing Amazon Forecast Query Service asynchronously. This can be created using the static builder() method.The asynchronous client performs non-blocking I/O when configured with any
invalid reference
SdkAsyncHttpClient
supported in the SDK. However, full non-blocking is not guaranteed as the async client may perform blocking calls in some cases such as credentials retrieval and endpoint discovery as part of the async API call.

Provides APIs for creating and managing Amazon Forecast resources.

  • Field Details

  • Method Details

    • queryForecast

      default CompletableFuture<QueryForecastResponse> queryForecast(QueryForecastRequest queryForecastRequest)

      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.

      Parameters:
      queryForecastRequest -
      Returns:
      A Java Future containing the result of the QueryForecast operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException We can't find that resource. Check the information that you've provided and try again.
      • ResourceInUseException The specified resource is in use.
      • InvalidInputException The value is invalid or is too long.
      • LimitExceededException The limit on the number of requests per second has been exceeded.
      • InvalidNextTokenException The token is not valid. Tokens expire after 24 hours.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • ForecastqueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • queryForecast

      default CompletableFuture<QueryForecastResponse> queryForecast(Consumer<QueryForecastRequest.Builder> queryForecastRequest)

      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.


      This is a convenience which creates an instance of the QueryForecastRequest.Builder avoiding the need to create one manually via QueryForecastRequest.builder()

      Parameters:
      queryForecastRequest - A Consumer that will call methods on QueryForecastRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the QueryForecast operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException We can't find that resource. Check the information that you've provided and try again.
      • ResourceInUseException The specified resource is in use.
      • InvalidInputException The value is invalid or is too long.
      • LimitExceededException The limit on the number of requests per second has been exceeded.
      • InvalidNextTokenException The token is not valid. Tokens expire after 24 hours.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • ForecastqueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • queryWhatIfForecast

      default CompletableFuture<QueryWhatIfForecastResponse> queryWhatIfForecast(QueryWhatIfForecastRequest queryWhatIfForecastRequest)

      Retrieves a what-if forecast.

      Parameters:
      queryWhatIfForecastRequest -
      Returns:
      A Java Future containing the result of the QueryWhatIfForecast operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException We can't find that resource. Check the information that you've provided and try again.
      • ResourceInUseException The specified resource is in use.
      • InvalidInputException The value is invalid or is too long.
      • LimitExceededException The limit on the number of requests per second has been exceeded.
      • InvalidNextTokenException The token is not valid. Tokens expire after 24 hours.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • ForecastqueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • queryWhatIfForecast

      default CompletableFuture<QueryWhatIfForecastResponse> queryWhatIfForecast(Consumer<QueryWhatIfForecastRequest.Builder> queryWhatIfForecastRequest)

      Retrieves a what-if forecast.


      This is a convenience which creates an instance of the QueryWhatIfForecastRequest.Builder avoiding the need to create one manually via QueryWhatIfForecastRequest.builder()

      Parameters:
      queryWhatIfForecastRequest - A Consumer that will call methods on QueryWhatIfForecastRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the QueryWhatIfForecast operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException We can't find that resource. Check the information that you've provided and try again.
      • ResourceInUseException The specified resource is in use.
      • InvalidInputException The value is invalid or is too long.
      • LimitExceededException The limit on the number of requests per second has been exceeded.
      • InvalidNextTokenException The token is not valid. Tokens expire after 24 hours.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • ForecastqueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • serviceClientConfiguration

      default ForecastqueryServiceClientConfiguration serviceClientConfiguration()
      Description copied from interface: SdkClient
      The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration
      Specified by:
      serviceClientConfiguration in interface AwsClient
      Specified by:
      serviceClientConfiguration in interface SdkClient
      Returns:
      SdkServiceClientConfiguration
    • create

      static ForecastqueryAsyncClient create()
      Create a ForecastqueryAsyncClient with the region loaded from the DefaultAwsRegionProviderChain and credentials loaded from the DefaultCredentialsProvider.
    • builder

      Create a builder that can be used to configure and create a ForecastqueryAsyncClient.