Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform 传递多个过滤器选项_Google Cloud Platform_Gcloud - Fatal编程技术网

Google cloud platform 传递多个过滤器选项

Google cloud platform 传递多个过滤器选项,google-cloud-platform,gcloud,Google Cloud Platform,Gcloud,我正在尝试根据区域和名称标准列出我的计算磁盘 但是,以下命令: ▶ gcloud compute disks list --filter="zone=europe-west4-a AND name=redash-postgres-data" WARNING: --filter : operator evaluation is changing for consistency across Google APIs. zone=europe-west4-a currently does not m

我正在尝试根据区域和名称标准列出我的计算磁盘

但是,以下命令:

▶ gcloud compute disks list --filter="zone=europe-west4-a AND name=redash-postgres-data"
WARNING: --filter : operator evaluation is changing for consistency across Google APIs.  zone=europe-west4-a currently does not match but will match in the near future.  Run `gcloud topic filters` for details.
Listed 0 items.
a)不会返回任何结果,尽管存在这样一个磁盘

▶ gcloud compute disks list
NAME                                                LOCATION        LOCATION_SCOPE  SIZE_GB  TYPE         STATUS
redash-postgres-data                                us-east4-b      zone            50       pd-standard  READY
gke-redash-test-cluster-redash-pool1-4db01a9f-1986  europe-west4-a  zone            100      pd-standard  READY
gke-redash-test-cluster-redash-pool1-4db01a9f-t34m  europe-west4-a  zone            100      pd-standard  READY
redash-postgres-data                                europe-west4-a  zone            60       pd-standard  READY

b)我们应该如何制定查询,以便根据上述警告进行未来验证?我使用的示例来自于帮助返回,通过运行上述警告消息所建议的
gcloud主题过滤器
EDIT:该Kolban@linked实际上还提到了与简单模式匹配的替代语法,并允许使用短区域名称:

--filter="zone:( us-east4-a )"
因此,您的gcloud命令实际上可以如下所示:

gcloud compute disks list --filter="zone:( us-east4-a) AND name=redash-postgres-data"

当通过
gcloud compute disks description disk\u name
检查磁盘资源时,您会看到,在其他信息旁边,区域被描述为完全限定的URL:

https://www.googleapis.com/compute/v1/projects/PROJECT_NAME/zones/us-east4-a
使用此完整URL筛选
列表
命令将有效:

gcloud compute disks list --filter="zone=https://www.googleapis.com/compute/v1/projects/PROJECT_NAME/zones/us-east4-a AND name=redash-postgres-data"

回答得好。。。但是有点讨厌。。。正如OP所说,如果我们看看这里。。。这里没有提到完整的URL,而是只显示区域名称。