如何通过命令行从 Azure 密钥保管库获取超过前 25 个机密?

How to get more than the first 25 secrets from an Azure key vault via command line?

我正在使用 az keyvault secret list 从我的 Azure 密钥保管库中获取机密。它的帮助说:

Arguments
    --maxresults                    : Maximum number of results to return in a page. If not
                                      specified, the service will return up to 25 results.

无法将 --maxresults 设置为高于 25。帮助说明 "in a page",但我找不到关于如何获取的任何解释下一页

是否可以使用此工具列出前 25 个以上的秘密?

我们不能使用 CLI 命令中的 --maxresults 获得超过 25 个秘密列表。

请找到以下解决方法:

如果我们指定 --maxresults 多于 25 cli returns 下面的结果。

Az keyvault secret list --vault-name <your keyvault name> --maxresults 30

如果你想获取特定key vault中的所有秘密你必须使用下面的命令而不使用--maxresults.

Az keyvault secret list --vault-name <your keyvault name>

或者 如果你想让它以编程方式实现,需要用 REST API 或直接使用某些语言库编写脚本。参考 here