You must quickly list every principal that currently has the Owner role on the production project whose ID is my-prod. Which gcloud command meets this requirement without returning any additional metadata or roles?
projects get-iam-policy is the only gcloud command that retrieves the IAM policy attached to a project.
The --filter flag is applied to the list that the command returns; filtering on bindings.role=roles/owner narrows the output to just that role.
The --flatten flag breaks the repeated field bindings[].members into simple rows so individual members can be filtered or displayed.
Finally, --format="table(bindings.members)" prints only the member strings, omitting the rest of the policy JSON. The other commands either query a different API, use unsupported flags, or filter on non-existent fields, so they will not produce the requested list.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the 'projects get-iam-policy' command do?
Open an interactive chat with Bash
Why is the '--flatten' flag needed in the command?
Open an interactive chat with Bash
What is the role of '--format' in this command?
Open an interactive chat with Bash
Why is the 'projects get-iam-policy' command used?
Open an interactive chat with Bash
What is the purpose of the '--flatten' flag in GCP commands?
Open an interactive chat with Bash
What does '--filter="bindings.role=roles/owner"' do in this command?
Open an interactive chat with Bash
GCP Associate Cloud Engineer
Configuring access and security
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .