You must grant three users permission to view and modify table data in a Cloud Spanner instance. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Run gcloud iam roles describe roles/spanner.databaseUser, create a group with the users, and grant the group the role..
Why this is the answer
The roles/spanner.databaseUser role provides permissions to read and write data within a Cloud Spanner database, which aligns with the requirement to view and modify table data. Creating a Google Group for the users and then granting the role to the group is a best practice for managing permissions. This simplifies administration, as you can add or remove users from the group without modifying the IAM policy directly. The roles/spanner.viewer role only grants read-only access, not the ability to modify data, making options involving it incorrect. While directly adding users to a role is technically possible, using groups is preferred for scalability and easier management, especially with multiple users. The gcloud iam roles describe command is used to view role details, not to assign roles.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed