

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

# 設定和使用 Snowball Edge 用戶端
<a name="using-client-commands"></a>

Snowball Edge 用戶端是 的命令列界面 (CLI) 工具 AWS ，可用於 Snowball Edge 或 Snowball Edge 叢集。您可以使用 用戶端來解鎖 Snowball Edge 或裝置叢集、設定 Snowball Edge、在裝置上啟動和停止服務，以及往返裝置傳輸資料。Snowball Edge 用戶端與 Linux、macOS 和 Windows 作業系統上執行的電腦相容。

**Topics**
+ [下載並安裝 Snowball Edge 用戶端](#download-the-client)
+ [設定 Snowball Edge 用戶端的設定檔](#client-configuration)
+ [尋找 Snowball Edge 用戶端版本](#cli-version)
+ [取得 Snowball Edge 的登入資料](#client-credentials)
+ [在 Snowball Edge 上啟動服務](#edge-start-service)
+ [在 Snowball Edge 上停止服務](#edge-stop-service)
+ [從 Snowball Edge 檢視和下載日誌](#logs)
+ [檢視 Snowball Edge 的狀態](#client-status)
+ [在 Snowball Edge 上執行之服務的終止狀態](#client-service-status)
+ [檢視 Snowball Edge 功能的狀態](#snowball-edge-describe-features)
+ [設定 Snowball Edge 的時間伺服器](#client-set-ntp)
+ [取得 QR 碼以驗證 Snowball Edge NFC 標籤](#client-qr-code)
+ [更新 MTU 大小](#update-mtu-size)

## 下載並安裝 Snowball Edge 用戶端
<a name="download-the-client"></a>

您可以從 [AWS Snowball 邊緣 資源](https://aws.amazon.com/snowball/resources/)下載 Snowball Edge 用戶端。在該頁面上，您可以找到作業系統的安裝套件。

根據下列指示安裝和設定用戶端。

------
#### [ Linux ]

**注意**  
只有 64 位元 Linux 發行版本支援 Snowball Edge 用戶端。

1. 解壓縮 `snowball-client-linux.tar.gz` 檔案。它會建立`/snowball-client-linux-build_number/bin`資料夾結構，並在該處擷取檔案。

1. 執行下列命令來設定資料夾。

   ```
     chmod u+x snowball-client-linux-build_number/bin/snowballEdge
   ```

   ```
     chmod u+x snowball-client-linux-build_number/jre/bin/java                              
   ```

1. 將 `/snowball-client-linux-build_number/bin`新增至作業系統的 \$1PATH 環境變數，從任何目錄執行 Snowball Edge 用戶端命令。如需詳細資訊，請參閱裝置作業系統或 shell 的文件。

------
#### [ macOS ]

1. 解壓縮 `snowball-client-mac.tar.gz` 檔案。它會建立`/snowball-client-linux-build_number/bin`資料夾結構，並在該處擷取檔案。

1. 執行下列命令來設定資料夾。

   ```
     chmod u+x snowball-client-mac-build_number/bin/snowballEdge
   ```

   ```
     chmod u+x snowball-client-mac-build_number/jre/bin/java                              
   ```

1. 將 `/snowball-client-mac-build_number/bin`新增至作業系統的 \$1PATH 環境變數，以從任何目錄執行 Snowball Edge 用戶端命令。如需詳細資訊，請參閱裝置作業系統或 shell 的文件。

------
#### [ Windows ]

用戶端封裝為 Microsoft 軟體安裝程式 (MSI) 檔案。開啟 檔案，並依照安裝精靈中的提示操作。安裝用戶端後，您可以從任何目錄執行它，而無需任何額外的準備。

------

## 設定 Snowball Edge 用戶端的設定檔
<a name="client-configuration"></a>

每次執行 Snowball Edge 用戶端的命令時，您都會提供資訊清單檔案、解鎖碼和 Snowball Edge 的 IP 地址。您可以改用 `configure`命令來存放資訊清單檔案的路徑、29 個字元的解鎖碼，以及做為設定檔的端點 (Snowball Edge 的 IP 地址），而不是在每次執行命令時提供這些項目。組態之後，您可以使用 Snowball Edge 用戶端命令，而不必手動為每個命令輸入這些值，方法是在命令中包含設定檔名稱。設定 Snowball Edge 用戶端之後，資訊會以純文字 JSON 格式儲存至 `home directory/.aws/snowball/config/snowball-edge.config`。請確定您的環境已設定為允許您建立此檔案。

**重要**  
任何可以存取組態檔案的人都可以存取 Snowball Edge 裝置或叢集上的資料。管理此檔案的本機存取控制是您的其中一個管理責任。

您也可以使用 來 AWS OpsHub 建立設定檔。在 中建立的設定檔 AWS OpsHub 可與 Snowball Edge 用戶端搭配使用，而在 中建立的設定檔 AWS OpsHub 可與 Snowball Edge 用戶端搭配使用。如需詳細資訊，請參閱[管理設定檔](https://docs.aws.amazon.com/snowball/latest/developer-guide/manage-device.html#manage-profile)。

**建立設定檔**

1. 在作業系統的命令列界面中輸入 命令。`profile-name` 參數的值是設定檔的名稱。您未來將在執行 Snowball Edge 用戶端命令時提供它。

   ```
   snowballEdge configure --profile profile-name
   ```

1. Snowball Edge 用戶端將提示您輸入每個參數。出現提示時，輸入您環境和 Snowball Edge 的資訊。
**注意**  
`endpoint` 參數的值是 Snowball Edge 的 IP 地址，字首為 `https://`。您可以在裝置正面的 LCD 螢幕上找到 Snowball Edge 裝置的 IP 地址。  
**Example `configure` 命令的輸出**  

   ```
   Configuration will stored at home directory\.aws\snowball\config\snowball-edge.config
   Snowball Edge Manifest Path: /Path/to/manifest/file
   Unlock Code: 29 character unlock code
   Default Endpoint: https://192.0.2.0
   ```

   Snowball Edge 用戶端會檢查資訊清單檔案的解鎖碼是否正確。如果不相符，命令會停止，不會建立設定檔。檢查解鎖碼和資訊清單檔案，然後再次執行 命令。

若要使用 描述檔，請在命令語法`--profile profile-name`後面加入 。

如果您使用多個獨立的 Snowball Edge，您可以為每個 Snowball Edge 建立設定檔。若要建立另一個設定檔，請再次執行 `configure`命令，為 prameter `--profile` 提供不同的值，並提供另一個裝置的資訊。

**Example 範例 `snowball-edge.config` 檔案**  
此範例顯示包含三個設定檔的設定檔：`SnowDevice2profile`、 `SnowDevice1profile`和 `SnowDevice3profile`。  

```
{"version":1,"profiles":
    {
    "SnowDevice1profile":
        {
            "name":"SnowDevice1profile",
            "jobId":"JID12345678-136f-45b4-b5c2-847db8adc749",
            "unlockCode":"db223-12345-dbe46-44557-c7cc2",
            "manifestPath":"C:\\Users\\Administrator\\.aws\\ops-hub\\manifest\\JID12345678-136f-45b4-b5c2-847db8adc749_manifest-1670622989203.bin",
            "defaultEndpoint":"https://10.16.0.1",
            "isCluster":false,
            "deviceIps":[]
        },
    },
    "SnowDevice2profile":
    {
        "name":"SnowDevice2profile",
        "jobId":"JID12345678-fdb2-436a-a4ff-7c510dec1bae",
        "unlockCode":"b893b-54321-0f65c-6c5e1-7f748",
        "manifestPath":"C:\\Users\\Administrator\\.aws\\ops-hub\\manifest\\JID12345678-fdb2-436a-a4ff-7c510dec1bae_manifest-1670623746908.bin",
        "defaultEndpoint":"https://10.16.0.2",
        "isCluster":false,
        "deviceIps":[]
    },
    "SnowDevice3profile":
    {
        "name":"SnowDevice3profile",
        "jobId":"JID12345678-c384-4a5e-becd-ab5f38888463",
        "unlockCode":"64c89-13524-4d054-13d93-c1b80",
        "manifestPath":"C:\\Users\\Administrator\\.aws\\ops-hub\\manifest\\JID12345678-c384-4a5e-becd-ab5f38888463_manifest-1670623999136.bin",
        "defaultEndpoint":"https://10.16.0.3",
        "isCluster":false,
        "deviceIps":[]
    }
}
```

若要編輯或刪除設定檔，請在文字編輯器中編輯設定檔檔案。

**編輯設定檔**

1. 在文字編輯器中，`snowball-edge.config`從 開啟 `home directory\.aws\snowball\config`。
**注意**  
請確定您的環境已設定為允許您存取 來讀取和寫入此檔案。

1. 視必要編輯檔案。例如，若要變更與設定檔相關聯的 Snowball Edge IP 地址，請變更`defaultEndpoint`項目。

1. 儲存並關閉檔案。

**刪除設定檔**

1. 使用文字編輯器，`snowball-edge.config`從 開啟 `home directory\.aws\snowball\config`。
**注意**  
請確定您的環境已設定為允許您存取 來讀取和寫入此檔案。

1. 刪除包含設定檔名稱的行、設定檔名稱`{``}`後面的大括號，以及這些括號中的內容。

1. 儲存並關閉檔案。

## 尋找 Snowball Edge 用戶端版本
<a name="cli-version"></a>

使用 `version`命令來查看 Snowball Edge 命令列界面 (CLI) 用戶端的版本。

**用途**

```
    snowballEdge version                
```

**範例輸出**

```
    Snowball Edge client version: 1.2.0  Build 661                
```

## 取得 Snowball Edge 的登入資料
<a name="client-credentials"></a>

使用 `snowballEdge list-access-keys`和 `snowballEdge get-secret-access-key`命令，您可以取得 Snowball Edge AWS 帳戶 上 的 管理員使用者的登入資料。您可以使用這些登入資料來建立 AWS Identity and Access Management (IAM 使用者） 和角色，以及在搭配使用 AWS CLI 或 與 AWS SDK 時驗證您的請求。這些登入資料只會與 Snowball Edge 的個別任務相關聯，而且您只能在裝置或裝置叢集上使用。裝置在 中沒有任何 IAM 許可 AWS 雲端。

**注意**  
如果您使用 AWS CLI 搭配 Snowball Edge，則必須在設定 CLI 時使用這些登入資料。如需設定 登入資料的相關資訊 AWS CLI，請參閱*AWS Command Line Interface 《 使用者指南*》中的[設定 AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-quick-configuration)。

**用量 （設定的 Snowball Edge 用戶端）**

```
snowballEdge list-access-keys
```

**Example 輸出**  

```
{
  "AccessKeyIds" : [ "AKIAIOSFODNN7EXAMPLE" ]
}
```

**用量 （設定的 Snowball Edge 用戶端）**

```
snowballEdge get-secret-access-key --access-key-id Access Key
```

**Example 輸出**  

```
[snowballEdge]
aws_access_key_id = AKIAIOSFODNN7EXAMPLE
aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
```

## 在 Snowball Edge 上啟動服務
<a name="edge-start-service"></a>

Snowball Edge 裝置支援多個 服務。其中包括運算執行個體、網路檔案系統 (NFS) 介面、Snowball Edge 裝置管理，以及 AWS IoT Greengrass。Amazon S3 轉接器服務、Amazon EC2 和 IAM 預設為啟動 AWS STS，無法停止或重新啟動。不過，NFS 界面 Snowball Edge Device Management 和 AWS IoT Greengrass 可以透過搭配 `start-service`命令使用其服務 ID 來啟動。若要取得每個服務的服務 ID，您可以使用 `list-services` 命令。

在您執行此命令前，請先建立單一虛擬網路界面來繫結至您正在啟動的服務。如需詳細資訊，請參閱[在 Snowball Edge 上建立虛擬網路界面](using-ec2-edge-client.md#ec2-edge-create-vnic)。

```
snowballEdge start-service --service-id service_id --virtual-network-interface-arns virtual-network-interface-arn --profile profile-name
```

**Example `start-service` 命令的輸出**  

```
Starting the AWS service on your Snowball Edge. You can determine the status of the AWS service using the describe-service command.
```

## 在 Snowball Edge 上停止服務
<a name="edge-stop-service"></a>

若要停止在 Snowball Edge 上執行的服務，您可以使用 `stop-service`命令。

Amazon S3 轉接器、Amazon EC2 AWS STS和 IAM 服務無法停止。

**警告**  
如果網路檔案系統 (NFS) 服務在將剩餘的緩衝資料寫入裝置之前停止，則可能會發生資料遺失。如需使用 NFS 服務的詳細資訊，請參閱 [在 Snowball Edge 上管理 NFS 介面](shared-using-nfs.md)。

**注意**  
在 Snowball Edge 服務上停止與 Amazon S3 相容的儲存，會停用存取存放在裝置或叢集上 S3 儲存貯體中的資料。再次啟動 Snowball Edge 上的 Amazon S3 相容儲存時，會還原存取。對於在 Snowball Edge 上使用 Amazon S3 相容儲存啟用的裝置，建議在 Snowball Edge 裝置開機後啟動服務。請參閱本指南中的[設定 Snowball Edge](https://docs.aws.amazon.com/snowball/latest/developer-guide/s3compatible-on-snow.html#setting-up-s3-on-snow-cluster)。

```
snowballEdge stop-service --service-id service_id --profile profile-name
```

**Example `stop-service` 命令的輸出**  

```
Stopping the AWS service on your Snowball Edge. You can determine the status of the AWS service using the describe-service command.
```

## 從 Snowball Edge 檢視和下載日誌
<a name="logs"></a>

當您在內部部署資料中心和 Snowball Edge 之間傳輸資料時，會自動產生日誌。如果在將資料傳輸到裝置期間遇到意外錯誤，您可以使用以下命令，將日誌副本儲存到本機伺服器。

有三種與日誌相關的命令：
+ `list-logs` – 傳回 JSON 格式的日誌清單。此清單會報告日誌的大小 (以位元組為單位)、日誌的 ARN、日誌的服務 ID，以及日誌的類型。

  **用途**

  ```
  snowballEdge list-logs --profile profile-name
  ```  
**Example `list-logs` 命令的輸出**  

  ```
  {
    "Logs" : [ {
      "LogArn" : "arn:aws:snowball-device:::log/s3-storage-JIEXAMPLE2f-1234-4953-a7c4-dfEXAMPLE709",
      "LogType" : "SUPPORT",
      "ServiceId" : "s3",
      "EstimatedSizeBytes" : 53132614
    }, {
      "LogArn" : "arn:aws:snowball-device:::log/fileinterface-JIDEXAMPLEf-1234-4953-a7c4-dfEXAMPLE709",
      "LogType" : "CUSTOMER",
      "ServiceId" : "fileinterface",
      "EstimatedSizeBytes" : 4446
    }]
  }
  ```
+ `get-log` – 將特定日誌的副本從 Snowball Edge 下載到您指定的路徑上的裝置。 `CUSTOMER`日誌會以 `.zip` 格式儲存，而且您可以擷取這類日誌以檢視其內容。 `SUPPORT`日誌會加密，而且只能由 讀取 AWS 支援。您可以選擇是否指定日誌的名稱和路徑。

  **用途**

  ```
  snowballEdge get-log --log-arn arn:aws:snowball-device:::log/fileinterface-JIDEXAMPLEf-1234-4953-a7c4-dfEXAMPLE709 --profile profile-name
  ```  
**Example `get-log` 命令的輸出**  

  ```
  Logs are being saved to download/path/snowball-edge-logs-1515EXAMPLE88.bin
  ```
+ `get-support-logs` – 將 Snowball Edge 中所有`SUPPORT`類型日誌的副本下載到指定路徑的服務。

  **用途**

  ```
  snowballEdge get-support-logs --profile profile-name
  ```  
**Example `get-support-logs` 命令的輸出**  

  ```
  Logs are being saved to download/path/snowball-edge-logs-1515716135711.bin
  ```

**重要**  
`CUSTOMER` 類型可能包含有關您自己之資料的敏感資訊。為了保護此潛在敏感資訊，我們強烈建議一旦完成對這些日誌的處理即刪除它們。

## 檢視 Snowball Edge 的狀態
<a name="client-status"></a>

您可以使用 `describe-device`命令來判斷 Snowball Edge 的狀態和一般運作狀態。

```
snowballEdge describe-device --profile profile-name
```

**Example `describe-device` 命令的輸出**  

```
                            {
  "DeviceId": "JID-EXAMPLE12345-123-456-7-890",
  "UnlockStatus": {
    "State": "UNLOCKED"
  },
  "ActiveNetworkInterface": {
    "IpAddress": "192.0.2.0"
  },
  "PhysicalNetworkInterfaces": [
    {
      "PhysicalNetworkInterfaceId": "s.ni-EXAMPLEd9ecbf03e3",
      "PhysicalConnectorType": "RJ45",
      "IpAddressAssignment": "STATIC",
      "IpAddress": "0.0.0.0",
      "Netmask": "0.0.0.0",
      "DefaultGateway": "192.0.2.1",
      "MacAddress": "EX:AM:PL:E0:12:34"
    },
    {
      "PhysicalNetworkInterfaceId": "s.ni-EXAMPLE4c3840068f",
      "PhysicalConnectorType": "QSFP",
      "IpAddressAssignment": "STATIC",
      "IpAddress": "0.0.0.0",
      "Netmask": "0.0.0.0",
      "DefaultGateway": "192.0.2.2",
      "MacAddress": "EX:AM:PL:E0:56:78"
    },
    {
      "PhysicalNetworkInterfaceId": "s.ni-EXAMPLE0a3a6499fd",
      "PhysicalConnectorType": "SFP_PLUS",
      "IpAddressAssignment": "DHCP",
      "IpAddress": "192.168.1.231",
      "Netmask": "255.255.255.0",
      "DefaultGateway": "192.0.2.3",
      "MacAddress": "EX:AM:PL:E0:90:12"
    }
  ]
}
```

## 在 Snowball Edge 上執行之服務的終止狀態
<a name="client-service-status"></a>

您可以使用 `describe-service`命令，判斷在 Snowball Edge 裝置上執行之服務的狀態和一般運作狀態。您可以先執行 `list-services` 命令，以查看哪些服務正在執行。
+ `list-services`

  **用途**

  ```
  snowballEdge list-services --profile profile-name
  ```  
**Example `list-services` 命令的輸出**  

  ```
  {
    "ServiceIds" : [ "greengrass", "fileinterface", "s3", "ec2", "s3-snow" ]
  }
  ```
+ `describe-service`

  此命令會傳回服務的狀態值。同時還包括可能有助解決服務所發生問題的狀態資訊。這些狀態如下所示。
  + `ACTIVE` – 服務正在執行且可使用。
  + `ACTIVATING` – 服務正在啟動，但尚無法使用。
  + `DEACTIVATING` – 服務正在關閉。
  + `DEGRADED` – 對於 Snowball Edge 上的 Amazon S3 相容儲存，此狀態表示叢集中的一或多個磁碟或裝置已關閉。Snowball Edge 服務上的 Amazon S3 相容儲存不會中斷執行，但您應該在叢集規定人數遺失之前復原或取代受影響的裝置，以將遺失資料的風險降至最低。請參閱本指南中的[叢集概觀](https://docs.aws.amazon.com/snowball/latest/developer-guide/ClusterOverview.html)。
  + `INACTIVE` – 服務目前未執行且無法使用。

  **用途**

  ```
  snowballEdge describe-service --service-id service-id --profile profile-name
  ```  
**Example `describe-service` 命令的輸出**  

  ```
  {
    "ServiceId": "s3",
    "Status": {
      "State": "ACTIVE"
    },
    "Storage": {
      "TotalSpaceBytes": 99608745492480,
      "FreeSpaceBytes": 99608744468480
    },
    "Endpoints": [
      {
        "Protocol": "http",
        "Port": 8080,
        "Host": "192.0.2.0"
      },
      {
        "Protocol": "https",
        "Port": 8443,
        "Host": "192.0.2.0",
        "CertificateAssociation": {
          "CertificateArn": "arn:aws:snowball-device:::certificate/6d955EXAMPLEdb71798146EXAMPLE3f0"
        }
      }
    ]
  }
  ```  
**Example Snowball Edge 服務輸出上的 Amazon S3 相容儲存**  

  `describe-service` 命令為 `service-id` 參數的 *s3-snow* 值提供下列輸出。

  ```
  {
    "ServiceId" : "s3-snow",
    "Autostart" : false,
    "Status" : {
      "State" : "ACTIVE"
    },
    "ServiceCapacities" : [ {
      "Name" : "S3 Storage",
      "Unit" : "Byte",
      "Used" : 640303104,
      "Available" : 219571981512
    } ],
    "Endpoints" : [ {
      "Protocol" : "https",
      "Port" : 443,
      "Host" : "10.0.2.123",
      "CertificateAssociation" : {
        "CertificateArn" : "arn:aws:snowball-device:::certificate/a65ba817f2c5ac9683fc3bc1ae123456"
      },
      "Description" : "s3-snow bucket API endpoint",
      "DeviceId" : "JID6ebd4c50-c3a1-4b16-b32c-b254f9b7f2dc",
      "Status" : {
        "State" : "ACTIVE"
      }
    }, {
      "Protocol" : "https",
      "Port" : 443,
      "Host" : "10.0.3.202",
      "CertificateAssociation" : {
        "CertificateArn" : "arn:aws:snowball-device:::certificate/a65ba817f2c5ac9683fc3bc1ae123456"
      },
      "Description" : "s3-snow object API endpoint",
      "DeviceId" : "JID6ebd4c50-c3a1-4b16-b32c-b254f9b7f2dc",
      "Status" : {
        "State" : "ACTIVE"
      }
    }, {
      "Protocol" : "https",
      "Port" : 443,
      "Host" : "10.0.3.63",
      "CertificateAssociation" : {
        "CertificateArn" : "arn:aws:snowball-device:::certificate/a65ba817f2c5ac9683fc3bc1ae123456"
      },
      "Description" : "s3-snow bucket API endpoint",
      "DeviceId" : "JID2a1e0deb-38b1-41f8-b904-a396c62da70d",
      "Status" : {
        "State" : "ACTIVE"
      }
    }, {
      "Protocol" : "https",
      "Port" : 443,
      "Host" : "10.0.2.243",
      "CertificateAssociation" : {
        "CertificateArn" : "arn:aws:snowball-device:::certificate/a65ba817f2c5ac9683fc3bc1ae123456"
      },
      "Description" : "s3-snow object API endpoint",
      "DeviceId" : "JID2a1e0deb-38b1-41f8-b904-a396c62da70d",
      "Status" : {
        "State" : "ACTIVE"
      }
    }, {
      "Protocol" : "https",
      "Port" : 443,
      "Host" : "10.0.2.220",
      "CertificateAssociation" : {
        "CertificateArn" : "arn:aws:snowball-device:::certificate/a65ba817f2c5ac9683fc3bc1ae123456"
      },
      "Description" : "s3-snow bucket API endpoint",
      "DeviceId" : "JIDcc45fa8f-b994-4ada-a821-581bc35d8645",
      "Status" : {
        "State" : "ACTIVE"
      }
    }, {
      "Protocol" : "https",
      "Port" : 443,
      "Host" : "10.0.2.55",
      "CertificateAssociation" : {
        "CertificateArn" : "arn:aws:snowball-device:::certificate/a65ba817f2c5ac9683fc3bc1ae123456"
      },
      "Description" : "s3-snow object API endpoint",
      "DeviceId" : "JIDcc45fa8f-b994-4ada-a821-581bc35d8645",
      "Status" : {
        "State" : "ACTIVE"
      }
    }, {
      "Protocol" : "https",
      "Port" : 443,
      "Host" : "10.0.3.213",
      "CertificateAssociation" : {
        "CertificateArn" : "arn:aws:snowball-device:::certificate/a65ba817f2c5ac9683fc3bc1ae123456"
      },
      "Description" : "s3-snow bucket API endpoint",
      "DeviceId" : "JID4ec68543-d974-465f-b81d-89832dd502db",
      "Status" : {
        "State" : "ACTIVE"
      }
    }, {
      "Protocol" : "https",
      "Port" : 443,
      "Host" : "10.0.3.144",
      "CertificateAssociation" : {
        "CertificateArn" : "arn:aws:snowball-device:::certificate/a65ba817f2c5ac9683fc3bc1ae123456"
      },
      "Description" : "s3-snow object API endpoint",
      "DeviceId" : "JID4ec68543-d974-465f-b81d-89832dd502db",
      "Status" : {
        "State" : "ACTIVE"
      }
    }, {
      "Protocol" : "https",
      "Port" : 443,
      "Host" : "10.0.2.143",
      "CertificateAssociation" : {
        "CertificateArn" : "arn:aws:snowball-device:::certificate/a65ba817f2c5ac9683fc3bc1ae123456"
      },
      "Description" : "s3-snow bucket API endpoint",
      "DeviceId" : "JID6331b8b5-6c63-4e01-b3ca-eab48b5628d2",
      "Status" : {
        "State" : "ACTIVE"
      }
    }, {
      "Protocol" : "https",
      "Port" : 443,
      "Host" : "10.0.3.224",
      "CertificateAssociation" : {
        "CertificateArn" : "arn:aws:snowball-device:::certificate/a65ba817f2c5ac9683fc3bc1ae123456"
      },
      "Description" : "s3-snow object API endpoint",
      "DeviceId" : "JID6331b8b5-6c63-4e01-b3ca-eab48b5628d2",
      "Status" : {
        "State" : "ACTIVE"
      }
    } ]
  }
  ```

## 檢視 Snowball Edge 功能的狀態
<a name="snowball-edge-describe-features"></a>

若要列出 Snowball Edge 上可用功能的狀態，請使用 `describe-features`命令。

`RemoteManagementState` 指出 Snowball Edge Device Management 的狀態，並傳回下列其中一種狀態：
+ `INSTALLED_ONLY` – 已安裝此功能，但未啟用。
+ `INSTALLED_AUTOSTART` – 啟用此功能，裝置會在開啟電源 AWS 區域 時嘗試連接到它。
+ `NOT_INSTALLED` – 裝置不支援此功能，或在啟動之前已在 欄位。

**用途**

```
snowballEdge describe-features --profile profile-name
```

**Example `describe-features` 命令的輸出**  

```
{
  "RemoteManagementState" : String
}
```

## 設定 Snowball Edge 的時間伺服器
<a name="client-set-ntp"></a>

您可以使用 Snowball Edge 用戶端命令來檢視目前的網路時間通訊協定 (NTP) 組態，並選擇伺服器或對等來提供時間。當裝置同時處於鎖定和解除鎖定狀態時，您可以使用 Snowball Edge 用戶端命令。

您有責任提供安全的 NTP 時間伺服器。若要設定裝置連線的 NTP 時間伺服器，請使用 `update-time-servers`命令。

### 檢查 Snowball Edge 的時間來源
<a name="client-describe-ntp"></a>

若要查看裝置目前連線的 NTP 時間來源，請使用 `describe-time-sources`命令。

```
snowballEdge describe-time-sources --profile profile-name
```

**Example `describe-time-sources` 命令的輸出**  

```
{
  "Sources" : [ {
    "Address" : "172.31.2.71",
    "State" : "LOST",
    "Type" : "PEER",
    "Stratum" : 10
  }, {
    "Address" : "172.31.3.203",
    "State" : "LOST",
    "Type" : "PEER",
    "Stratum" : 10
  }, {
    "Address" : "172.31.0.178",
    "State" : "LOST",
    "Type" : "PEER",
    "Stratum" : 10
  }, {
    "Address" : "172.31.3.178",
    "State" : "LOST",
    "Type" : "PEER",
    "Stratum" : 10
  }, {
    "Address" : "216.239.35.12",
    "State" : "CURRENT",
    "Type" : "SERVER",
    "Stratum" : 1
  } ]
}
```

`describe-time-sources` 命令會傳回時間來源狀態的清單。每次來源狀態都包含 `Address`、`Type`、 `State`和 `Stratum` 欄位。以下是這些欄位的含義。
+ `Address` – 時間來源的 DNS 名稱/IP 地址。
+ `State` – 裝置與該時間來源之間的目前連線狀態。有五種可能的狀態：
  + `CURRENT` – 時間來源目前用於同步時間。
  + `COMBINED` – 時間來源會與目前的來源結合。
  + `EXCLUDED` – 時間來源由合併演算法排除。
  + `LOST` – 與時間來源的連線已遺失。
  + `UNACCEPTABLE` – 無效的時間來源，其中合併演算法被視為假名者或具有太多變異性。
+ `Type` – NTP 時間來源可以是伺服器或對等。您可以透過 `update-time-servers`命令設定伺服器。對等只能是叢集中的其他 Snowball Edge 裝置，並在叢集相關聯時自動設定。
+ `Stratum` – 此欄位顯示來源的分層。結構 1 表示具有本機連接參考時鐘的來源。同步到分層 1 來源的來源位於分層 2。同步到分層 2 來源的來源位於分層 3，以此類推。

NTP 時間來源可以是伺服器或對等。使用者可以使用 `update-time-servers`命令設定伺服器，而對等伺服器只能是叢集中的其他 Snowball Edge 裝置。在範例輸出中， `describe-time-sources` 在叢集 5 中的 Snowball Edge 上呼叫 。輸出包含 4 個對等和 1 個伺服器。對等的分層為 10，而伺服器的分層為 1；因此，伺服器被選取為目前時間來源。

### 更新時間伺服器
<a name="update-time-servers"></a>

使用 `update-time-servers`命令和時間伺服器地址，將 Snowball Edge 設定為使用 NTP 伺服器或對等進行 NTP。

```
snowballEdge update-time-servers time-server-address --profile profile-name
```

**注意**  
`update-time-servers` 命令會覆寫先前的 NTP 時間伺服器設定。

**Example `update-time-servers` 命令的輸出**  

```
Updating time servers now.
```

## 取得 QR 碼以驗證 Snowball Edge NFC 標籤
<a name="client-qr-code"></a>

您可以使用此命令來產生裝置特定的 QR 碼，以搭配 AWS Snowball 邊緣 驗證應用程式使用。如需 NFC 驗證的詳細資訊，請參閱 [驗證 NFC 標籤](data-protection.md#nfc-validation)。

**用途**

```
snowballEdge get-app-qr-code --output-file ~/downloads/snowball-qr-code.png --profile profile-name
```

**Example 輸出**  

```
QR code is saved to ~/downloads/snowball-qr-code.png
```

## 更新 MTU 大小
<a name="update-mtu-size"></a>

使用 `update-mtu-size`命令來修改 Snowball Edge 裝置實體界面的最大傳輸單位 (MTU) 位元組大小。與此實體網路介面相關聯的所有虛擬網路介面和直接網路介面都會設定為相同的 MTU 大小。

**注意**  
最小 MTU 大小為 1500 個位元組，最大大小為 9216 個位元組。

您可以使用 `describe-device`命令來擷取這些界面的實體網路介面 IDs和目前 MTU 大小。如需詳細資訊，請參閱[檢視 Snowball Edge 的狀態](#client-status)。

您可以使用 `descibe-direct-network-interface`和 `describe-virtual-network-interface`命令來擷取這些界面目前的 MTU 大小。

**用途**

```
snowballEdge update-mtu-size --physical-network-interface-id physical-network-interface-id --mtu-size size-in-bytes --profile profile-name
```

**Example `update-mtu-size` 輸出的**  

```
{
    "PhysicalNetworkInterface": {
        "PhysicalNetworkInterfaceId": "s.ni-8c1f891d7f5b87cfe",
        "PhysicalConnectorType": "SFP_PLUS",
        "IpAddressAssignment": "DHCP",
        "IpAddress": "192.0.2.0",
        "Netmask": "255.255.255.0",
        "DefaultGateway": "192.0.2.255",
        "MacAddress": "8A:2r:5G:9p:6Q:4s",
        "MtuSize": "5743"
    }
}
```