File: //snap/google-cloud-cli/394/help/man/man1/gcloud_alpha_iam_roles_copy.1
.TH "GCLOUD_ALPHA_IAM_ROLES_COPY" 1
.SH "NAME"
.HP
gcloud alpha iam roles copy \- create a role from an existing role
.SH "SYNOPSIS"
.HP
\f5gcloud alpha iam roles copy\fR [\fB\-\-dest\-organization\fR=\fIDEST_ORGANIZATION\fR] [\fB\-\-dest\-project\fR=\fIDEST_PROJECT\fR] [\fB\-\-destination\fR=\fIDESTINATION\fR] [\fB\-\-source\fR=\fISOURCE\fR] [\fB\-\-source\-organization\fR=\fISOURCE_ORGANIZATION\fR] [\fB\-\-source\-project\fR=\fISOURCE_PROJECT\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
\fB(ALPHA)\fR This command creates a role from an existing role.
.SH "EXAMPLES"
To create a copy of an existing role \f5\fIspanner.databaseAdmin\fR\fR into an
organization with \f5\fI1234567\fR\fR, run:
.RS 2m
$ gcloud alpha iam roles copy \e
\-\-source="roles/spanner.databaseAdmin" \e
\-\-destination=CustomViewer \-\-dest\-organization=1234567
.RE
To create a copy of an existing role \f5\fIspanner.databaseAdmin\fR\fR into a
project with \f5\fIPROJECT_ID\fR\fR, run:
.RS 2m
$ gcloud alpha iam roles copy \e
\-\-source="roles/spanner.databaseAdmin" \e
\-\-destination=CustomSpannerDbAdmin \-\-dest\-project=PROJECT_ID
.RE
To modify the newly created role see the roles update command.
.SH "FLAGS"
.RS 2m
.TP 2m
\fB\-\-dest\-organization\fR=\fIDEST_ORGANIZATION\fR
The organization of the destination role.
.TP 2m
\fB\-\-dest\-project\fR=\fIDEST_PROJECT\fR
The project of the destination role.
.TP 2m
\fB\-\-destination\fR=\fIDESTINATION\fR
The destination role ID for the new custom role. For example: viewer.
.TP 2m
\fB\-\-source\fR=\fISOURCE\fR
The source role ID. For predefined roles, for example: roles/viewer. For custom
roles, for example: myCompanyAdmin.
.TP 2m
\fB\-\-source\-organization\fR=\fISOURCE_ORGANIZATION\fR
The organization of the source role if it is an custom role.
.TP 2m
\fB\-\-source\-project\fR=\fISOURCE_PROJECT\fR
The project of the source role if it is an custom role.
.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 iam roles copy
.RE
.RS 2m
$ gcloud beta iam roles copy
.RE