查看網路設定檔
本頁說明如何在 Google Cloud中查看網路設定檔。
必要的角色
如要取得查看網路設定檔所需的權限,請要求管理員授予您專案的「Compute Network Viewer」 (roles/compute.networkViewer) 身分與存取權管理角色。如要進一步瞭解如何授予角色,請參閱「管理專案、資料夾和機構的存取權」。
這個預先定義的角色具備查看網路設定檔所需的權限。如要查看確切的必要權限,請展開「必要權限」部分:
所需權限
如要查看網路設定檔,必須具備下列權限:
-
compute.networkProfiles.get -
compute.networkProfiles.list
列出網路設定檔
本節說明如何使用 Google Cloud CLI 和 API 列出網路設定檔。每個可用的位置都有特定聯播網設定檔的專屬執行個體。
如果您使用 Google Cloud 控制台,建立 VPC 網路時,可以查看網路設定檔清單 (依位置劃分),做為網路設定檔設定的一部分。詳情請參閱「為 RDMA NIC 建立虛擬私有雲網路」。
gcloud
如要列出 Google Cloud中的所有網路設定檔,請使用 gcloud compute network-profiles list 指令。
gcloud compute network-profiles list
如要列出特定可用區的可用網路設定檔,請使用 location.name 篩選器。
gcloud compute network-profiles list --filter='location.name=ZONE'
將 ZONE 替換為要查看網路設定檔的區域,例如 europe-west1-b。
如要列出特定網路設定檔的所有執行個體,請使用 --filter 旗標。
gcloud compute network-profiles list --filter=NAME
將 NAME 替換為網路設定檔資源名稱的相關部分,例如 roce 或 falcon。
API
如要列出 Google Cloud中的所有網路設定檔,請使用 networkProfiles.list 方法。
GET https://compute.googleapis.com/compute/projects/PROJECT_ID/global/networkProfiles
將 PROJECT_ID 替換為您的專案 ID。
查看網路設定檔詳細資料
本節說明如何使用 Google Cloud CLI 或 API 查看網路設定檔的詳細資料。
如果您使用 Google Cloud 控制台,可以在建立虛擬私有雲網路時,或查看已設定網路設定檔的現有網路時,一併查看網路設定檔詳細資料。
gcloud
如要查看網路設定檔的詳細資料,請使用 gcloud compute network-profiles describe 指令。
gcloud compute network-profiles describe NETWORK_PROFILE
將 NETWORK_PROFILE 替換為網路設定檔名稱。
API
如要查看網路設定檔的詳細資料,請使用 networkProfiles.get 方法。
GET https://compute.googleapis.com/compute/projects/PROJECT_ID/global/networkProfiles/NETWORK_PROFILE
更改下列內容:
PROJECT_ID:您的專案 ID。NETWORK_PROFILE:網路設定檔的名稱。
後續步驟
- 初步瞭解特定用途的網路設定檔。
- 瞭解 RDMA 網路設定檔。
- 為 RDMA NIC 建立 VPC 網路。