deleteWhatIfForecast method

Future<void> deleteWhatIfForecast({
  1. required String whatIfForecastArn,
})

Deletes a what-if forecast created using the CreateWhatIfForecast operation. You can delete only what-if forecasts that have a status of ACTIVE or CREATE_FAILED. To get the status, use the DescribeWhatIfForecast operation.

You can't delete a what-if forecast while it is being exported. After a what-if forecast is deleted, you can no longer query the what-if analysis.

May throw InvalidInputException. May throw ResourceInUseException. May throw ResourceNotFoundException.

Parameter whatIfForecastArn : The Amazon Resource Name (ARN) of the what-if forecast that you want to delete.

Implementation

Future<void> deleteWhatIfForecast({
  required String whatIfForecastArn,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonForecast.DeleteWhatIfForecast'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'WhatIfForecastArn': whatIfForecastArn,
    },
  );
}