

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

# 以 Detective 成员账户的身份管理组织账户
<a name="accounts-orgs-members"></a>

在组织行为图中，Detective 管理员账户决定将哪些组织账户启用为成员账户。默认情况下，新组织账户不会作为成员账户启用。他们的身份是**非成员**。Detective 管理员账户可以配置 Detective 在组织行为图中自动启用新组织账户作为成员账户。

Detective 管理员可以将 Detective 配置为自动启用新的组织帐户作为成员帐户。如果选择自动启用组织账户，则当新账户添加到组织时，Detective 就会开始将其作为成员账户启用。Detective 不会启用尚未启用的现有组织账户。

如果您不想自动启用新的组织帐户，Detective 可以手动启用组织帐户作为成员帐户。他们还可以手动启用已取消关联的组织帐户。如果组织行为图已经启用了最多 1,200 个帐户，则 Detective 管理员无法将组织帐户启用为成员帐户。在这种情况下，组织账户的状态仍为**非成员**。

Detective 管理员还可以取消组织帐户与组织行为图的关联。要停止从组织行为图中的组织账户摄取数据，可以解除与该账户的关联。该账户的现有数据将保留在行为图中。

**Topics**
+ [启用新的组织账户作为 Detective 成员账户](accounts-orgs-members-autoenable.md)
+ [启用组织账户作为 Detective 成员账户](accounts-orgs-members-enable.md)
+ [取消组织账户与 Detective 成员账户的关联](accounts-orgs-members-disassociate.md)

# 启用新的组织账户作为 Detective 成员账户
<a name="accounts-orgs-members-autoenable"></a>

Detective 管理员账户可以配置 Detective 在组织行为图中自动启用新组织账户作为成员账户。

新账户添加到组织后，它们会被添加到**账户管理**页面的列表中。对于组织账户，**类型**为**按组织**。

默认情况下，新组织账户不会作为成员账户启用。他们的身份是**非成员**。

如果选择自动启用组织账户，则当新账户添加到组织时，Detective 就会开始将其作为成员账户启用。Detective 不会启用尚未启用的现有组织账户。

只有当行为图的最大成员帐户数为 1,200 时，Detective 才能启用组织帐户作为成员帐户。如果行为图中已包含 1200 个成员账户，则无法启用新账户。

------
#### [ Console ]

在**账户管理**页面上，**自动启用新组织账户**设置决定是否在账户被添加到组织时自动启用这些账户。

**要将新组织账户自动启用为成员账户**

