共用方式為


az pipelines agent

備註

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

管理代理程式。

命令

名稱 Description 類型 狀態
az pipelines agent list

取得集區中的代理程序清單。

擴充套件 GA
az pipelines agent show

顯示代理程序詳細數據。

擴充套件 GA

az pipelines agent list

取得集區中的代理程序清單。

az pipelines agent list --pool-id
                        [--agent-name]
                        [--demands]
                        [--detect {false, true}]
                        [--include-assigned-request {false, true}]
                        [--include-capabilities {false, true}]
                        [--include-last-completed-request {false, true}]
                        [--org]

必要參數

--pool-id

包含代理程式的代理程式集區。

選擇性參數

--agent-name

篩選代理程式名稱。

--demands

依需求篩選代理程式可以滿足的需求。 逗號分隔清單。

--detect

自動偵測組織。

接受的值: false, true
--include-assigned-request

是否要包含代理程式目前工作的詳細數據。

接受的值: false, true
--include-capabilities

是否要在回應中包含代理程式的功能。

接受的值: false, true
--include-last-completed-request

是否要包含代理程式最近完成工作的詳細數據。

接受的值: false, true
--org --organization

Azure DevOps 組織 URL。 您可以使用 az devops configure -d organization=ORG_URL 來設定預設組織。 如果未設定為預設,或透過 git 組態挑選,則為必要專案。範例:https://dev.azure.com/MyOrganizationName/

全域參數
--debug

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

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

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

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

--subscription

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

--verbose

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

az pipelines agent show

顯示代理程序詳細數據。

az pipelines agent show --agent-id
                        --pool-id
                        [--detect {false, true}]
                        [--include-assigned-request {false, true}]
                        [--include-capabilities {false, true}]
                        [--include-last-completed-request {false, true}]
                        [--org]

必要參數

--agent-id --id

要取得相關信息的代理程式識別碼。

--pool-id

包含代理程式的代理程式集區。

選擇性參數

--detect

自動偵測組織。

接受的值: false, true
--include-assigned-request

是否要包含代理程式目前工作的詳細數據。

接受的值: false, true
--include-capabilities

是否要在回應中包含代理程式的功能。

接受的值: false, true
--include-last-completed-request

是否要包含代理程式最近完成工作的詳細數據。

接受的值: false, true
--org --organization

Azure DevOps 組織 URL。 您可以使用 az devops configure -d organization=ORG_URL 來設定預設組織。 如果未設定為預設,或透過 git 組態挑選,則為必要專案。範例:https://dev.azure.com/MyOrganizationName/

全域參數
--debug

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

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

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

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

--subscription

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

--verbose

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