rest - Azure 资源 API 字段可用于 $filters 和 $expand
问题描述
GET https://management.azure.com/subscriptions/{subscriptionId}/resources?$filter={$filter}&$expand={$expand}&$top={$top}&api-version=2018-02-01
我正在使用此 Azure 资源 API 来获取资源列表(逻辑应用程序连接)我需要知道可在 $filter 和 $expand 中使用的字段名称
从这里我得到了几个字段名称,如名称、资源类型、标记名、位置、资源组
但我需要过滤properties.displayname字段。我尝试使用 $expand 和 $filter。它不工作。
使用名称 $filter
https://management.azure.com/subscriptions/{subscriptionId}/resources?api-version=2018-02-01&$filter=(resourceGroup eq {resourcegroupname}) and **name eq {nametofilter}** and (resourcetype eq 'microsoft.web/connections')
不使用带有 $expand 的 displayname $filter
https://management.azure.com/subscriptions/{subscriptionId}/resources?$expand=ResourceProperties&api-version=2018-02-01&$filter=(resourceGroup eq {resourcegroupname}) and **ResourceProperties/displayName eq {nametofilter}** and (resourcetype eq 'microsoft.web/connections')
https://management.azure.com/subscriptions/{subscriptionId}/resources?$expand=Properties&api-version=2018-02-01&$filter=(resourceGroup eq {resourcegroupname}) and **Properties/displayName eq {nametofilter}** and (resourcetype eq 'microsoft.web/connections')
对带有 displayname 字段的 $filter 有什么建议吗?
解决方案
推荐阅读
- cuda - 将单个浮点值更新到 GPU 以在 CUDA 内核中访问它的最快方法是什么?
- python - 稍后使用 pack 时 grid_forget() 仍然会导致错误
- listview - 如何从 Flutter 中的 Rest API 生成动态扩展磁贴列表?
- angular - 为什么实体不接受我的界面?
- java - JAVAFX:在控制器之间传递数据
- javascript - 使用 Reactjs 作为表单的优点?
- python - 有没有办法在不复制粘贴的情况下重新排列excel数据?
- javascript - Slack 交互消息获取返回的 response_url 的 invalid_payload
- common-lisp - LTK Scrolled Frame 滚动条未调整大小
- .htaccess - 使用 htaccess 将下载链接从多个子域重定向到另一个