Bird
0
0

Which of the following is the correct JSON structure to define a custom IAM role binding?

easy📝 Syntax Q3 of 15
GCP - Cloud IAM Advanced
Which of the following is the correct JSON structure to define a custom IAM role binding?
A{"bindings": [{"role": "roles/customRole", "members": ["user:alice@example.com"]}]}
B{"roles": [{"binding": "roles/customRole", "users": ["alice@example.com"]}]}
C{"policy": [{"role": "customRole", "members": ["user:alice@example.com"]}]}
D{"bindings": [{"role": "customRole", "members": ["alice@example.com"]}]}
Step-by-Step Solution
Solution:
  1. Step 1: Recall correct IAM policy JSON format

    The correct format uses "bindings" with "role" and "members" keys.
  2. Step 2: Match correct syntax

    {"bindings": [{"role": "roles/customRole", "members": ["user:alice@example.com"]}]} matches the correct structure with proper keys and user format.
  3. Final Answer:

    Correct JSON structure with bindings, role, and members keys. -> Option A
  4. Quick Check:

    IAM JSON format = {"bindings": [{"role": "roles/customRole", "members": ["user:alice@example.com"]}]} [OK]
Quick Trick: IAM JSON uses bindings with role and members keys [OK]
Common Mistakes:
  • Using incorrect keys like 'roles' or 'users'
  • Omitting 'user:' prefix in member strings
  • Misplacing brackets or braces

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes