

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

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

行为图的管理员账户可以从 Detective 控制台、Detective API 或 AWS Command Line Interface中禁用 Amazon Detective。禁用 Detective 时，行为图及其关联的 Detective 数据将被删除。

行为图一旦被删除，就无法恢复。

**Topics**
+ [禁用 Detective（控制台）](#disable-from-console)
+ [禁用 Detective（侦探 API， AWS CLI）](#disable-from-api)
+ [禁用跨区域侦探（Python 脚本已开启 GitHub）](#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 Detec** tive” 下，选择 “**禁用 Amazon Detective**”。

1. 出现提示时，键入 **disable**。

1. 选择**禁用 Amazon Detec** tive。

## 禁用 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（侦探 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
  ```

## 禁用跨区域侦探（Python 脚本已开启 GitHub）
<a name="disable-from-github-script"></a>

Detective 在中提供了一个开源脚本 GitHub ，允许您在指定的区域列表中为管理员帐户禁用 Detective。

有关如何配置和使用 GitHub 脚本的信息，请参阅[使用 Detective Python 脚本管理账户](detective-github-scripts.md)。