← IAM417 / 640
hardgcloud

Disable a custom IAM role so it cannot be granted to new members

command

gcloud iam roles disable ROLE_ID --project PROJECT_ID

also accepted

gcloud iam roles disable

Command breakdown

Part of the Google Cloud CLI (gcloud) — IAM category.

gcloudiamrolesdisableROLE_ID--projectPROJECT_ID
FlagPurpose
--projectBoolean flag

Test your recall — not just your reading.

Practice with interactive quiz →