

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

# 設定組織自動啟用偏好設定
<a name="set-guardduty-auto-enable-preferences"></a>

GuardDuty 中的自動啟用組織功能可協助您在單一步驟中為組織中的`ALL`現有或`NEW`成員帳戶設定相同的 GuardDuty 和保護計畫狀態。同樣地，您也可以選擇 ，指定您何時不想對成員帳戶採取任何動作`NONE`。下列步驟說明這些設定，並指出您想要何時使用特定設定。

**注意**  
您可以為所有保護計畫設定自動啟用偏好設定，但 除外[S3 的惡意軟體防護](gdu-malware-protection-s3.md)。

選擇偏好的存取方法，以更新組織的自動啟用偏好設定。

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

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

   若要登入，請使用 GuardDuty 管理員帳戶登入資料。

1. 在導覽窗格中，選擇**帳戶**。

   **帳戶**頁面會代表屬於組織的成員帳戶，將 GuardDuty 管理員帳戶的組態選項提供給**自動啟用** GuardDuty 和選用的保護計畫。

1. 若要更新現有的自動啟用設定，請選擇**編輯**。  
![\[選取編輯，代表組織中的成員帳戶更新自動啟用偏好設定。\]](http://docs.aws.amazon.com/zh_tw/guardduty/latest/ug/images/accounts-auto-enable-1-console.png)

   此支援可用於設定 GuardDuty 和 中所有支援的選用保護計畫 AWS 區域。您可以代表您的成員帳戶為 GuardDuty 選取下列其中一個組態選項：
   + **為所有帳戶啟用 (`ALL`)** – 選取 以啟用組織中所有帳戶的對應選項。這包括加入組織的新帳戶，以及可能已暫停或從組織中移除的帳戶。這也包含委派的 GuardDuty 管理員帳戶。
**注意**  
更新所有成員帳戶的組態最多可能需要 24 小時。
   + **自動為新帳戶啟用 (`NEW`)** – 選取 以在新成員帳戶加入您的組織時，自動為新成員帳戶啟用 GuardDuty 或選用的保護計畫。
   + **請勿啟用 (`NONE`)** – 選取 以防止啟用組織中新帳戶的對應選項。在此情況下，GuardDuty 管理員帳戶會個別管理每個帳戶。

     當您從 `ALL`或 更新自動啟用設定`NEW`至 時`NONE`，此動作不會停用現有帳戶的對應選項。此組態將套用至加入組織的新帳戶。更新自動啟用設定後，沒有任何新帳戶會具有啟用的對應選項。
**注意**  
當委派的 GuardDuty 管理員帳戶選擇退出選擇加入區域時，即使您的組織已將 GuardDuty 自動啟用組態設定為僅限新成員帳戶 (`NEW`) 或所有成員帳戶 (`ALL`)，也無法為組織中目前已停用 GuardDuty 的任何成員帳戶啟用 GuardDuty。如需有關成員帳戶組態的資訊，請在 [GuardDuty 主控台](https://console.aws.amazon.com/guardduty/)導覽窗格中開啟**帳戶**，或使用 [ListMembers](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListMembers.html) API。

1. 選擇**儲存變更**。

1. （選用） 如果您想要在每個區域中使用相同的偏好設定，請分別更新每個支援區域中的偏好設定。

   有些選用的保護計畫可能無法在所有提供 GuardDuty AWS 區域 的 中使用。如需詳細資訊，請參閱[區域與端點](guardduty_regions.md)。

------
#### [ API/CLI ]

1. 使用委派 GuardDuty 管理員帳戶的登入資料[https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateOrganizationConfiguration.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateOrganizationConfiguration.html)來執行 ，以自動為組織在該區域中設定 GuardDuty 和選用的保護計畫。如需有關各種自動啟用組態的資訊，請參閱 [autoEnableOrganizationMembers](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateOrganizationConfiguration.html#guardduty-UpdateOrganizationConfiguration-request-autoEnableOrganizationMembers)。

   若要尋找`detectorId`您帳戶和目前區域的 ，請參閱 https：//[https://console.aws.amazon.com/guardduty/](https://console.aws.amazon.com/guardduty/) 主控台中的**設定**頁面，或執行 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html) API。

   若要為您區域中任何支援的選用保護計畫設定自動啟用偏好設定，請依照每個保護計畫對應文件章節中提供的步驟進行。

1. 您可以驗證目前區域中組織的偏好設定。執行 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_DescribeOrganizationConfiguration.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_DescribeOrganizationConfiguration.html)。請務必指定委派 GuardDuty 管理員帳戶的偵測器 ID。
**注意**  
最多可能需要 24 小時才會更新所有成員帳戶的組態。

1. 或者，執行下列 AWS CLI 命令，將偏好設定設定為針對加入組織的新帳戶 (`NEW`)、所有帳戶 (`ALL`)，或組織中沒有帳戶 (`NONE`)，在該區域中自動啟用或停用 GuardDuty。如需詳細資訊，請參閱 [autoEnableOrganizationMembers](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateOrganizationConfiguration.html#guardduty-UpdateOrganizationConfiguration-request-autoEnableOrganizationMembers)。根據您的偏好設定，您可能需要使用 `ALL` 或 `NONE` 取代 `NEW`。如果您使用 設定保護計畫`ALL`，則也會為委派的 GuardDuty 管理員帳戶啟用保護計畫。請務必指定管理組織組態之委派 GuardDuty 管理員帳戶的偵測器 ID。

   若要尋找`detectorId`您帳戶和目前區域的 ，請參閱 https：//[https://console.aws.amazon.com/guardduty/](https://console.aws.amazon.com/guardduty/) 主控台中的**設定**頁面，或執行 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html) API。

   ```
   aws guardduty update-organization-configuration --detector-id 12abc34d567e8fa901bc2d34e56789f0 --auto-enable-organization-members=NEW
   ```

1. 您可以驗證目前區域中組織的偏好設定。使用委派 GuardDuty 管理員帳戶的偵測器 ID 來執行下列 AWS CLI 命令。

   ```
   aws guardduty describe-organization-configuration --detector-id 12abc34d567e8fa901bc2d34e56789f0
   ```

（建議） 使用委派的 GuardDuty 管理員帳戶偵測器 ID，在每個區域中重複上述步驟。

**注意**  
當委派的 GuardDuty 管理員帳戶選擇退出選擇加入區域時，即使您的組織已將 GuardDuty 自動啟用組態設定為僅限新成員帳戶 (`NEW`) 或所有成員帳戶 (`ALL`)，也無法為組織中目前已停用 GuardDuty 的任何成員帳戶啟用 GuardDuty。如需有關成員帳戶組態的資訊，請在 [GuardDuty 主控台](https://console.aws.amazon.com/guardduty/)導覽窗格中開啟**帳戶**，或使用 [ListMembers](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListMembers.html) API。

------