gcloud beta iam policies create Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud beta iam policies create - create a policy on the given attachment point with the given name
- SYNOPSIS
gcloud beta iam policies createPOLICY_ID--attachment-point=ATTACHMENT_POINT--kind=KIND--policy-file=POLICY_FILE[GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(BETA)Create a policy on the given attachment point with the givenname.- EXAMPLES
- The following command creates the IAM policy defined at the resource project
of kind123and iddenypoliciesfrom the filemy-deny-policy:policy.jsongcloudbetaiampoliciescreatemy-deny-policy--attachment-point=cloudresourcemanager.googleapis.com/projects/123--kind=denypolicies--policy-file=policy.json - POSITIONAL ARGUMENTS
POLICY_ID- Policy ID that is unique for the resource to which the policy is attached.
- REQUIRED FLAGS
--attachment-point=ATTACHMENT_POINT- Resource to which the policy is attached. For valid formats, seehttps://cloud.google.com/iam/help/deny/attachment-point.
--kind=KIND- Policy type. Use
denypoliciesfor deny policies. --policy-file=POLICY_FILE- Path to the file that contains the policy, in JSON or YAML format. For validsyntax, seehttps://cloud.google.com/iam/help/deny/policy-syntax.
- GCLOUD WIDE FLAGS
- These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$gcloud helpfor details. - NOTES
- This command is currently in beta and might change without notice. Thesevariants are also available:
gcloudiampoliciescreategcloudalphaiampoliciescreate
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.