1. 通过 [https://console.aws.amazon.com/detective/](https://console.aws.amazon.com/detective/) 打开 Amazon Detective 控制台。

1. 在 Detective 导航窗格中，选择**账户管理**。

1. 将**自动启用新组织账户**切换到开启位置。

------
#### [ DetectiveAPI/AWS CLI ]

要确定是否自动启用新的组织帐户作为 Detective 成员帐户，管理员帐户可以使用 Detective API 或 AWS Command Line Interface。

要查看和管理配置，必须提供行为图 ARN。要获取 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：**使用 [https://docs.aws.amazon.com/detective/latest/APIReference/API_DescribeOrganizationConfiguration.html](https://docs.aws.amazon.com/detective/latest/APIReference/API_DescribeOrganizationConfiguration.html) 操作。

  在回复中，如果自动启用了新组织账户，则 `AutoEnable` 为 `true`。
+ **AWS CLI：**在命令行处，运行 [https://docs.aws.amazon.com/cli/latest/reference/detective/describe-organization-configuration.html](https://docs.aws.amazon.com/cli/latest/reference/detective/describe-organization-configuration.html) 命令。

  ```
  aws detective describe-organization-configuration --graph-arn <behavior graph ARN>
  ```

  **示例**

  ```
  aws detective describe-organization-configuration --graph-arn arn:aws:detective:us-east-1:111122223333:graph:123412341234
  ```

**要自动启用新组织账户**
+ **Detective API：**使用 [https://docs.aws.amazon.com/detective/latest/APIReference/API_UpdateOrganizationConfiguration.html](https://docs.aws.amazon.com/detective/latest/APIReference/API_UpdateOrganizationConfiguration.html) 操作。要自动启用新组织账户，请将 `AutoEnable` 设置为 `true`。
+ **AWS CLI：**在命令行处，运行 [https://docs.aws.amazon.com/cli/latest/reference/detective/update-organization-configuration.html](https://docs.aws.amazon.com/cli/latest/reference/detective/update-organization-configuration.html) 命令。

  ```
  aws detective update-organization-configuration --graph-arn <behavior graph ARN> --auto-enable | --no-auto-enable
  ```

  示例

  ```
  aws detective update-organization-configuration --graph-arn arn:aws:detective:us-east-1:111122223333:graph:123412341234 --auto-enable
  ```

------

# 启用组织账户作为 Detective 成员账户
<a name="accounts-orgs-members-enable"></a>

如果您没有自动启用新组织账户，则可以手动启用这些账户。您还必须手动启用已解除关联的账户。

## 确定是否可以启用账户
<a name="accounts-orgs-members-enable-eligibility"></a>

如果组织行为图中已启用账户的上限为 1200 个，则无法将组织账户启用为成员账户。在这种情况下，组织账户的状态仍为**非成员**。该账户不向行为图提供数据。

一旦成员账户可以启用，Detective 就会自动将成员账户状态更改为**已启用**。例如，如果管理员帐户删除其他成员帐户以便为帐户腾出空间，则成员帐户的状态将更改为 “**已启用**”。

------
#### [ Console ]

在**账户管理**页面，可以将组织账户作为成员账户启用。

**要启用组织账户作为成员账户**

1. 通过 [https://console.aws.amazon.com/detective/](https://console.aws.amazon.com/detective/) 打开 Amazon Detective 控制台。

1. 在 Detective 导航窗格中，选择**账户管理**。

1. 要查看当前未启用的账户列表，请选择**未启用**。

1. 您可以选择特定的组织账户，也可以启用所有组织账户。

   要启用选定的组织账户：

   1. 选择要启用的每个组织账户。

   1. 选择**启用账户**。

   要启用所有组织账户，请选择**启用所有组织账户**。

------
#### [ Detective API/AWS CLI ]

您可以使用 Detective API 或在组织行为图中启用组织账户作为成员账户。 AWS Command Line Interface 要获取要在请求中使用的行为图的 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：**使用 [https://docs.aws.amazon.com/detective/latest/APIReference/API_CreateMembers.html](https://docs.aws.amazon.com/detective/latest/APIReference/API_CreateMembers.html) 操作。您必须提供图 ARN。

  为每个账户指定账户标识符。组织行为图中的组织账户不会收到邀请。您无需提供电子邮件地址或其他邀请信息。
+ **AWS CLI：**在命令行处，运行 [https://docs.aws.amazon.com/cli/latest/reference/detective/create-members.html](https://docs.aws.amazon.com/cli/latest/reference/detective/create-members.html) 命令。

  ```
  aws detective create-members --accounts AccountId=<AWS account ID> --graph-arn <behavior graph ARN>
  ```

  **示例**

  ```
  aws detective create-members --accounts AccountId=444455556666 AccountId=123456789012 --graph-arn arn:aws:detective:us-east-1:111122223333:graph:123412341234
  ```

------

# 取消组织账户与 Detective 成员账户的关联
<a name="accounts-orgs-members-disassociate"></a>

要停止从组织行为图中的组织账户摄取数据，可以解除与该账户的关联。该账户的现有数据将保留在行为图中。

取消关联组织成员账户后，该账户的状态将更改为 “**非成员**”。Detective 不再将来自该账户的数据提取到你的行为图中。该账户的现有数据仍保留在行为图中，该账户仍保留在列表中。

------
#### [ Console ]

在**账户管理**页面，您可以解除组织账户作为成员账户的关联。要解除组织账户作为成员账户的关联（控制台）

1. 通过 [https://console.aws.amazon.com/detective/](https://console.aws.amazon.com/detective/) 打开 Amazon Detective 控制台。

1. 在 Detective 导航窗格中，选择**账户管理**。

1. 要显示已启用的账户列表，请选择**已启用**。

1. 选择要解除关联的每个账户的复选框。

1. 选择**操作**。然后选择**禁用账户**。

   已解除关联账户的账户状态更改为**非成员**。

------
#### [ Detective API/AWS CLI ]

要获取要在请求中使用的行为图的 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：**使用 [https://docs.aws.amazon.com/detective/latest/APIReference/API_DeleteMembers.html](https://docs.aws.amazon.com/detective/latest/APIReference/API_DeleteMembers.html) 操作。指定要解除关联的成员账户的图 ARN 和账户标识符列表。
+ **AWS CLI：**在命令行处，运行 [https://docs.aws.amazon.com/cli/latest/reference/detective/delete-members.html](https://docs.aws.amazon.com/cli/latest/reference/detective/delete-members.html) 命令。

  ```
  aws detective delete-members --account-ids <account ID list> --graph-arn <behavior graph ARN>
  ```

  **示例**

  ```
  aws detective delete-members --account-ids 444455556666 123456789012 --graph-arn arn:aws:detective:us-east-1:111122223333:graph:123412341234
  ```

------