stopResource method
Stops a resource.
The resource undergoes the following states: CREATE_STOPPING
and CREATE_STOPPED. You cannot resume a resource once it has
been stopped.
This operation can be applied to the following resources (and their corresponding child resources):
- Dataset Import Job
- Predictor Job
- Forecast Job
- Forecast Export Job
- Predictor Backtest Export Job
- Explainability Job
- Explainability Export Job
May throw InvalidInputException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
Parameter resourceArn :
The Amazon Resource Name (ARN) that identifies the resource to stop. The
supported ARNs are DatasetImportJobArn,
PredictorArn, PredictorBacktestExportJobArn,
ForecastArn, ForecastExportJobArn,
ExplainabilityArn, and ExplainabilityExportArn.
Implementation
Future<void> stopResource({
required String resourceArn,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonForecast.StopResource'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceArn': resourceArn,
},
);
}