

# StopNotebookInstance
<a name="API_StopNotebookInstance"></a>

Terminates the ML compute instance. Before terminating the instance, SageMaker AI disconnects the ML storage volume from it. SageMaker AI preserves the ML storage volume. SageMaker AI 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. 

## Request Syntax
<a name="API_StopNotebookInstance_RequestSyntax"></a>

```
{
   "NotebookInstanceName": "{{string}}"
}
```

## Request Parameters
<a name="API_StopNotebookInstance_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [NotebookInstanceName](#API_StopNotebookInstance_RequestSyntax) **   <a name="sagemaker-StopNotebookInstance-request-NotebookInstanceName"></a>
The name of the notebook instance to terminate.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 63.  
Pattern: `[a-zA-Z0-9](-*[a-zA-Z0-9])*`   
Required: Yes

## Response Elements
<a name="API_StopNotebookInstance_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_StopNotebookInstance_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

## See Also
<a name="API_StopNotebookInstance_SeeAlso"></a>

For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon Command Line Interface V2](https://docs.amazonaws.cn/goto/cli2/sagemaker-2017-07-24/StopNotebookInstance) 
+  [Amazon SDK for .NET V4](https://docs.amazonaws.cn/goto/DotNetSDKV4/sagemaker-2017-07-24/StopNotebookInstance) 
+  [Amazon SDK for C\+\+](https://docs.amazonaws.cn/goto/SdkForCpp/sagemaker-2017-07-24/StopNotebookInstance) 
+  [Amazon SDK for Go v2](https://docs.amazonaws.cn/goto/SdkForGoV2/sagemaker-2017-07-24/StopNotebookInstance) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/sagemaker-2017-07-24/StopNotebookInstance) 
+  [Amazon SDK for JavaScript V3](https://docs.amazonaws.cn/goto/SdkForJavaScriptV3/sagemaker-2017-07-24/StopNotebookInstance) 
+  [Amazon SDK for Kotlin](https://docs.amazonaws.cn/goto/SdkForKotlin/sagemaker-2017-07-24/StopNotebookInstance) 
+  [Amazon SDK for PHP V3](https://docs.amazonaws.cn/goto/SdkForPHPV3/sagemaker-2017-07-24/StopNotebookInstance) 
+  [Amazon SDK for Python](https://docs.amazonaws.cn/goto/boto3/sagemaker-2017-07-24/StopNotebookInstance) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/sagemaker-2017-07-24/StopNotebookInstance) 