小编Jac*_*ssa的帖子

Google Cloud,带有过滤器的 compute.instances.aggregatedList 失败

compute.instances.aggregatedList 的谷歌云 API 包括过滤器参数。 https://cloud.google.com/compute/docs/reference/rest/beta/instances/aggregatedList

我使用 (status eq "RUNNING") 作为过滤器来查看我所有正在运行的实例。

我想要一个更详细的标准,例如使用标签和/或其他术语的标准,但是即使是 Google 文档术语(使用 OR 运算符)也会返回错误,例如 - 即使是 Google 文档示例:(cpuPlatform = "Intel Skylake") 或 (cpuPlatform = "Intel Broadwell") 失败并出现错误 400:

"message": "字段 'filter' 的值无效:' (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\")'。列表过滤器表达式无效。"

看起来好像不接受“=”符号,也不接受 AND/OR 运算符。此 API 的正确格式是什么。

google-api google-cloud-platform google-apis-explorer

5
推荐指数
1
解决办法
2281
查看次数