File: //snap/google-cloud-cli/396/help/man/man1/gcloud_beta_iam_roles_create.1
.TH "GCLOUD_BETA_IAM_ROLES_CREATE" 1
.SH "NAME"
.HP
gcloud beta iam roles create \- create a custom role for a project or an organization
.SH "SYNOPSIS"
.HP
\f5gcloud beta iam roles create\fR \fIROLE_ID\fR (\fB\-\-organization\fR=\fIORGANIZATION\fR\ |\ \fB\-\-project\fR=\fIPROJECT_ID\fR) [\fB\-\-file\fR=\fIFILE\fR\ |\ \fB\-\-description\fR=\fIDESCRIPTION\fR\ \fB\-\-permissions\fR=\fIPERMISSIONS\fR\ \fB\-\-stage\fR=\fISTAGE\fR\ \fB\-\-title\fR=\fITITLE\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
\fB(BETA)\fR This command creates a custom role with the provided information.
.SH "EXAMPLES"
To create a custom role \f5\fIProjectUpdater\fR\fR from a YAML file, run:
.RS 2m
$ gcloud beta iam roles create ProjectUpdater \-\-organization=12345 \e
\-\-file=role_file_path
.RE
To create a custom role \f5\fIProjectUpdater\fR\fR with flags, run:
.RS 2m
$ gcloud beta iam roles create ProjectUpdater \-\-project=myproject \e
\-\-title=ProjectUpdater \e
\-\-description="Have access to get and update the project" \e
\-\-permissions=resourcemanager.projects.get,\e
resourcemanager.projects.update
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
\fIROLE_ID\fR
ID of the custom role to create. You must also specify the
\f5\-\-organization\fR or \f5\-\-project\fR flag.
.RE
.sp
.SH "REQUIRED FLAGS"
.RS 2m
.TP 2m
Exactly one of these must be specified:
.RS 2m
.TP 2m
\fB\-\-organization\fR=\fIORGANIZATION\fR
Organization of the role you want to create.
.TP 2m
\fB\-\-project\fR=\fIPROJECT_ID\fR
Project of the role you want to create.
The Google Cloud project ID to use for this invocation. If omitted, then the
current project is assumed; the current project can be listed using \f5gcloud
config list \-\-format='text(core.project)'\fR and can be set using \f5gcloud
config set project PROJECTID\fR.
\f5\-\-project\fR and its fallback \f5core/project\fR property play two roles in
the invocation. It specifies the project of the resource to operate on. It also
specifies the project for API enablement check, quota, and billing. To specify a
different project for quota and billing, use \f5\-\-billing\-project\fR or
\f5billing/quota_project\fR property.
.RE
.RE
.sp
.SH "OPTIONAL FLAGS"
.RS 2m
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-file\fR=\fIFILE\fR
The JSON or YAML file with the IAM Role to create. See
https://cloud.google.com/iam/reference/rest/v1/projects.roles.
.TP 2m
Roles Settings
.RS 2m
.TP 2m
\fB\-\-description\fR=\fIDESCRIPTION\fR
The description of the role you want to create.
.TP 2m
\fB\-\-permissions\fR=\fIPERMISSIONS\fR
The permissions of the role you want to create. Use commas to separate them.
.TP 2m
\fB\-\-stage\fR=\fISTAGE\fR
The state of the role you want to create. This represents a role's lifecycle
phase: \f5ALPHA\fR, \f5BETA\fR, \f5GA\fR, \f5DEPRECATED\fR, \f5DISABLED\fR,
\f5EAP\fR.
.TP 2m
\fB\-\-title\fR=\fITITLE\fR
The title of the role you want to create.
.RE
.RE
.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 beta and might change without notice. These
variants are also available:
.RS 2m
$ gcloud iam roles create
.RE
.RS 2m
$ gcloud alpha iam roles create
.RE