Google Cloud Professional Cloud Database Engineer — Question 120
Your company's mission-critical, globally available application is supported by a Cloud Spanner database. Experienced users of the application have read and write access to the database, but new users are assigned read-only access to the database. You need to assign the appropriate Cloud Spanner Identity and Access Management (IAM) role to new users being onboarded soon. What roles should you set up?
Answer options
- A. roles/spanner.databaseReader
- B. roles/spanner.databaseUser
- C. roles/spanner.viewer
- D. roles/spanner.backupWriter
Correct answer: A
Explanation
The correct answer is A, roles/spanner.databaseReader, as it specifically grants read access to the database, which aligns with the requirements for new users. The other options either provide broader access than needed (B), are not specifically for database access (C), or relate to backup operations (D), which is irrelevant for read-only access.