1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-16 12:22:03 +00:00
gcloud-help/gcloud/alpha/iam/policies/update

66 lines
2.4 KiB
Text
Raw Normal View History

2022-03-01 21:43:54 +00:00
NAME
gcloud alpha iam policies update - update the policy on the given
attachment point with the given name
SYNOPSIS
gcloud alpha iam policies update POLICY_ID
--attachment-point=ATTACHMENT_POINT --kind=KIND
2025-01-08 10:03:00 +00:00
--policy-file=POLICY_FILE [--etag=ETAG] [GCLOUD_WIDE_FLAG ...]
2022-03-01 21:43:54 +00:00
DESCRIPTION
(ALPHA) Update the policy on the given attachment point with the given
name.
EXAMPLES
2025-01-08 10:03:00 +00:00
The following command updates the IAM policy my-deny-policy, which is
attached to the resource project 123 and has the etag abc:
2022-03-01 21:43:54 +00:00
$ gcloud alpha iam policies update my-deny-policy \
--attachment-point=cloudresourcemanager.googleapis.com/\
2025-01-08 10:03:00 +00:00
projects/123 --kind=denypolicies --policy-file=policy.json \
--etag=abc
2022-03-01 21:43:54 +00:00
POSITIONAL ARGUMENTS
POLICY_ID
2022-05-18 08:41:01 +00:00
Policy ID that is unique for the resource to which the policy is
attached.
2022-03-01 21:43:54 +00:00
REQUIRED FLAGS
--attachment-point=ATTACHMENT_POINT
2022-05-18 08:41:01 +00:00
Resource to which the policy is attached. For valid formats, see
https://cloud.google.com/iam/help/deny/attachment-point.
2022-03-01 21:43:54 +00:00
--kind=KIND
2022-05-18 08:41:01 +00:00
Policy type. Use denypolicies for deny policies.
2022-03-01 21:43:54 +00:00
--policy-file=POLICY_FILE
2022-05-18 08:41:01 +00:00
Path to the file that contains the policy, in JSON or YAML format. For
valid syntax, see https://cloud.google.com/iam/help/deny/policy-syntax.
2022-03-01 21:43:54 +00:00
2025-01-08 10:03:00 +00:00
OPTIONAL FLAGS
--etag=ETAG
Etag that identifies the version of the existing policy. It can be
obtained by running gcloud iam policies get. When deleting a policy, if
the etag is omitted, the policy is deleted regardless of its current
etag. When updating a policy, if the etag is omitted, the update uses
the etag provided in the policy file.
2022-03-01 21:43:54 +00:00
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 help for details.
NOTES
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct
project, you might be trying to access an API with an invitation-only early
2022-10-26 10:52:11 +00:00
access allowlist. These variants are also available:
$ gcloud iam policies update
2022-03-01 21:43:54 +00:00
$ gcloud beta iam policies update