

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

# 以 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 不會啟用尚未啟用的現有組織帳戶。

Detective 只有在行為圖表的成員帳戶數目上限為 1，200 時，才能將組織帳戶啟用為成員帳戶。如果行為圖表已包含 1,200 個成員帳戶，則無法啟用新帳戶。

------
#### [ 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>

如果組織行為圖表已啟用高達 1,200 個帳戶，則無法將組織帳戶作為成員帳戶啟用。在此情況下，組織帳戶狀態仍然為**非成員**。帳戶不會將資料提供至行為圖表。

一旦成員帳戶得以啟用，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
  ```

------