changeset 2482:b6e75fabe00b

gcloud filter syntax
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Tue, 22 Dec 2020 13:45:36 +0200
parents dbe648b5ecf2
children 0b99270832a0
files gcloud.rst
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gcloud.rst	Tue Dec 22 11:28:15 2020 +0200
+++ b/gcloud.rst	Tue Dec 22 13:45:36 2020 +0200
@@ -3,6 +3,24 @@
  Google Cloud
 ==============
 
+gcloud filter syntax
+===
+
+All ``gcloud`` sub-commands ``list`` support ``--filter`` flag to select desired items. Read the
+docs::
+
+  gcloud topic filters
+
+or:
+
+https://cloud.google.com/sdk/gcloud/reference/topic/filters
+  ``gcloud topic filters``
+
+Examples::
+
+  gcloud compute instances list --filter='name~^stage-' --format='get(name)'
+  gcloud scheduler jobs list --filter='name~/stage-' --format='get(name)'
+
 Load balancer
 =============