

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

# 停用 Amazon Detective
<a name="detective-disabling"></a>

行為圖表的管理員帳戶可以通過 Detective 主控台、Detective API 或 AWS Command Line Interface停用 Amazon Detective。當您停用 Detective 後，行為圖表及其相關聯的 Detective 資料都會刪除。

一旦刪除行為圖表，其就無法恢復。

**Topics**
+ [停用 Detective (主控台)](#disable-from-console)
+ [停用 Detective (Detective API) AWS CLI](#disable-from-api)
+ [停用跨區域的 Detective (GitHub 上的 Python 指令碼)](#disable-from-github-script)

## 停用 Detective (主控台)
<a name="disable-from-console"></a>

您可以透過 AWS 管理主控台停用 Amazon Detective。

**停用 Amazon Detective （主控台）**

1. 前往 [https://console.aws.amazon.com/detective/](https://console.aws.amazon.com/detective/) 開啟 Amazon Detective 主控台。

1. 在 Detective 導覽窗格中，於**設定**下選擇**通用**。

1. 在**一般**頁面**的停用 Amazon Detective** 下，選擇**停用 Amazon Detective**。

1. 出現提示時，請輸入 **disable**。

1. 選擇**停用 Amazon Detective**。

## 停用 Detective (Detective API) AWS CLI
<a name="disable-from-api"></a>

您可以透過 Detective API 或 AWS Command Line Interface停用 Amazon Detective。若要取得行為圖表的 ARN 以供在請求中使用，請使用 [https://docs.aws.amazon.com/detective/latest/APIReference/API_ListGraphs.html](https://docs.aws.amazon.com/detective/latest/APIReference/API_ListGraphs.html) 操作。

**停用 Detective (Detective API) AWS CLI**
+ **Detective API：**使用 [https://docs.aws.amazon.com/detective/latest/APIReference/API_DeleteGraph.html](https://docs.aws.amazon.com/detective/latest/APIReference/API_DeleteGraph.html) 操作。您必須提供圖表 ARN。
+ **AWS CLI：**在命令列中執行 [https://docs.aws.amazon.com/cli/latest/reference/detective/delete-graph.html](https://docs.aws.amazon.com/cli/latest/reference/detective/delete-graph.html) 命令。

  ```
  aws detective delete-graph --graph-arn {{<graph ARN>}}
  ```

  範例：

  ```
  aws detective delete-graph --graph-arn arn:aws:detective:us-east-1:111122223333:graph:123412341234
  ```

## 停用跨區域的 Detective (GitHub 上的 Python 指令碼)
<a name="disable-from-github-script"></a>

Detective 在 GitHub 中提供了開源指令碼，您可以借此在指定的區域清單中停用管理員帳戶的 Detective。

如需如何設定和使用 GitHub 指令碼的相關資訊，請參閱 [使用 Detective Python 指令碼來管理帳戶](detective-github-scripts.md)。