stopNotebookInstance method
Terminates the ML compute instance. Before terminating the instance,
Amazon SageMaker disconnects the ML storage volume from it. Amazon
SageMaker preserves the ML storage volume. Amazon SageMaker stops charging
you for the ML compute instance when you call
StopNotebookInstance
.
To access data on the ML storage volume for a notebook instance that has
been terminated, call the StartNotebookInstance
API.
StartNotebookInstance
launches another ML compute instance,
configures it, and attaches the preserved ML storage volume so you can
continue your work.
Parameter notebookInstanceName
:
The name of the notebook instance to terminate.
Implementation
Future<void> stopNotebookInstance({
required String notebookInstanceName,
}) async {
ArgumentError.checkNotNull(notebookInstanceName, 'notebookInstanceName');
_s.validateStringLength(
'notebookInstanceName',
notebookInstanceName,
0,
63,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.StopNotebookInstance'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'NotebookInstanceName': notebookInstanceName,
},
);
}