Is there an Azure CLI Command which can list the agent pools and the jobs run in them ?
Is there an Azure CLI Command which can list the agent pools and the jobs run in them ?
To list the agent pools, you could use az pipelines pool list.
az pipelines pool list [--action {manage, none, use}]
[--detect {false, true}]
[--org]
[--pool-name]
[--pool-type {automation, deployment}]
[--query-examples]
[--subscription]
To list the jobs run in them, there is no built-in CLI command, the workaround is to call the REST API GET https://dev.azure.com/{organiztion}/_apis/distributedtask/pools/{poolId}/jobrequests?api-version=6.0 directly, e.g. via CURL, Powershell.
CURL sample:
curl -u :<PAT> https://dev.azure.com/{organiztion}/_apis/distributedtask/pools/{poolId}/jobrequests?api-version=6.0