

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

# 在 Snowball Edge 上使用 EC2-compatible端點
<a name="using-ec2-endpoint"></a>

您可以在下面找到 Amazon EC2-compatible端點的概觀。使用此端點，您可以使用與 Amazon EC2-compatible API 操作，以程式設計方式管理您的 Amazon Machine Image (AMIs) 和運算執行個體。

## 將 EC2-compatible端點指定為 Snowball Edge 上的 AWS CLI 端點
<a name="using-ec2-adapter-cli-endpoint"></a>

當您使用 AWS CLI 向 AWS Snowball 邊緣 裝置發出命令時，您可以指定端點是與 Amazon EC2-compatible端點。您可以選擇使用 HTTPS 端點或不安全的 HTTP 端點，如下所示。

**HTTPS 安全端點**

```
aws ec2 describe-instances --endpoint https://192.0.2.0:8243 --ca-bundle path/to/certificate
```

**HTTP 不安全端點 **

```
aws ec2 describe-instances --endpoint http://192.0.2.0:8008
```

如果您使用 HTTPS 端點 `8243`，您傳輸中的資料都會經過加密。此加密是透過 Snowball Edge 在解除鎖定時產生的憑證來確保。有了憑證之後，就可以將其儲存到本機 `ca-bundle.pem` 檔案。然後，您可以設定 AWS CLI 設定檔，以包含憑證的路徑，如下所述。

**將您的憑證與 Amazon EC2-compatible端點建立關聯**

1. 將 Snowball Edge 連接到電源和網路，然後將其開啟。

1. 在裝置完成解鎖後，請記下其在本機網路上的 IP 地址。

1. 從您網路上的終端機，確定您可以 ping Snowball Edge。

1. 在您的終端機中執行 `snowballEdge get-certificate` 命令。如需此命令的詳細資訊，請參閱[在 Snowball Edge 上管理公有金鑰憑證](snowball-edge-certificates-cli.md)。

1. 將 `snowballEdge get-certificate` 命令的輸出儲存至檔案，例如 `ca-bundle.pem`。

1. 從您的終端機中執行下列命令。

   ```
   aws configure set profile.snowballEdge.ca_bundle /path/to/ca-bundle.pem
   ```

當您完成程序後，可以使用這些本機登入資料、憑證及指定的端點來執行 CLI 命令。

## Snowball Edge 上支援的 EC2-compatible AWS CLI 命令
<a name="cli-support-ec2-edge"></a>

