When working with gcloud CLI, sometimes there are strong needs to filter and format the output for subsequent processing.
A use case for example here:
1 | gcloud compute instances \ |
They are all from gcloud topic group, from the leftside panel there are other gcloud command reference.
Resource Available Key
To find the keys
for filter and format, check --format flattened
option, it will list all keys
for the specified resource.
Filter Syntax
https://cloud.google.com/sdk/gcloud/reference/topic/filters
Format Syntax
https://cloud.google.com/sdk/gcloud/reference/topic/formats
Projection Syntax:
https://cloud.google.com/sdk/gcloud/reference/topic/projections