

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

# 使用 AWS 管理主控台 AWS CLI、 和 API 更新現有的 SVM Active Directory 組態
<a name="update-svm-ad-config"></a>

使用下列程序更新已加入 Active Directory 之 SVM 的 Active Directory 組態。

**更新 SVM Active Directory 組態 (AWS 管理主控台)**

1. 開啟位於 https：//[https://console.aws.amazon.com/fsx/](https://console.aws.amazon.com/fsx/) 的 Amazon FSx 主控台。

1. 選擇要更新的 SVM，如下所示：
   + 在左側導覽窗格中，選擇**檔案系統**，然後選擇具有您要更新之 SVM 的 ONTAP 檔案系統。
   + 選擇**儲存虛擬機器**索引標籤。

     –或–
   + 若要顯示所有可用 SVMs的清單，請在左側導覽窗格中展開 **ONTAP**，然後選擇**儲存虛擬機器**。

   從清單中選擇您要更新的 SVM。

1. 在 SVM **摘要**面板上，選擇**動作** > **加入/更新 Active Directory**。**更新 SVM Active Directory 組態**視窗隨即出現。

1. 您可以在此視窗中更新下列 Active Directory 組態屬性。
   + **DNS 伺服器 IP 地址** – 網域 DNS 伺服器的 IPv4 或 IPv6 地址。
   + **服務帳戶登入**資料 – 選擇如何提供服務帳戶登入資料：
     + **選項 1**： AWS Secrets Manager 秘密 ARN - 包含 Active Directory 網域上服務帳戶的使用者名稱和密碼的秘密。如需詳細資訊，請參閱[使用 存放 Active Directory 登入資料 AWS Secrets Manager](self-managed-AD-best-practices.md#bp-store-ad-creds-using-secret-manager)。
     + **選項 2**：純文字登入資料
       + **服務帳戶使用者名稱** – 現有 Microsoft Active Directory 中服務帳戶的使用者名稱。請勿包含網域字首或尾碼。例如，對於 `EXAMPLE\ADMIN`，僅使用 `ADMIN`。
       + **服務帳戶密碼** – 服務帳戶的密碼。
       + **確認密碼** – 服務帳戶的密碼。

1. 輸入更新之後，請選擇**更新 Active Directory** 以進行變更。

使用下列程序來更新已加入 Active Directory 之 SVM 的 Active Directory 組態。

**更新 SVM Active Directory 組態 (AWS CLI)**
+ 若要使用 AWS CLI 或 API 更新 SVM 的 Active Directory 組態，請使用 [update-storage-virtual-machine](https://docs.aws.amazon.com/cli/latest/reference/fsx/update-storage-virtual-machine.html) CLI 命令 （或同等的 [UpdateStorageVirtualMachine](https://docs.aws.amazon.com/fsx/latest/APIReference/API_UpdateStorageVirtualMachine.html) API 操作），如下列範例所示。

  ```
  aws fsx update-storage-virtual-machine \
      --storage-virtual-machine-id svm-abcdef0123456789a\
      --active-directory-configuration \
      SelfManagedActiveDirectoryConfiguration='{UserName="{{FSxService}}",\
      Password="{{password}}", \
      DnsIps=["10.0.1.18"]}'
  ```