您可以透過與 Amazon EC2-compatible端點，在 Snowball Edge 裝置上管理運算執行個體。這種端點類型支援許多 Amazon EC2 CLI 命令和 AWS SDKs 的動作。如需有關安裝和設定 的資訊 AWS CLI，包括指定 AWS 區域 您要 AWS CLI 呼叫哪些 ，請參閱 [AWS Command Line Interface 使用者指南](https://docs.aws.amazon.com/cli/latest/userguide/)。

### Snowball Edge 上支援的 EC2-compatible AWS CLI 命令清單
<a name="list-cli-commands-ec2-edge"></a>

您可以在下面找到 Snowball Edge 裝置上支援的 Amazon EC2 AWS CLI 命令和選項子集的描述。如果某命令或選項未在以下列出，則不受支援。您可以隨著命令宣告某些不受支援的選項。不過，系統會忽略這些部分。
+ [associate-address](https://docs.aws.amazon.com/cli/latest/reference/ec2/associate-address.html) – 將虛擬 IP 地址與執行個體建立關聯，以在裝置上三個實體網路界面的其中一個使用：
  + --instance-id – 單一 `sbe` 執行個體的 ID。
  + --public-ip – 要用來存取執行個體的虛擬 IP 地址。
+ [attach-volume](https://docs.aws.amazon.com/cli/latest/reference/ec2/attach-volume.html) – 將 Amazon EBS 磁碟區連接至裝置上的已停止或執行中的執行個體，並使用指定的裝置名稱將其公開至執行個體。
  + --device `value` – 裝置名稱。
  + --instance-id – 目標 Amazon EC2-compatible執行個體的 ID。
  + --volume-id `value` – EBS 磁碟區的 ID。
+ [authorize-security-group-egress](https://docs.aws.amazon.com/cli/latest/reference/ec2/authorize-security-group-egress.html) – 將一或多個輸出規則新增至安全群組，以便與 Snowball Edge 裝置搭配使用。特別是，這個動作允許執行個體將流量傳送到一或多個目的地 IPv4 CIDR 地址範圍。如需詳細資訊，請參閱[使用 Snowball Edge 上的安全群組控制網路流量](edge-security-groups.md)。
  + --group-id `value` – 安全群組的 ID
  + 【--ip-permissions `value`】 – 一或多個 IP 許可集。
+ [authorize-security-group-ingress](https://docs.aws.amazon.com/cli/latest/reference/ec2/authorize-security-group-ingress.html) – 將一或多個輸入規則新增至安全群組。呼叫 `authorize-security-group-ingress` 時，您必須指定 `group-name` 或 `group-id` 的值。
  + 【--group-name `value`】 – 安全群組的名稱。
  + 【--group-id `value`】 – 安全群組的 ID
  + 【--ip-permissions `value`】 – 一或多個 IP 許可集。
  + [--protocol `value`] IP 通訊協定。可能值為 `tcp`、`udp` 及 `icmp`。除非已指定 "all protocols" 的值 (-1)，否則需要 `--port` 引數。
  + 【--port `value`】 – 對於 TCP 或 UDP，允許連接埠的範圍。此值可以是單一整數或範圍 （最小值至最大值）。

    對於 ICMP，單一整數或範圍 (`type`–`code`)，其中的 `type` 代表 ICMP 類型編號，而 `code` 代表 ICMP 代碼編號。-1 值表示所有 ICMP 類型的所有 ICMP 代碼。`type` 的 -1 值指出指定 ICMP 類型的所有 ICMP 代碼。
  + 【--cidr `value`】 – CIDR IP 範圍。
+ [create-launch-template](https://docs.aws.amazon.com/cli/latest/reference/ec2/create-launch-template.html) – 建立啟動範本。*啟動範本*包含啟動執行個體的參數。當您使用 `RunInstances` 啟動執行個體時，可以指定啟動範本而無需在請求中提供啟動參數。每個裝置最多可以建立 100 個範本。
  + --launch-template-name `string` – 啟動範本的名稱。
  + --launch-template-data `structure` – 啟動範本的資訊。支援以下屬性：
    + `ImageId`
    + `InstanceType`
    + `SecurityGroupIds`
    + `TagSpecifications`
    + `UserData`

    JSON 語法：

    ```
    {
        "ImageId":"string",
        "InstanceType":"sbe-c.large",
        "SecurityGroupIds":["string", ...],
        "TagSpecifications":[{"ResourceType":"instance","Tags":[{"Key":"Name","Value":"Test"},
        {"Key":"Stack","Value":"Gamma"}]}],
        "UserData":"this is my user data"
    }
    ```
  + 【--version-description `string`】 – 啟動範本第一個版本的描述。
  + --endpoint `snowballEndpoint` – 可讓您使用 Amazon EC2-compatible API 操作，以程式設計方式管理運算執行個體的值。如需詳細資訊，請參閱[將 EC2-compatible端點指定為 Snowball Edge 上的 AWS CLI 端點](#using-ec2-adapter-cli-endpoint)。
+ [create-launch-template-version](https://docs.aws.amazon.com/cli/latest/reference/ec2/create-launch-template-version.html) – 為啟動範本建立新版本。您可以指定現有的啟動範本版本當做新版本的基礎。啟動範本版本會依其建立順序進行編號。您無法指定、變更或替換啟動範本的版本編號。每個啟動範本最多可以建立 100 個版本。

  在請求中指定啟動範本 ID 或啟動範本名稱。
  + --launch-template-id `string` – 啟動範本的 ID。
  + --launch-template-name `string` – 啟動範本的名稱。
  + --launch-template-data `structure` – 啟動範本的資訊。支援以下屬性：
    + `ImageId`
    + `InstanceType`
    + `SecurityGroupIds`
    + `TagSpecifications`
    + `UserData`

    JSON 語法：

    ```
    {
        "ImageId":"string",
        "InstanceType":"sbe-c.large",
        "SecurityGroupIds":["string", ...],
        "TagSpecifications":[{"ResourceType":"instance","Tags":[{"Key":"Name","Value":"Test"},
         {"Key":"Stack","Value":"Gamma"}]}],
        "UserData":"this is my user data"
    }
    ```
  + 【--source-version `string`】 – 新版本的啟動範本版本編號。新的版本繼承相同於原始版本的啟動參數，但您在 `launch-template-data` 中指定的參數除外。
  + 【--version-description `string`】 – 啟動範本第一個版本的描述。
  + --endpoint `snowballEndpoint` – 可讓您使用 Amazon EC2-compatible API 操作，以程式設計方式管理運算執行個體的值。如需詳細資訊，請參閱[將 EC2-compatible端點指定為 Snowball Edge 上的 AWS CLI 端點](#using-ec2-adapter-cli-endpoint)。
+ [create-tags](https://docs.aws.amazon.com/cli/latest/reference/ec2/create-tags.html) – 新增或覆寫指定資源的一或多個標籤。每個資源的上限為 50 個標籤。每個標籤皆包含索引鍵與選用值。資源的標籤索引鍵必須是唯一的。支援以下資源：
  + AMI
  + 執行個體
  + 啟動範本
  + 安全群組
  + 金鑰對
+ [create-security-group](https://docs.aws.amazon.com/cli/latest/reference/ec2/create-security-group.html) – 在 Snowball Edge 上建立安全群組。您最多可以建立 50 個安全群組。建立安全群組時，您可以指定您所選易記名稱：
  + --group-name `value` – 安全群組的名稱。
  + --description `value` – 安全群組的描述。此資訊僅供參考。此值的長度最多為 255 個字元。
+ [create-volume](https://docs.aws.amazon.com/cli/latest/reference/ec2/create-volume.html) – 建立可連接到裝置上的執行個體的 Amazon EBS 磁碟區。
  + 【-size `value`】 – 磁碟區的大小，以 GiBs為單位，可以是 1 GiB 到 1 TB (1000 GiBs)。
  + 【--snapshot-id `value`】 – 從中建立磁碟區的快照。
  + 【--volume-type `value`】 – 磁碟區類型。如未指定任何值，預設為 `sbg1`。可能的值包括以下：
    + `sbg1` 適用於磁性磁碟區
    + `sbp1` 適用於 SSD 磁碟區
  + 【--tag-specification `value`】 – 要在建立期間套用至磁碟區的標籤清單。
+ [delete-launch-template](https://docs.aws.amazon.com/cli/latest/reference/ec2/delete-launch-template.html) – 刪除啟動範本。刪除啟動範本會刪除它的所有版本。

  在請求中指定啟動範本 ID 或啟動範本名稱。
  + --launch-template-id `string` – 啟動範本的 ID。
  + --launch-template-name `string` – 啟動範本的名稱。
  + --endpoint `snowballEndpoint` – 可讓您使用 Amazon EC2-compatible API 操作，以程式設計方式管理運算執行個體的值。如需詳細資訊，請參閱[將 EC2-compatible端點指定為 Snowball Edge 上的 AWS CLI 端點](#using-ec2-adapter-cli-endpoint)。
+ [delete-launch-template-version](https://docs.aws.amazon.com/cli/latest/reference/ec2/delete-launch-template-version.html) – 刪除啟動範本的一或多個版本。您無法刪除啟動範本的預設版本；您必須先指派不同的版本做為預設值。如果預設版本是啟動範本的唯一版本，則使用 `delete-launch-template` 命令來刪除整個啟動範本。

  在請求中指定啟動範本 ID 或啟動範本名稱。
  + --launch-template-id `string` – 啟動範本的 ID。
  + --launch-template-name `string` – 啟動範本的名稱。
  + --versions （清單） `"string" "string"` – 要刪除的一或多個啟動範本版本的版本編號。
  + --endpoint `snowballEndpoint` – 可讓您使用 Amazon EC2-compatible API 操作，以程式設計方式管理運算執行個體的值。如需詳細資訊，請參閱[將 EC2-compatible端點指定為 Snowball Edge 上的 AWS CLI 端點](#using-ec2-adapter-cli-endpoint)。
+ [delete-security-group](https://docs.aws.amazon.com/cli/latest/reference/ec2/delete-security-group.html) – 刪除安全群組。

  如果您嘗試刪除的安全群組與執行個體相關聯，或其為另一個安全群組所參考的對象，則該操作會失敗並傳回 `DependencyViolation`。
  + --group-name `value` – 安全群組的名稱。
  + --description `value` – 安全群組的描述。此資訊僅供參考。此值的長度最多為 255 個字元。
+ [delete-tags](https://docs.aws.amazon.com/cli/latest/reference/ec2/delete-tags.html) – 從指定的資源 (AMI、運算執行個體、啟動範本或安全群組） 刪除指定的標籤集。
+ [delete-volume](https://docs.aws.amazon.com/cli/latest/reference/ec2/delete-volume.html) – 刪除指定的 Amazon EBS 磁碟區。磁碟區必須位在 `available` 狀態 (未連接到執行個體)。
  + --volume-id `value` – 磁碟區的 ID。
+ [describe-addresses](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-addresses.html) – 描述與裝置上的相同`sbe`執行個體數量相關聯的一或多個虛擬 IP 地址。
  + --public-ips – 與執行個體相關聯的一或多個虛擬 IP 地址。
+ [describe-images](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html) – 說明您可用的一或多個映像 AMIs)。您可用的映像會在任務建立期間新增至 Snowball Edge 裝置。
  + --image-id – AMI 的 Snowball AMI ID。
+ [describe-instance-attribute](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instance-attribute.html) – 描述指定執行個體的指定屬性。您一次只能指定一個屬性。支援以下屬性：
  + `instanceInitiatedShutdownBehavior` 
  + `instanceType`
  + `userData`
+ [describe-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html) – 描述一或多個執行個體。回應會傳回指派給執行個體的任何安全群組。
  + --instance-ids – 裝置上已停止之一或多個 `sbe` 執行個體的 ID。
  + --page-size – 呼叫中要取得的每個頁面大小。此值不會影響命令輸出中傳回的項目數。設定的頁面大小愈小，對裝置發出的呼叫就愈多，在每個呼叫中擷取的項目也愈少。這有助避免呼叫逾時。
  + --max-items – 在命令的輸出中傳回的項目總數。如果可用的總項目數超過指定的值，會在命令的輸出中提供 `NextToken`。若要繼續分頁，請在後續命令的 `starting-token` 引數中提供 `NextToken` 值。
  + --starting-token – 指定在何處開始分頁的字符。此符記是來自先前已截斷回應的 `NextToken` 值。
+ [describe-instance-status](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instance-status.html) – 描述指定執行個體或所有執行個體的狀態。根據預設，只會描述執行中的執行個體，除非您特別指示 傳回所有執行個體的狀態。執行個體狀態包括下列元件：
  + **狀態檢查** – Snow 裝置會在執行 Amazon EC2-compatible執行個體時執行狀態檢查，以識別硬體和軟體問題。
  + **執行個體狀態** – 從您啟動執行個體的那一刻起，您就可以管理執行個體，直到其終止為止。

  使用此命令時，支援以下篩選條件。
  + `[--filters]` （清單）

    篩選條件。
    + `instance-state-code` – 執行個體狀態的程式碼，以 16 位元無符號整數表示。高位元組用於內部服務報告，應予以忽略。低位元組是根據表示的狀態設定。有效值為 0 （待定）、16 （執行中）、32 （倒轉）、48 （已終止）、64 （停止） 和 80 （已停止）。
    + `instance-state-name` – 執行個體的狀態 (`pending` \$1 `running` \$1 `shutting-down` \$1 `terminated` \$1 `stopping` \$1 `stopped` )。
    + `instance-status.reachability` – 依名稱為 `reachability`(`passed` \$1 `failed` \$1 `initializing` \$1 ) `insufficient-data` 的執行個體狀態進行篩選。
    + `instance-status.status` – 執行個體的狀態 (`ok` \$1 `impaired` \$1 `initializing` \$1 `insufficient-data` \$1 `not-applicable` )。
    + `system-status.reachability` – 篩選名稱為可連線性的系統狀態 (`passed` \$1 `failed` \$1 `initializing` \$1 `insufficient-data` )。
    + `system-status.status` – 執行個體的系統狀態 (`ok` \$1 `impaired` \$1 `initializing` \$1 `insufficient-data` \$1 `not-applicable` )。
  + JSON 語法：

    ```
    [
      {
        "Name": "string",
        "Values": ["string", ...]
      }
      ...
    ]
    ```
  + `[--instance-ids]` （清單）

    執行個體 IDs。

    預設：描述您的所有執行個體。
  + `[--dry-run|--no-dry-run]` （布林值）

    檢查您是否具有動作所需的許可，而無需實際提出請求，並提供錯誤回應。如果您有必要的許可，則錯誤回應為 `DryRunOperation`。

    否則為 `UnauthorizedOperation`。
  + `[--include-all-instances | --no-include-all-instances]` （布林值）

    當 時`true`， 會包含所有執行個體的運作狀態。當 時`false`， 只會包含執行中執行個體的運作狀態。

    預設：`false`
  + `[--page-size]` （整數） – 要在通話中取得的每個頁面大小。此值不會影響命令輸出中傳回的項目數。設定的頁面大小愈小，對裝置發出的呼叫就愈多，在每個呼叫中擷取的項目也愈少。這有助避免呼叫逾時。
  + `[--max-items]` （整數） – 在命令的輸出中傳回的項目總數。如果可用的總項目數超過指定的值，會在命令的輸出中提供 `NextToken`。若要繼續分頁，請在後續命令的 `starting-token` 引數中提供 `NextToken` 值。
  + `[--starting-token]` （字串） – 用於指定從何處開始分頁的字符。此符記是來自先前已截斷回應的 `NextToken` 值。
+ [describe-launch-templates](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-launch-templates.html) – 說明一或多個啟動範本。`describe-launch-templates` 命令是一項分頁操作。您可以進行多個呼叫，以擷取結果的整個資料集。

  在請求中指定啟動範本 ID 或啟動範本名稱。
  + --launch-template-ids （清單） `"string" "string"` – 啟動範本IDs 清單。
  + --launch-template-names （清單） `"string" "string"` – 啟動範本的名稱清單。
  + --page-size – 呼叫中要取得的每個頁面大小。此值不會影響命令輸出中傳回的項目數。設定的頁面大小愈小，對裝置發出的呼叫就愈多，在每個呼叫中擷取的項目也愈少。這有助避免呼叫逾時。
  + --max-items – 在命令的輸出中傳回的項目總數。如果可用的總項目數超過指定的值，會在命令的輸出中提供 `NextToken`。若要繼續分頁，請在後續命令的 `starting-token` 引數中提供 `NextToken` 值。
  + --starting-token – 指定在何處開始分頁的字符。此符記是來自先前已截斷回應的 `NextToken` 值。
  + --endpoint `snowballEndpoint` – 可讓您使用 Amazon EC2-compatible API 操作，以程式設計方式管理運算執行個體的值。如需詳細資訊，請參閱[將 EC2-compatible端點指定為 Snowball Edge 上的 AWS CLI 端點](#using-ec2-adapter-cli-endpoint)。
+ [describe-launch-template-versions](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-launch-template-versions.html) – 描述指定啟動範本的一或多個版本。您可以描述所有版本、個別版本或多種版本。`describe-launch-template-versions` 命令是一項分頁操作。您可以進行多個呼叫，以擷取結果的整個資料集。

  在請求中指定啟動範本 ID 或啟動範本名稱。
  + --launch-template-id `string` – 啟動範本的 ID。
  + --launch-template-name `string` – 啟動範本的名稱。
  + 【--versions (list) `"string" "string"`】 – 要刪除的一或多個啟動範本版本的版本編號。
  + 【--min-version `string`】 – 描述啟動範本版本的版本編號。
  + 【--max-version `string`】 – 用來描述啟動範本版本的版本編號。
  + --page-size – 呼叫中要取得的每個頁面大小。此值不會影響命令輸出中傳回的項目數。設定的頁面大小愈小，對裝置發出的呼叫就愈多，在每個呼叫中擷取的項目也愈少。這有助避免呼叫逾時。
  + --max-items – 在命令的輸出中傳回的項目總數。如果可用的總項目數超過指定的值，會在命令的輸出中提供 `NextToken`。若要繼續分頁，請在後續命令的 `starting-token` 引數中提供 `NextToken` 值。
  + --starting-token – 指定在何處開始分頁的字符。此符記是來自先前已截斷回應的 `NextToken` 值。
  + --endpoint `snowballEndpoint` – 可讓您使用 Amazon EC2-compatible API 操作，以程式設計方式管理運算執行個體的值。如需詳細資訊，請參閱[將 EC2-compatible端點指定為 Snowball Edge 上的 AWS CLI 端點](#using-ec2-adapter-cli-endpoint)。
+ [describe-security-groups](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-security-groups.html) – 描述一或多個安全群組。

  `describe-security-groups` 命令是一項分頁操作。您可以發出多個 API 呼叫來擷取整個結果資料集。
  + 【--group-name `value`】 – 安全群組的名稱。
  + 【--group-id `value`】 – 安全群組的 ID。
  + 【--page-size `value`】 – 要在 AWS 服務呼叫中取得的每個頁面大小。此大小不會影響命令輸出中傳回的項目數。設定較小的頁面大小會導致對服務的 AWS 呼叫更多，每次呼叫中擷取的項目較少。此方法有助於防止 AWS 服務呼叫逾時。如需使用範例，請參閱*AWS Command Line Interface 《 使用者指南*[》中的分頁](https://docs.aws.amazon.com/cli/latest/userguide/pagination.html)。
  + 【--max-items `value`】 – 在命令的輸出中傳回的項目總數。如果可用的總項目數超過指定的值，會在命令的輸出中提供 `NextToken`。若要繼續分頁，請在後續命令的 `starting-token` 引數中提供 `NextToken` 值。請勿直接在 外部使用`NextToken`回應元素 AWS CLI。如需使用範例，請參閱*AWS Command Line Interface 《 使用者指南*[》中的分頁](https://docs.aws.amazon.com/cli/latest/userguide/pagination.html)。
  + 【--starting-token `value`】 – 指定在何處開始分頁的字符。此符記是來自先前已截斷回應的 `NextToken` 值。如需使用範例，請參閱*AWS Command Line Interface 《 使用者指南*》中的[分頁](https://docs.aws.amazon.com/cli/latest/userguide/pagination.html)。
+ [describe-tags](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-tags.html) – 描述指定資源 (`image`、 `instance`或 安全群組） 的一或多個標籤。系統會透過此命令，支援以下篩選條件：
  + launch-template
  + resource-id
  + resource-type – `image` 或 `instance`
  + 金錀
  + value
+ [describe-volumes](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-volumes.html) – 描述指定的 Amazon EBS 磁碟區。
  + 【--max-items `value`】 – 在命令的輸出中傳回的項目總數。如果可用的總項目數超過指定的值，會在命令的輸出中提供 `NextToken`。若要繼續分頁，請在後續命令的 `starting-token` 引數中提供 `NextToken` 值。
  + 【--starting-token `value`】 – 指定在何處開始分頁的字符。此符記是來自先前已截斷回應的 `NextToken` 值。
  + 【--volume-ids `value`】 – 一或多個磁碟區 IDs。
+ [detach-volume](https://docs.aws.amazon.com/cli/latest/reference/ec2/detach-volume.html) – 從已停止或執行中的執行個體分離 Amazon EBS 磁碟區。
  + 【--device `value`】 – 裝置名稱。
  + 【--instance-id】 – 目標 Amazon EC2 執行個體的 ID。
  + --volume-id `value` – 磁碟區的 ID。
+ [disassociate-address](https://docs.aws.amazon.com/cli/latest/reference/ec2/disassociate-address.html) – 將虛擬 IP 地址從相關聯的執行個體取消關聯。
  + --public-ip – 您要與執行個體取消關聯的虛擬 IP 地址。
+ [get-launch-template-data](https://docs.aws.amazon.com/cli/latest/reference/ec2/get-launch-template-data.html) – 擷取指定執行個體的組態資料。此資料可用來建立啟動範本。
  + --instance-id – 單一 `sbe` 執行個體的 ID。
  + --endpoint `snowballEndpoint` – 可讓您使用 Amazon EC2-compatible API 操作，以程式設計方式管理運算執行個體的值。如需詳細資訊，請參閱[將 EC2-compatible端點指定為 Snowball Edge 上的 AWS CLI 端點](#using-ec2-adapter-cli-endpoint)。
+ [modify-launch-template](https://docs.aws.amazon.com/cli/latest/reference/ec2/modify-launch-template.html) – 修改啟動範本。您可以指定要將啟動範本的哪些版本設定為預設版本。如果您啟動執行個體但未指定啟動範本版本，系統會套用預設的啟動範本版本。

  在請求中指定啟動範本 ID 或啟動範本名稱。
  + --launch-template-id `string` – 啟動範本的 ID。
  + --launch-template-name `string` – 啟動範本的名稱。
  + --default-version `string` – 要設定為預設版本的啟動範本版本編號。
  + --endpoint `snowballEndpoint` – 可讓您使用 Amazon EC2-compatible API 操作，以程式設計方式管理運算執行個體的值。如需詳細資訊，請參閱[將 EC2-compatible端點指定為 Snowball Edge 上的 AWS CLI 端點](#using-ec2-adapter-cli-endpoint)。
+ [modify-instance-attribute](https://docs.aws.amazon.com/cli/latest/reference/ec2/modify-instance-attribute.html) – 修改指定執行個體的屬性。支援以下屬性：
  + `instanceInitiatedShutdownBehavior`
  + `userData`
+ [revoke-security-group-egress](https://docs.aws.amazon.com/cli/latest/reference/ec2/revoke-security-group-egress.html) – 從安全群組移除一或多個輸出規則：
  + 【--group-id `value`】 – 安全群組的 ID
  + 【--ip-permissions `value`】 – 一或多個 IP 許可集。
+ [revoke-security-group-ingress](https://docs.aws.amazon.com/cli/latest/reference/ec2/revoke-security-group-ingress.html) – 將一或多個輸入規則撤銷至安全群組。呼叫 `revoke-security-group-ingress` 時，您必須指定 `group-name` 或 `group-id` 的值。
  + 【--group-name `value`】 – 安全群組的名稱。
  + 【--group-id `value`】 – 安全群組的 ID。
  + 【--ip-permissions `value`】 – 一或多個 IP 許可集。
  + [--protocol `value`] IP 通訊協定。可能值為 `tcp`、`udp` 及 `icmp`。除非已指定 "all protocols" 的值 (-1)，否則需要 `--port` 引數。
  + 【--port `value`】 – 對於 TCP 或 UDP，允許連接埠的範圍。單一整數或範圍 （最小值至最大值）。

    對於 ICMP，單一整數或範圍 (`type`–`code`)，其中的 `type` 代表 ICMP 類型編號，而 `code` 代表 ICMP 代碼編號。-1 值表示所有 ICMP 類型的所有 ICMP 代碼。`type` 的 -1 值指出指定 ICMP 類型的所有 ICMP 代碼。
  + 【--cidr `value`】 – CIDR IP 範圍。
+ [run-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html) – 使用 AMI 的 Snowball AMI ID 啟動多個運算執行個體。
**注意**  
根據執行個體的大小和類型，在 Snowball Edge 上啟動運算執行個體最多可能需要一小時半的時間。
  + 【--block-device-mappings `(list)]` – 區塊型設備映射項目。支援參數 `DeleteOnTermination`、`VolumeSize` 和 `VolumeType`。開機磁碟區類型必須是 `sbg1`。

    此命令的 JSON 語法如下所示。

    ```
    {
       "DeviceName": "/dev/sdh",
       "Ebs": 
       {
          "DeleteOnTermination": true|false,
          "VolumeSize": 100,
          "VolumeType": "sbp1"|"sbg1"
       }
    }
    ```
  + --count – 要啟動的執行個體數量。如果提供單個數目，會假定為要啟動的最小數目 (預設為 1)。如果以 `min:max` 的格式提供某個範圍，會將第一個數目視為要啟動的最小執行個體數目，而第二個則視為要啟動的最大執行個體數目。
  + --image-id – 您可以透過呼叫 取得的 AMI Snowball AMI ID`describe-images`。必須具有 AMI 才可啟動執行個體。
  + --InstanceInitiatedShutdownBehavior – 根據預設，當您從執行個體啟動關機時 （使用關機或關機等命令），執行個體會停止。您可以變更這項預設動作，讓執行個體改為終止。支援參數 `stop` 和 `terminate`。預設值為 `stop`。如需詳細資訊，請參閱《*Amazon EC2 Linux *[執行個體使用者指南》中的變更執行個體啟動的關機行為](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingInstanceInitiatedShutdownBehavior)。
  + --instance-type – `sbe` 執行個體類型。
  + --launch-template `structure` – 用來啟動執行個體的啟動範本。任何您在 `run-instances` 命令中指定的參數都會覆寫啟動範本中的相同參數。您可以指定啟動範本的名稱或 ID，但不能同時指定兩者。

    ```
    {
       "LaunchTemplateId": "string",
       "LaunchTemplateName": "string",
       "Version": "string"
    }
    ```
  + --security-group-ids – 一或多個安全群組 IDs。您可以使用 [CreateSecurityGroup](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html) 來建立安全群組。如果未提供任何值，則會對建立的執行個體指派預設安全群組的 ID。
  + --tag-specifications – 在啟動期間套用至資源的標籤。您只能在啟動時對執行個體加上標籤。指定的標籤會套用至所有於啟動期間建立的執行個體。若要在資源建立後為其加上標籤，請使用 `create-tags`。
  + --user-data – 要提供給執行個體的使用者資料。如果您使用的是 AWS CLI，則會為您執行 base64 編碼，而且您可以從檔案載入文字。否則，您必須提供 base64 編碼的文字。
  + --key-name （字串） – 金鑰對的名稱。您可以使用 `CreateKeyPair`或 建立金鑰對`ImportKeyPair`。
**警告**  
如果您未指定金鑰對，除非您選擇設定為允許使用者以其他方式登入的 AMI，否則無法連線到執行個體。
+ [start-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/start-instances.html) – 啟動您先前已停止的`sbe`執行個體。連接到該執行個體的所有資源在啟動和停止的整個過程中都會持續存在，但若執行個體已終止，就會予以清除。
  + --instance-ids – 裝置上已停止之一或多個 `sbe` 執行個體的 ID。
+ [stop-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/stop-instances.html) – 停止正在執行的`sbe`執行個體。連接到該執行個體的所有資源在啟動和停止的整個過程中都會持續存在，但若執行個體已終止，就會予以清除。
  + --instance-ids – 裝置上已停止之一或多個 `sbe` 執行個體的 ID。
+ [terminate-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/terminate-instances.html) – 關閉一或多個執行個體。這是等冪操作，如果您多次終止執行個體，每個呼叫都會成功。連接到該執行個體的所有資源在啟動和停止的整個過程中都會持續存在，但若執行個體已終止，就會清除資料。
**注意**  
根據預設，使用如 `shutdown` 或 `poweroff` 等命令時，該執行個體會停止。不過，您可以使用 `InstanceInitiatedShutdownBehavior` 屬性來變更此行為，讓這些命令終止您的執行個體。如需詳細資訊，請參閱《*Amazon EC2 Linux *[執行個體使用者指南》中的變更執行個體啟動的關機行為](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingInstanceInitiatedShutdownBehavior)。
  + --instance-ids – 要在裝置上終止的一或多個`sbe`執行個體IDs。為這些執行個體存放的所有相關聯資料都將遺失。
+ [create-key-pair](https://docs.aws.amazon.com/cli/latest/reference/ec2/create-key-pair.html) – 建立具有指定名稱的 2048 位元 RSA 金鑰對。Amazon EC2 會存放公有金鑰，並顯示私有金鑰供您儲存至檔案。私有金鑰會以未加密的 PEM 編碼 PKCS\$11 私有金鑰傳回。如果具有指定名稱的金鑰已存在，Amazon EC2 會傳回錯誤。
  + --key-name （字串） – 金鑰對的唯一名稱。

    限制條件：最多 255 個 ASCII 字元。
  + 【--tag-specifications】 (list) – 要套用至新金鑰對的標籤。

  ```
  {
      "ResourceType": "image"|"instance"|"key-pair"|"launch-template"|"security-group",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
        ...
      ]
    }
    ...
  ```
+ [import-key-pair](https://docs.aws.amazon.com/cli/latest/reference/ec2/import-key-pair.html) – 
  + --key-name （字串） – 金鑰對的唯一名稱。

    限制條件：最多 255 個 ASCII 字元。
  + --public-key-material (blob) – 公有金鑰。對於 API 呼叫，文字必須是 base64 編碼。對於命令列工具，會為您執行 base64 編碼。
  + 【--tag-specifications】 (list) – 要套用至新金鑰對的標籤。

  ```
  {
      "ResourceType": "image"|"instance"|"key-pair"|"launch-template"|"security-group",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
        ...
      ]
    }
  ```
+ [describe-key-pairs](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-key-pairs.html) – 

  【--filters】 （清單） – 篩選條件。
  + key-pair-id – 金鑰對的 ID。
  + key-name – 金鑰對的名稱。
  + tag-key – 指派給資源之標籤的索引鍵。使用此篩選條件來尋找指派具有特定索引鍵之標籤的所有資源，無論標籤值為何。
  + 【--tag-specifications】 (list) – 要套用至新金鑰對的標籤。
  + tag ：key – 指派給資源之標籤的鍵/值組合。使用篩選條件名稱中的標籤鍵，並將標籤值作為篩選條件值。例如，要尋找標籤帶有鍵 `Owner` 和值 `Team A` 的所有資源，將篩選條件名稱指定為 `tag:Owner`，將篩選條件值指定為 `Team A`。

  ```
  {
      "Name": "string",
      "Values": ["string", ...]
    }
    ...
  ```
+ 【--key-names】 （清單） – 金鑰對名稱。

  預設：描述所有金鑰對。
+ 【--key-pair-ids】 （清單） – 金鑰對IDs。
+ [delete-key-pair](https://docs.aws.amazon.com/cli/latest/reference/ec2/delete-key-pair.html) – 
  + 【--key-name】 （字串） – 金鑰對的名稱。
  + 【--key-pair-id】 （字串） – 金鑰對的 ID。

## Snowball Edge 上支援的 EC2-compatible API 操作
<a name="using-ec2-adapter-supported-api"></a>

您可以在下面找到可與 Snowball Edge 搭配使用的 EC2-compatible API 操作，並在 *Amazon EC2 API 參考中找到其描述的連結。 *Amazon EC2-compatible API 呼叫需要簽章版本 4 (SigV4) 簽署。如果您使用 AWS CLI 或 AWS SDK 進行這些 API 呼叫，則會為您處理 SigV4 簽署。否則，您需要實作自己的 SigV4 簽署解決方案。如需詳細資訊，請參閱[在 Snowball Edge 上取得和使用本機 Amazon S3 登入資料](using-adapter.md#adapter-credentials)。
+ [AssociateAddress](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateAddress.html) – 將彈性 IP 地址與執行個體或網路界面建立關聯。
+  [AttachVolume](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AttachVolume.html) – 支援下列請求參數：
  + `Device`
  + `InstanceId`
  + `VolumeId`
+ [AuthorizeSecurityGroupEgress](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AuthorizeSecurityGroupEgress.html) – 將一或多個輸出規則新增至安全群組，以便與 Snowball Edge 裝置搭配使用。特別是，這個動作允許執行個體將流量傳送到一或多個目的地 IPv4 CIDR 地址範圍。
+ [AuthorizeSecurityGroupIngress](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AuthorizeSecurityGroupIngress.html) – 將一或多個輸入規則新增至安全群組。呼叫 AuthorizeSecurityGroupIngress 時，您必須指定 `GroupName` 或 `GroupId` 的值。
+  [CreateVolume](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) – 支援下列請求參數：
  + `SnapshotId`
  + `Size`
  + `VolumeType`
  + `TagSpecification.N`
+ [CreateLaunchTemplate](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplate.html) – 支援下列請求參數：
  + `ImageId`
  + `InstanceType`
  + `SecurityGroupIds`
  + `TagSpecifications`
  + `UserData`
+ [CreateLaunchTemplateVersion](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplateVersion.html)
+ [CreateTags](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html) – 支援下列請求參數：
  + `AMI`
  + `Instance`
  + `Launch template`
  + `Security group`
+ [CreateSecurityGroup](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html) – 在 Snowball Edge 上建立安全群組。您最多可以建立 50 個安全群組。建立安全群組時，您可以指定您所選易記名稱。
+ [DeleteLaunchTemplate](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteLaunchTemplate.html)
+ [DeleteLaunchTemplateVersions](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteLaunchTemplateVersions.html)
+ [DeleteSecurityGroup](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteSecurityGroup.html) – 刪除安全群組。如果您嘗試刪除的安全群組與執行個體相關聯，或其為另一個安全群組所參考的對象，則該操作會失敗並傳回 `DependencyViolation`。
+ [DeleteTags](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteTags.html) – 從指定的資源集刪除指定的標籤集。
+  [DeleteVolume](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteVolume.html) – 支援下列請求參數：
  + `VolumeId`
+ [DescribeAddresses](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAddresses.html)
+ [DescribeImages](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html)
+ [DescribeInstanceAttribute ](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstanceAttribute.html) - 支援下列屬性：
  + `instanceType`
  + `userData`
+ <a name="API_describe-instance-status"></a>[DescribeInstanceStatus](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstanceStatus.html)
+ [DescribeLaunchTemplates](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeLaunchTemplates.html)
+ [DeleteLaunchTemplateVersions](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeLaunchTemplateVersions.html)
+ [DescribeInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html)
+ [DescribeSecurityGroups](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html) – 描述一或多個安全群組。 `DescribeSecurityGroups` 是一種分頁操作。您可以發出多個 API 呼叫來擷取整個結果資料集。
+ [DescribeTags](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeTags.html) – 使用此命令，下列篩選會受到支援：
  + `resource-id`
  + `resource-type` – 僅限 AMI 或運算執行個體
  + `key`
  + `value`
+  [DescribeVolume](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVolumes.html) – 支援下列請求參數：
  + `MaxResults`
  + `NextToken`
  + `VolumeId.N`
+  [DetachVolume](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DetachVolumes.html) – 支援下列請求參數：
  + `Device`
  + `InstanceId`
  + `VolumeId`
+ [DisassociateAddress](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisassociateAddress.html)
+ [GetLaunchTemplateData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetLaunchTemplateData.html)
+ [ModifyLaunchTemplate](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyLaunchTemplate.html)
+ [ModifyInstanceAttribute](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html) – 僅支援 `userData` 屬性。
+ [RevokeSecurityGroupEgress](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RevokeSecurityGroupEgress.html) – 從安全群組移除一或多個輸出規則。
+ [RevokeSecurityGroupIngress](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RevokeSecurityGroupIngress.html) – 將一或多個輸入規則撤銷至安全群組。呼叫 RevokeSecurityGroupIngress 時，您必須指定 `group-name` 或 `group-id` 的值。
+ [RunInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html) –
**注意**  
根據執行個體的大小和類型，在 Snowball Edge 上啟動運算執行個體最多可能需要一小時半的時間。
+ [StartInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_StartInstances.html)
+ [StopInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_StopInstances.html) – 與已停止執行個體相關聯的資源會持續存在。您可以終止執行個體來釋放這些資源。不過，任何相關資料會遭到刪除。
+ [TerminateInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_TerminateInstances.html)