I was using a random gcloud command today, which happens to have a ton of arguments. I deliberately started it with no arguments, so I could use the error message to figure out which arguments it requires:
ram@turing:/$ gcloud compute backend-services add-backend del-me
ERROR: (gcloud.compute.backend-services.add-backend) Exactly one of ([--instance-group : --instance-group-region | --instance-group-zone] | [--network-endpoint-group : --global-network-endpoint-group | --network-endpoint-group-region | --network-endpoint-group-zone]) must be specified.
Usage: gcloud compute backend-services add-backend BACKEND_SERVICE_NAME ([--instance-group=INSTANCE_GROUP : --instance-group-region=INSTANCE_GROUP_REGION | --instance-group-zone=INSTANCE_GROUP_ZONE] | [--network-endpoint-group=NETWORK_ENDPOINT_GROUP : --global-network-endpoint-group | --network-endpoint-group-region=NETWORK_ENDPOINT_GROUP_REGION | --network-endpoint-group-zone=NETWORK_ENDPOINT_GROUP_ZONE]) [optional flags]
optional flags may be --balancing-mode | --capacity-scaler | --description |
--failover | --global |
--global-network-endpoint-group | --help |
--instance-group | --instance-group-region |
--instance-group-zone | --max-connections |
--max-connections-per-endpoint |
--max-connections-per-instance | --max-rate |
--max-rate-per-endpoint | --max-rate-per-instance |
--max-utilization | --network-endpoint-group |
--network-endpoint-group-region |
--network-endpoint-group-zone | --region
For detailed information on this command and its flags, run:
gcloud compute backend-services add-backend --help
The pertinent error message here is "Exactly one of [Redacted long expression] must be specified." Here's that long expression simplified:
([IGa : IGb | IGc] | [EGa : EGb | EGc | EGd])
This expression is in some kind of language that uses these characters: []:|. I've seen this language before in other CLIs. What is the name of this language, and where can I learn how to read it?