deleteForecast method
Deletes a forecast created using the CreateForecast operation. You
can delete only forecasts that have a status of ACTIVE
or
CREATE_FAILED
. To get the status, use the
DescribeForecast operation.
You can't delete a forecast while it is being exported. After a forecast is deleted, you can no longer query the forecast.
May throw InvalidInputException. May throw ResourceNotFoundException. May throw ResourceInUseException.
Parameter forecastArn
:
The Amazon Resource Name (ARN) of the forecast to delete.
Implementation
Future<void> deleteForecast({
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.DeleteForecast'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ForecastArn': forecastArn,
},
);
}