Courseiva

Google ACE Configuring Access and Security Practice Question

An engineer wants to view the current IAM policy for a project in JSON format. Which command should they use?

⚠ Common exam trap

The trap is confusing project metadata retrieval (describe) with IAM policy retrieval (get-iam-policy), or assuming a generic 'iam policies get' command exists — ACE tests precise command syntax and resource scope.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

gcloud projects get-iam-policy my-project --format json

The command 'gcloud projects get-iam-policy my-project --format json' retrieves the IAM policy bound to a project and outputs it in JSON. This is the correct gcloud command for viewing a project's IAM policy, which lists bindings between members and roles. The --format json flag ensures machine-readable JSON output.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    gcloud resource-manager folders get-iam-policy my-project --format json

    Why it's wrong here

    This command is for folders, not projects. The gcloud resource-manager folders get-iam-policy subcommand expects a folder ID like '123456789012', not a project ID; passing 'my-project' would fail because folders and projects have separate namespaces. Therefore, although it uses the correct --format json flag, it targets the wrong IAM resource type and cannot return the project's policy.

  • ✗

    gcloud projects describe my-project --format json

    Why it's wrong here

    The gcloud projects describe command returns project metadata, including display name, labels, lifecycle state, and parent resource, but it does not include IAM policy bindings. IAM policies are retrieved using the dedicated get-iam-policy subcommand, which is absent here. Thus this command fails to answer the engineer's need to view the current IAM policy.

  • ✓

    gcloud projects get-iam-policy my-project --format json

    Why this is correct

    This is the exact, valid CLI command for retrieving a project's IAM policy. The subcommand get-iam-policy reads the IAM policy bound to the specified project resource, and --format json renders it as a JSON array of bindings, including roles, members, and conditions. It is the correct tool for this task.

  • ✗

    gcloud iam policies get my-project --format json

    Why it's wrong here

    The gcloud CLI does not have a top-level 'gcloud iam policies get' command; the available gcloud iam groups include roles, service-accounts, keys, and other resources but not a generic 'policies' group. To retrieve IAM policies, you must use the resource-specific command, such as gcloud projects get-iam-policy or gcloud folders get-iam-policy. Therefore this command is nonexistent and would return an error.

About these practice questions

Courseiva writes every ACE question from scratch — 775 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Google Cloud exam blueprint

This ACE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ACE exam.