File: //snap/google-cloud-cli/396/help/man/man1/gcloud_iap_web_set-iam-policy.1
.TH "GCLOUD_IAP_WEB_SET\-IAM\-POLICY" 1
.SH "NAME"
.HP
gcloud iap web set\-iam\-policy \- set the IAM policy for an IAP IAM resource
.SH "SYNOPSIS"
.HP
\f5gcloud iap web set\-iam\-policy\fR \fIPOLICY_FILE\fR [\fB\-\-region\fR=\fIREGION\fR\ \fB\-\-resource\-type\fR=\fIRESOURCE_TYPE\fR\ \fB\-\-service\fR=\fISERVICE\fR\ \fB\-\-version\fR=\fIVERSION\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
This command replaces the existing IAM policy for an IAP IAM resource, given a
file encoded in JSON or YAML that contains the IAM policy. If the given policy
file specifies an "etag" value, then the replacement will succeed only if the
policy already in place matches that etag. (An etag obtained via $ gcloud iap
web get\-iam\-policy will prevent the replacement if the policy for the resource
has been subsequently updated.) A policy file that does not contain an etag
value will replace any existing policy for the resource.
.SH "EXAMPLES"
To set the IAM policy for the web accesses to the IAP protected resources within
the active project, run:
.RS 2m
$ gcloud iap web set\-iam\-policy POLICY_FILE
.RE
To set the IAM policy for the web accesses to the IAP protected resources within
a project, run:
.RS 2m
$ gcloud iap web set\-iam\-policy POLICY_FILE \-\-project=PROJECT_ID
.RE
To set the IAM policy for the web accesses to the IAP protected resources within
an App Engine application, run:
.RS 2m
$ gcloud iap web set\-iam\-policy POLICY_FILE \e
\-\-resource\-type=app\-engine
.RE
To set the IAM policy for the web accesses to the IAP protected resources within
an App Engine service, run:
.RS 2m
$ gcloud iap web set\-iam\-policy POLICY_FILE \e
\-\-resource\-type=app\-engine \-\-service=SERVICE_ID
.RE
To set the IAM policy for the web accesses to the IAP protected resources within
an App Engine service version, run:
.RS 2m
$ gcloud iap web set\-iam\-policy POLICY_FILE \e
\-\-resource\-type=app\-engine \-\-service=SERVICE_ID \e
\-\-version=VERSION
.RE
To set the IAM policy for the web accesses to the IAP protected resources within
all backend services, run:
.RS 2m
$ gcloud iap web set\-iam\-policy POLICY_FILE \e
\-\-resource\-type=backend\-services
.RE
To set the IAM policy for the web accesses to the IAP protected resources within
a backend service, run:
.RS 2m
$ gcloud iap web set\-iam\-policy POLICY_FILE \e
\-\-resource\-type=backend\-services \-\-service=SERVICE_ID
.RE
To set the IAM policy for the web accesses to the IAP protected resources within
a regional backend service, run:
.RS 2m
$ gcloud iap web set\-iam\-policy POLICY_FILE \e
\-\-resource\-type=backend\-services \-\-service=SERVICE_ID \e
\-\-region=REGION
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
\fIPOLICY_FILE\fR
JSON or YAML file containing the IAM policy.
.RE
.sp
.SH "FLAGS"
.RS 2m
.TP 2m
\fB\-\-region\fR=\fIREGION\fR
Region name. Should only be specified with
\f5\-\-resource\-type=backend\-services\fR if it is a regional scoped. Not
applicable for global scoped backend services.
.TP 2m
\fB\-\-resource\-type\fR=\fIRESOURCE_TYPE\fR
Resource type of the IAP resource. \fIRESOURCE_TYPE\fR must be one of:
\fBapp\-engine\fR, \fBbackend\-services\fR, \fBforwarding\-rule\fR.
.TP 2m
\fB\-\-service\fR=\fISERVICE\fR
Service name.
.TP 2m
\fB\-\-version\fR=\fIVERSION\fR
Service version. Should only be specified with
\f5\-\-resource\-type=app\-engine\fR.
.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"
These variants are also available:
.RS 2m
$ gcloud alpha iap web set\-iam\-policy
.RE
.RS 2m
$ gcloud beta iap web set\-iam\-policy
.RE