File: //snap/google-cloud-cli/396/help/man/man1/gcloud_alpha_organizations_set-iam-policy.1
.TH "GCLOUD_ALPHA_ORGANIZATIONS_SET\-IAM\-POLICY" 1
.SH "NAME"
.HP
gcloud alpha organizations set\-iam\-policy \- set IAM policy for an organization
.SH "SYNOPSIS"
.HP
\f5gcloud alpha organizations set\-iam\-policy\fR \fIORGANIZATION_ID\fR \fIPOLICY_FILE\fR [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
\fB(ALPHA)\fR Given an organization ID and a file encoded in JSON or YAML that
contains the IAM policy, this command will set the IAM policy for that
organization.
.SH "EXAMPLES"
The following command reads an IAM policy defined in a JSON file
\f5policy.json\fR and sets it for an organization with the ID \f5123456789\fR:
.RS 2m
$ gcloud alpha organizations set\-iam\-policy 123456789 policy.json
.RE
The following command reads an IAM policy defined in a JSON file
\f5policy.json\fR and sets it for the organization associated with the domain
\f5example.com\fR:
.RS 2m
$ gcloud alpha organizations set\-iam\-policy example.com policy.json
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
\fIORGANIZATION_ID\fR
ID or domain for the organization whose IAM policy you want to set.
.TP 2m
\fIPOLICY_FILE\fR
JSON or YAML file containing the IAM policy.
.RE
.sp
.SH "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 \fB$ gcloud help\fR for details.
.SH "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 access
allowlist. These variants are also available:
.RS 2m
$ gcloud organizations set\-iam\-policy
.RE
.RS 2m
$ gcloud beta organizations set\-iam\-policy
.RE