共用方式為


az spring component

備註

此參考是 Azure CLI 的 spring 延伸模組的一部分(2.56.0 版或更高版本)。 擴充功能會在您第一次執行 az spring component 命令時自動安裝 深入瞭解擴充功能

此命令群組已隱含取代,因為命令群組 'spring' 已被取代,並將在未來版本中移除。

(僅限企業層)用來處理Managed元件的命令。

命令

名稱 Description 類型 狀態
az spring component instance

(僅限企業層)用來處理受控元件的實例的命令。

擴充套件 Deprecated
az spring component instance list

(僅限企業層)列出 Azure Spring Apps 實例中特定受控元件的所有可用實例。

擴充套件 Deprecated
az spring component list

(僅限企業層)列出受控元件。

擴充套件 Deprecated
az spring component logs

(僅限企業層)顯示受控元件的記錄。 設定 '-f/--follow' 時,將會串流記錄。 目前,僅支援 (a) 應用程式組態服務 (b) Spring Cloud Gateway (c) Spring Cloud Config Server 的子元件。

擴充套件 Deprecated

az spring component list

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

(僅限企業層)列出受控元件。

az spring component list --resource-group
                         --service

範例

列出所有受控元件

az spring component list --service MyAzureSpringAppsInstance --resource-group MyResourceGroup

必要參數

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring component logs

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

(僅限企業層)顯示受控元件的記錄。 設定 '-f/--follow' 時,將會串流記錄。 目前,僅支援 (a) 應用程式組態服務 (b) Spring Cloud Gateway (c) Spring Cloud Config Server 的子元件。

az spring component logs --resource-group
                         --service
                         [--all-instances]
                         [--follow]
                         [--instance]
                         [--limit]
                         [--lines]
                         [--max-log-requests]
                         [--name]
                         [--since]

範例

在應用程式群組態 Serice 中顯示所有 flux 實體的紀錄 (Gen2)

az spring component logs --name flux-source-controller --service MyAzureSpringAppsInstance --resource-group MyResourceGroup --all-instances

在應用程式組態 Serice 中顯示應用程式組態服務特定實例的記錄

az spring component logs --name application-configuration-service --service MyAzureSpringAppsInstance --resource-group MyResourceGroup --instance InstanceName

針對 spring-cloud-gateway 的所有實例串流和監看記錄

az spring component logs --name spring-cloud-gateway --service MyAzureSpringAppsInstance --resource-group MyResourceGroup --all-instances --follow

顯示特定實例的記錄,而不指定元件名稱

az spring component logs --service MyAzureSpringAppsInstance --resource-group MyResourceGroup --instance InstanceName

必要參數

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--all-instances

指出元件所有實例之取得記錄的旗標。

--follow -f

要指出記錄的旗標應該進行串流處理。

--instance -i

元件現有實例的名稱。

--limit

要傳回的記錄最大 kibibyte。 上限號碼為 2048。

屬性
預設值: 2048
--lines

要顯示的行數。 最大值為 10000。

屬性
預設值: 50
--max-log-requests

指定依所有實例取得記錄時所要遵循的並行記錄數目上限。

屬性
預設值: 5
--name -n

元件的名稱。 從命令 az spring component list尋找元件名稱。

--since

只傳回比相對持續時間還新的記錄,例如 5s、2m 或 1h。 最大值為1小時。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False