

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

# 解除主體與資源共用的關聯，並移除資源共用
<a name="model-registry-ram-dissociate"></a>

資源擁有者可以使用 或 AWS CLI 主控台，將主體與一組許可的資源共用取消關聯，或刪除整個資源共用 AWS RAM 。如需如何解除主體與資源共用的關聯的詳細資訊，請參閱 [AWS RAM](https://docs.aws.amazon.com/ram/latest/userguide/what-is.html) 文件中的[更新資源共用](https://docs.aws.amazon.com/ram/latest/userguide/working-with-sharing-update.html)。如需如何刪除資源共用的詳細資訊，請參閱 [AWS RAM](https://docs.aws.amazon.com/ram/latest/userguide/what-is.html) 文件中的[刪除資源共用](https://docs.aws.amazon.com/ram/latest/userguide/working-with-sharing-delete.html)。

## AWS CLI
<a name="model-registry-ram-dissociate-cli"></a>

若要解除主體與資源共用的關聯，請使用如下命令 [dissociate-resource-share](https://docs.aws.amazon.com/cli/latest/reference/ram/disassociate-resource-share.html)：

```
aws ram disassociate-resource-share --resource-share-arn <resource-share-arn> --principals <principal>
```

若要刪除資源共用，請使用如下命令 [delete-resource-share](https://docs.aws.amazon.com/cli/latest/reference/ram/delete-resource-share.html)：

```
aws ram delete-resource-share --resource-share-arn <resource-share-arn>
```

## AWS RAM 主控台
<a name="model-registry-ram-dissociate-ram"></a>

如需如何解除主體與資源共用的關聯的更多詳細資訊，請參閱 [AWS RAM](https://docs.aws.amazon.com/ram/latest/userguide/what-is.html) 文件中的[更新資源共用](https://docs.aws.amazon.com/ram/latest/userguide/working-with-sharing-update.html)。如需如何刪除資源共用的更多詳細資訊，請參閱 [AWS RAM](https://docs.aws.amazon.com/ram/latest/userguide/what-is.html) 文件中的[刪除資源共用](https://docs.aws.amazon.com/ram/latest/userguide/working-with-sharing-delete.html)。