Practice Test 2 | Google Cloud Certified Associate Cloud Engineer | Dumps | Mock Test
You have been asked to write a policy is JSON format by your manager. Which one out of below four is the correct way of creating a policy?
A. { “bindings”: {
“roles”: [ “roles/owner” ],
“members”: [ “user:jon@whizlabs.com”,
“group:hr@whizlabs.com” ]
}
}
B. { “bindings”: [ {
“role”: “roles/owner”,
“members”: [ “user:jon@whizlabs.com”,
“group:hr@whizlabs.com” ]
}
]
}
C. { “bindings”: [ {
“roles”: [ “roles/owner” ],
“members”: [ “user:jon@whizlabs.com”,
“group:hr@whizlabs.com” ]
}
]
}
D. { “bindings”: {
“role”: “roles/owner”,
“members”: [ “user:jon@whizlabs.com”,
“group:hr@whizlabs.com” ]
}
}
Explanation:
Answer – B
Option B is the correct way to write a policy for assigning permission.
Options A, C, and D are incorrect because they are invalid policies and have syntax errors.
Link:
https://cloud.google.com/iam/reference/rest/v1/Policy
Comments are closed, but trackbacks and pingbacks are open.