

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

# 使用自動註冊來移動和註冊帳戶
<a name="account-auto-enrollment"></a>

帳戶自動註冊功能適用於 3.1 版及更高版本的登陸區域。

 如果您選擇性地啟用此功能，您可以使用 AWS Organizations APIs和主控台將帳戶移至 AWS Control Tower，而無需建立[https://docs.aws.amazon.com//controltower/latest/userguide/governance-drift.html](https://docs.aws.amazon.com//controltower/latest/userguide/governance-drift.html)。帳戶會自動從 AWS Control Tower 中的目的地組織單位 (OU) 接收基準資源和控制組態。如果兩個 OUs 具有相同的基準組態並啟用相同的控制項，則此選用功能也可讓您在 AWS Control Tower 內的 OUs 之間移動帳戶，而無需建立繼承偏離。

**若要啟用自動註冊：**您可以在 AWS Control Tower 主控台的登陸區域**設定**頁面上選取帳戶自動註冊，或呼叫 AWS Control Tower `CreateLandingZone`或 `UpdateLandingZone` APIs，並將 `RemediationType` 參數的值設定為**繼承偏離**。

**若要套用自動註冊：**在**設定**頁面中選取此選項後，您可以透過 AWS Organizations 主控台、 API AWS Organizations `MoveAccount`或 AWS Control Tower 主控台來移動帳戶。

**若要使用自動註冊取消註冊帳戶：**如果您將帳戶移出已註冊的 OU，AWS Control Tower 會自動移除所有部署的基準資源和控制項。

**注意**  
如果 AWS Control Tower 中的來源和目的地 OUs [已移動的成員帳戶](governance-drift.md#drift-account-moved) 具有不同的組態，帳戶可能會顯示偏離。

## 先決條件：設定 進行自動註冊
<a name="w2aac44c24c18c15"></a>
+ 您必須執行 AWS Control Tower 登陸區域 3.1 版或更新版本。
+  透過主控台中的登陸區域**設定**頁面或透過 AWS Control Tower 登陸區域 APIs，將 `RemediationTypes` 參數的值設定為 ，選擇加入 AWS Control Tower 自動註冊功能`Inheritance Drift`。當您選擇加入時，AWS Control Tower 會針對 `move account`的事件做出反應 AWS Organizations，並代表您立即修復已移動帳戶的繼承偏離。

## 所需的許可
<a name="w2aac44c24c18c17"></a>

 您需要特定角色和許可才能使用 `CreateAccount` API AWS Organizations 和 `MoveAccount` API。如需 AWS Organizations 搭配 AWS Control Tower 使用 的詳細資訊，請參閱 [AWS Control Tower 和 AWS Organizations](https://docs.aws.amazon.com//organizations/latest/userguide/services-that-can-integrate-CTower.html) 。

## API 用量範例
<a name="w2aac44c24c18c19"></a>

如需這些 APIs的詳細資訊和範例，請參閱*AWS Organizations 《 API 參考*[https://docs.aws.amazon.com//organizations/latest/APIReference/API_MoveAccount.html](https://docs.aws.amazon.com//organizations/latest/APIReference/API_MoveAccount.html)》中的 [https://docs.aws.amazon.com//organizations/latest/APIReference/API_CreateAccount.html](https://docs.aws.amazon.com//organizations/latest/APIReference/API_CreateAccount.html)和 。

## 考量事項
<a name="w2aac44c24c18c21"></a>
+  **註冊時間表：**移至向 AWS Control Tower 註冊的 OU 的帳戶會使用*最終一致性*模型註冊。此程序通常需要幾分鐘的時間，最多幾個小時，取決於要移動的帳戶數目。
+  **取消註冊程序：**您可以使用相同的程序，將帳戶移至 AWS Control Tower 外部的 OU，從 AWS Control Tower 取消註冊帳戶。此程序會移除 AWS Control Tower 部署的任何角色和資源，以及 AWS Control Tower 中啟用的任何控制項。