File: //snap/google-cloud-cli/394/help/man/man1/gcloud_storage_buckets_set-iam-policy.1
.TH "GCLOUD_STORAGE_BUCKETS_SET\-IAM\-POLICY" 1
.SH "NAME"
.HP
gcloud storage buckets set\-iam\-policy \- set the IAM policy for a bucket
.SH "SYNOPSIS"
.HP
\f5gcloud storage buckets set\-iam\-policy\fR \fIURLS\fR [\fIURLS\fR\ ...] \fIPOLICY_FILE\fR [\fB\-\-continue\-on\-error\fR,\ \fB\-c\fR] [\fB\-\-etag\fR=\fIETAG\fR,\ \fB\-e\fR\ \fIETAG\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
Set the IAM policy for a bucket. For more information, see Cloud Identity and
Access Management (https://cloud.google.com/storage/docs/access\-control/iam).
.SH "EXAMPLES"
To set the IAM policy in POLICY\-FILE on BUCKET:
.RS 2m
$ gcloud storage buckets set\-iam\-policy gs://BUCKET POLICY\-FILE
.RE
To set the IAM policy in POLICY\-FILE on all buckets beginning with "b":
.RS 2m
$ gcloud storage buckets set\-iam\-policy gs://b* POLICY\-FILE
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
\fIURLS\fR [\fIURLS\fR ...]
URLs for buckets to apply the IAM policy to. Can include wildcards.
.TP 2m
\fIPOLICY_FILE\fR
Path to a local JSON or YAML formatted file containing a valid policy.
The output of the \f5get\-iam\-policy\fR command is a valid file, as is any JSON
or YAML file conforming to the structure of a Policy
(https://cloud.google.com/iam/reference/rest/v1/Policy).
.RE
.sp
.SH "FLAGS"
.RS 2m
.TP 2m
\fB\-\-continue\-on\-error\fR, \fB\-c\fR
If any operations are unsuccessful, the command will exit with a non\-zero exit
status after completing the remaining operations. This flag takes effect only in
sequential execution mode (i.e. processor and thread count are set to 1).
Parallelism is default.
.TP 2m
\fB\-\-etag\fR=\fIETAG\fR, \fB\-e\fR \fIETAG\fR
Custom etag to set on IAM policy. API will reject etags that do not match this
value, making it useful as a precondition during concurrent operations.
.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 variant is also available:
.RS 2m
$ gcloud alpha storage buckets set\-iam\-policy
.RE