describeForecast method

Future<DescribeForecastResponse> describeForecast({
  1. required String forecastArn,
})

Describes a forecast created using the CreateForecast operation.

In addition to listing the properties provided in the CreateForecast request, this operation lists the following properties:

  • DatasetGroupArn - The dataset group that provided the training data.
  • CreationTime
  • LastModificationTime
  • Status
  • Message - If an error occurred, information about the error.

May throw InvalidInputException. May throw ResourceNotFoundException.

Parameter forecastArn : The Amazon Resource Name (ARN) of the forecast.

Implementation

Future<DescribeForecastResponse> describeForecast({
  required String forecastArn,
}) async {
  ArgumentError.checkNotNull(forecastArn, 'forecastArn');
  _s.validateStringLength(
    'forecastArn',
    forecastArn,
    0,
    256,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonForecast.DescribeForecast'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ForecastArn': forecastArn,
    },
  );

  return DescribeForecastResponse.fromJson(jsonResponse.body);
}