
Explanation:
The correct approach is to use gcloud commands for each service with the --filter flag. This allows server-side filtering, which is efficient as it reduces data transfer. Each service (Bigtable, Memorystore, Cloud SQL) has its own gcloud commands (instances list for Bigtable and Memorystore, databases list for Cloud SQL). By applying the user-provided filter directly via --filter in each command, the results are pre-filtered before combining, ensuring consistency with Google Cloud best practices for efficiency. While the Cloud SQL databases list command typically requires specifying an instance, the question assumes the provided commands are valid, making option D the best choice.
Ultimate access to all questions.
How can you create a script to list Cloud Bigtable instances, Memorystore resources, and Cloud SQL databases within a Google Cloud project, while allowing users to filter results with a custom expression? What is the recommended approach for retrieving this data?
A
Use the HBase API, Redis API, and MySQL connection to retrieve database lists. Combine the results, and then apply the filter to display the results
B
Use the HBase API, Redis API, and MySQL connection to retrieve database lists. Filter the results individually, and then combine them to display the results
C
Run gcloud bigtable instances list, gcloud redis instances list, and gcloud sql databases list. Use a filter within the application, and then display the results
D
Run gcloud bigtable instances list, gcloud redis instances list, and gcloud sql databases list. Use --filter flag with each command, and then display the results
No comments yet.