Bird
0
0

Which of the following is the correct gcloud command syntax to create a custom role named myCustomRole in project my-project with the title "My Role" and permission storage.buckets.list?

easy📝 Configuration Q12 of 15
GCP - Cloud IAM Advanced
Which of the following is the correct gcloud command syntax to create a custom role named myCustomRole in project my-project with the title "My Role" and permission storage.buckets.list?
Agcloud iam roles create myCustomRole --project=my-project --title="My Role" --permissions=storage.buckets.list --stage=GA
Bgcloud iam create role myCustomRole --project my-project --title My Role --permissions storage.buckets.list
Cgcloud roles create myCustomRole --project=my-project --title="My Role" --permissions=storage.buckets.list
Dgcloud iam roles add myCustomRole --project=my-project --title="My Role" --permissions=storage.buckets.list
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct gcloud command structure

    The correct command to create a custom role is gcloud iam roles create with flags for project, title, permissions, and stage.
  2. Step 2: Match syntax with options

    gcloud iam roles create myCustomRole --project=my-project --title="My Role" --permissions=storage.buckets.list --stage=GA matches the correct syntax including --project, --title, --permissions, and --stage flags.
  3. Final Answer:

    gcloud iam roles create myCustomRole --project=my-project --title="My Role" --permissions=storage.buckets.list --stage=GA -> Option A
  4. Quick Check:

    Correct gcloud create syntax = gcloud iam roles create myCustomRole --project=my-project --title="My Role" --permissions=storage.buckets.list --stage=GA [OK]
Quick Trick: Use 'gcloud iam roles create' with all flags [OK]
Common Mistakes:
  • Using 'gcloud iam create role' instead of 'roles create'
  • Missing the --stage flag
  • Incorrect flag order or missing equal signs

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes