

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

# 列出主機
<a name="connections-host-list"></a>

您可以使用開發人員工具主控台或 AWS Command Line Interface (AWS CLI) 中的 **list-connections** 命令來檢視帳戶中的連線清單。

## 列出主機 (主控台)
<a name="connections-host-list-console"></a>

**列出主機**

1. 開啟位於 [https://console.aws.amazon.com/codesuite/settings/connections](https://console.aws.amazon.com/codesuite/settings/connections) 的開發人員工具主控台。

1. 選擇 **Hosts (主機)** 索引標籤。檢視主機的名稱、狀態和 ARN。

## 列出主機 (CLI)
<a name="connections-host-list-cli"></a>

您可以使用 AWS CLI 來列出主機，以進行已安裝的第三方供應商連線。

若要這麼做，請使用 **list-hosts** 命令。

**列出主機**
+ 開啟終端機 (Linux、macOS 或 Unix) 或命令提示字元 (Windows)，然後使用 AWS CLI 執行**list-hosts**命令。

  ```
  aws codeconnections list-hosts
  ```

  此命令會傳回下列輸出。

  ```
  {
      "Hosts": [
          {
              "Name": "My-Host",
              "HostArn": "arn:aws:codeconnections:us-west-2:account_id:host/My-Host-28aef605",
              "ProviderType": "GitHubEnterpriseServer",
              "ProviderEndpoint": "https://my-instance.test.dev",
              "Status": "AVAILABLE"
          }
      ]
  }
  ```