Bird
0
0

Given this command:

medium📝 Predict Output Q4 of 15
GCP - Cloud IAM Advanced
Given this command:
gcloud iam roles create customViewer --project=my-project --title="Custom Viewer" --permissions=storage.objects.get,storage.objects.list

What will be the effect of this command?
ADeletes the existing 'customViewer' role and creates a new one.
BFails because permissions must be specified in a file.
CCreates a predefined role with all storage permissions.
DCreates a custom role named 'customViewer' with permissions to get and list storage objects.
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the gcloud command syntax

    The command uses 'gcloud iam roles create' with project, title, and permissions flags correctly.
  2. Step 2: Understand the command effect

    This creates a new custom role named 'customViewer' with specified permissions to get and list storage objects.
  3. Final Answer:

    Creates a custom role named 'customViewer' with permissions to get and list storage objects. -> Option D
  4. Quick Check:

    Command creates custom role with specified permissions [OK]
Quick Trick: Use 'gcloud iam roles create' with --permissions list [OK]
Common Mistakes:
  • Thinking it deletes roles
  • Confusing custom with predefined roles
  • Believing permissions must come from a file

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes