Google Cloud Professional Cloud Developer — Question 150

Your operations team has asked you to create a script that lists the Cloud Bigtable, Memorystore, and Cloud SQL databases running within a project. The script should allow users to submit a filter expression to limit the results presented. How should you retrieve the data?

Answer options

Correct answer: D

Explanation

The correct answer is D because using the --filter flag with each gcloud command allows for effective filtering at the source level, ensuring only relevant results are returned directly from the commands. Options A and B involve merging lists after filtering, which is less efficient and unnecessarily complicates the process. Option C suggests filtering within the application, which does not utilize the filtering capabilities of the gcloud command-line tools.