A support engineer needs to confirm which Compute Engine VMs are currently RUNNING in the europe-west1-b zone. They will run the command from Cloud Shell and require JSON output so another script can parse the results. Which gcloud command meets all of these requirements?
gcloud compute instances list --zones=europe-west1-b --status=RUNNING --output=json
The gcloud compute instances list command returns all VM instances in the selected project. Using a filter string lets you narrow the results; the expression status=RUNNING restricts the list to running VMs, while zone:(europe-west1-b) limits the search to that specific zone. Adding --format=json produces machine-readable JSON output. Alternative commands shown either use invalid flags, use describe instead of list, omit the JSON format, or apply the filter incorrectly, so they would fail to meet one or more of the stated requirements.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the role of the --filter flag in the gcloud command?
Open an interactive chat with Bash
Why is --format=json important in the gcloud command?
Open an interactive chat with Bash
Can you explain the difference between the gcloud compute instances list and describe commands?
Open an interactive chat with Bash
What is the role of the --filter flag in gcloud commands?
Open an interactive chat with Bash
Why is the --format=json flag used in this gcloud command?
Open an interactive chat with Bash
Can you explain the difference between gcloud compute instances list and gcloud compute instances describe?
Open an interactive chat with Bash
GCP Associate Cloud Engineer
Ensuring successful operation of a cloud solution
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .