

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 分離生命週期組態
<a name="jl-lcc-delete"></a>

若要更新您的指令碼，您必須建立新的生命週期組態指令碼，並將其連接至個別的 Amazon SageMaker AI 網域 (網域)、使用者設定檔或共用空間。生命週期組態指令碼建立後便無法變更。如需建立和管理生命週期組態的更多資訊，請參閱[生命週期組態建立](jl-lcc-create.md)。

下節說明如何使用 AWS Command Line Interface (AWS CLI) 分離生命週期組態。

## 使用 分離 AWS CLI
<a name="jl-lcc-delete-cli"></a>

若要使用AWS CLI分離生命週期組態，請從連接至資源的生命週期組態清單中移除所需的生命週期組態。然後，將清單做為個別命令的一部分傳遞：
+ [update-user-profile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/update-user-profile.html)
+ [update-domain](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/update-domain.html)
+ [update-space](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/update-space.html)

例如，以下命令會移除連接至網域的 JupyterLab 應用程式的所有生命週期組態。

```
aws sagemaker update-domain --domain-id domain-id \
--region region \
--default-user-settings '{
"JupyterLabAppSettings": {
  "LifecycleConfigArns":
    []
  }
}'
```