
Answer-first summary for fast verification
Answer: Execute `gcloud compute instances list --filter="zone:( us-central1-b europe-west1-d )"`.
The correct command is `gcloud compute instances list --filter="zone:( us-central1-b europe-west1-d )"`. This command efficiently lists all instances in the specified zones in a single operation, avoiding the need for manual combination of results. The `get` action is not supported by the `gcloud compute instances` command, making options B and C incorrect. Option A, while technically correct, is inefficient as it requires manual combination of results from two separate commands.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
To efficiently list all compute instances in zones us-central1-b and europe-west1-d, which command should you use?
A
Run gcloud compute instances list --filter="zone:( us-central1-b )" and gcloud compute instances list --filter="zone:( europe-west1-d )" separately, then combine the results manually.
B
Use gcloud compute instances get --filter="zone:( us-central1-b )" and gcloud compute instances list --filter="zone:( europe-west1-d )", then combine the results manually.
C
Execute gcloud compute instances get --filter="zone:( us-central1-b europe-west1-d )".
D
Execute gcloud compute instances list --filter="zone:( us-central1-b europe-west1-d )".
No comments yet.