This page lists the Identity and Access Management (IAM) predefined roles and permissions for AlloyDB for PostgreSQL. For a complete list of IAM roles and permissions for AlloyDB, see AlloyDB for PostgreSQL roles and permissions.
To assign these roles and permissions to an IAM principal, complete the following prerequisites:
-
The Cloud Resource Manager API must be enabled in the Google Cloud project.
- You must have the Owner (
roles/owner) basic IAM role in the Google Cloud project, or a role that grants these permissions:resourcemanager.projects.getresourcemanager.projects.getIamPolicyresourcemanager.projects.setIamPolicy
To gain these permissions while following the principle of least privilege, ask your administrator to grant you the Project IAM Admin (
roles/resourcemanager.projectIamAdmin) role.
Predefined AlloyDB IAM roles
The following table lists the predefined roles available for AlloyDB, along with their AlloyDB permissions:
| Predefined role name | Description AlloyDB permissions |
|---|---|
roles/alloydb.adminAlloyDB Admin |
Full control for all AlloyDB resources. alloydb. |
roles/alloydb.editorAlloyDB Editor |
Read-write access to AlloyDB resources, without permission to manage tag bindings or Backup and DR Service backup plans. alloydb.backups.createalloydb.backups.deletealloydb.backups.getalloydb.backups.listalloydb.backups.listEffectiveTagsalloydb.backups.listTagBindingsalloydb.backups.updatealloydb.clusters.createalloydb.clusters.deletealloydb.clusters.exportalloydb.clusters.generateClientCertificatealloydb.clusters.getalloydb.clusters.importalloydb.clusters.listalloydb.clusters.listEffectiveTagsalloydb.clusters.listTagBindingsalloydb.clusters.promotealloydb.clusters.switchoveralloydb.clusters.updatealloydb.clusters.upgradealloydb.databases.alloydb.instances.alloydb.locations.alloydb.operations.alloydb.supportedDatabaseFlags.alloydb.users. |
roles/alloydb.clientAlloyDB Client |
Connectivity access to AlloyDB instances for principals running the AlloyDB Auth Proxy or AlloyDB Language Connectors. alloydb.clusters.generateClientCertificatealloydb.clusters.getalloydb.instances.connectalloydb.instances.get |
roles/alloydb.databaseUserAlloyDB Database User |
IAM-based database user login access to AlloyDB instances and query execution access in AlloyDB Studio. alloydb.clusters.getalloydb.instances.executeSqlalloydb.instances.executeSqlReadOnlyalloydb.instances.getalloydb.users.login |
roles/alloydb.viewerAlloyDB Viewer |
Read-only access to all AlloyDB resources. alloydb.backups.getalloydb.backups.listalloydb.backups.listEffectiveTagsalloydb.backups.listTagBindingsalloydb.clusters.exportalloydb.clusters.getalloydb.clusters.listalloydb.clusters.listEffectiveTagsalloydb.clusters.listTagBindingsalloydb.databases.getalloydb.databases.listalloydb.instances.executeSqlReadOnlyalloydb.instances.getalloydb.instances.listalloydb.locations.alloydb.operations.getalloydb.operations.listalloydb.supportedDatabaseFlags.*alloydb.users.getalloydb.users.list |
roles/alloydb.backupDrAdminAlloyDB Admin for BackupDR |
Access to manage AlloyDB cluster backups and restores using Backup and DR. alloydb.clusters.createalloydb.clusters.getalloydb.clusters.listalloydb.instances.createalloydb.instances.getalloydb.instances.listalloydb.operations.get |
Required permissions for common tasks
The following table lists the key IAM permissions and predefined roles required for common AlloyDB connection, authentication, and administration tasks:
| Task | Required AlloyDB permissions | Predefined roles that include these permissions |
|---|---|---|
| Connect through the AlloyDB Auth Proxy or AlloyDB Language Connectors (required for the principal running the proxy or connector) | alloydb.clusters.generateClientCertificatealloydb.clusters.getalloydb.instances.connectalloydb.instances.get |
AlloyDB Client (roles/alloydb.client)AlloyDB Editor ( roles/alloydb.editor)AlloyDB Admin ( roles/alloydb.admin) |
Authenticate as an IAM-based database user
(IAM_BASED or IAM_GROUP) |
alloydb.instances.getalloydb.users.login |
AlloyDB Database User (roles/alloydb.databaseUser)AlloyDB Editor ( roles/alloydb.editor)AlloyDB Admin ( roles/alloydb.admin) |
| Run SQL queries in AlloyDB Studio | alloydb.clusters.getalloydb.instances.executeSqlalloydb.instances.executeSqlReadOnlyalloydb.instances.get |
AlloyDB Database User (roles/alloydb.databaseUser)AlloyDB Editor ( roles/alloydb.editor)AlloyDB Admin ( roles/alloydb.admin) |
| Create, update, or delete clusters and instances | alloydb.clusters.createalloydb.clusters.updatealloydb.clusters.deletealloydb.instances.createalloydb.instances.updatealloydb.instances.deletealloydb.operations.get |
AlloyDB Editor (roles/alloydb.editor)AlloyDB Admin ( roles/alloydb.admin) |
| Create, view, or delete on-demand backups | alloydb.backups.createalloydb.backups.getalloydb.backups.listalloydb.backups.deletealloydb.operations.get |
AlloyDB Editor (roles/alloydb.editor)AlloyDB Admin ( roles/alloydb.admin) |
| Import or export data between AlloyDB and Cloud Storage | alloydb.clusters.importalloydb.clusters.exportalloydb.operations.get |
AlloyDB Editor (roles/alloydb.editor)AlloyDB Admin ( roles/alloydb.admin) |
AlloyDB IAM permissions and their roles
The following table lists each permission that AlloyDB supports and the predefined AlloyDB roles that include it.
| Permission | AlloyDB roles |
|---|---|
alloydb.backups.create |
AlloyDB Admin AlloyDB Editor |
alloydb.backups.createTagBinding |
AlloyDB Admin |
alloydb.backups.delete |
AlloyDB Admin AlloyDB Editor |
alloydb.backups.deleteTagBinding |
AlloyDB Admin |
alloydb.backups.get |
AlloyDB Admin AlloyDB Editor AlloyDB Viewer |
alloydb.backups.list |
AlloyDB Admin AlloyDB Editor AlloyDB Viewer |
alloydb.backups.listEffectiveTags |
AlloyDB Admin AlloyDB Editor AlloyDB Viewer |
alloydb.backups.listTagBindings |
AlloyDB Admin AlloyDB Editor AlloyDB Viewer |
alloydb.backups.update |
AlloyDB Admin AlloyDB Editor |
alloydb.clusters.create |
AlloyDB Admin AlloyDB Admin for BackupDR AlloyDB Editor |
alloydb.clusters.createTagBinding |
AlloyDB Admin |
alloydb.clusters.delete |
AlloyDB Admin AlloyDB Editor |
alloydb.clusters.deleteTagBinding |
AlloyDB Admin |
alloydb.clusters.export |
AlloyDB Admin AlloyDB Editor AlloyDB Viewer |
alloydb.clusters.generateClientCertificate |
AlloyDB Admin AlloyDB Client AlloyDB Editor |
alloydb.clusters.get |
AlloyDB Admin AlloyDB Admin for BackupDR AlloyDB Client AlloyDB Database User AlloyDB Editor AlloyDB Viewer |
alloydb.clusters.import |
AlloyDB Admin AlloyDB Editor |
alloydb.clusters.list |
AlloyDB Admin AlloyDB Admin for BackupDR AlloyDB Editor AlloyDB Viewer |
alloydb.clusters.listEffectiveTags |
AlloyDB Admin AlloyDB Editor AlloyDB Viewer |
alloydb.clusters.listTagBindings |
AlloyDB Admin AlloyDB Editor AlloyDB Viewer |
alloydb.clusters.promote |
AlloyDB Admin AlloyDB Editor |
alloydb.clusters.switchover |
AlloyDB Admin AlloyDB Editor |
alloydb.clusters.update |
AlloyDB Admin AlloyDB Editor |
alloydb.clusters.upgrade |
AlloyDB Admin AlloyDB Editor |
alloydb.databases.create |
AlloyDB Admin AlloyDB Editor |
alloydb.databases.get |
AlloyDB Admin AlloyDB Editor AlloyDB Viewer |
alloydb.databases.list |
AlloyDB Admin AlloyDB Editor AlloyDB Viewer |
alloydb.instances.connect |
AlloyDB Admin AlloyDB Client AlloyDB Editor |
alloydb.instances.create |
AlloyDB Admin AlloyDB Admin for BackupDR AlloyDB Editor |
alloydb.instances.delete |
AlloyDB Admin AlloyDB Editor |
alloydb.instances.executeSql |
AlloyDB Admin AlloyDB Database User AlloyDB Editor |
alloydb.instances.executeSqlReadOnly |
AlloyDB Admin AlloyDB Database User AlloyDB Editor AlloyDB Viewer |
alloydb.instances.failover |
AlloyDB Admin AlloyDB Editor |
alloydb.instances.get |
AlloyDB Admin AlloyDB Admin for BackupDR AlloyDB Client AlloyDB Database User AlloyDB Editor AlloyDB Viewer |
alloydb.instances.injectFault |
AlloyDB Admin AlloyDB Editor |
alloydb.instances.list |
AlloyDB Admin AlloyDB Admin for BackupDR AlloyDB Editor AlloyDB Viewer |
alloydb.instances.restart |
AlloyDB Admin AlloyDB Editor |
alloydb.instances.update |
AlloyDB Admin AlloyDB Editor |
alloydb.locations.get |
AlloyDB Admin AlloyDB Editor AlloyDB Viewer |
alloydb.locations.list |
AlloyDB Admin AlloyDB Editor AlloyDB Viewer |
alloydb.operations.cancel |
AlloyDB Admin AlloyDB Editor |
alloydb.operations.delete |
AlloyDB Admin AlloyDB Editor |
alloydb.operations.get |
AlloyDB Admin AlloyDB Admin for BackupDR AlloyDB Editor AlloyDB Viewer |
alloydb.operations.list |
AlloyDB Admin AlloyDB Editor AlloyDB Viewer |
alloydb.supportedDatabaseFlags.get |
AlloyDB Admin AlloyDB Editor AlloyDB Viewer |
alloydb.supportedDatabaseFlags.list |
AlloyDB Admin AlloyDB Editor AlloyDB Viewer |
alloydb.users.create |
AlloyDB Admin AlloyDB Editor |
alloydb.users.delete |
AlloyDB Admin AlloyDB Editor |
alloydb.users.get |
AlloyDB Admin AlloyDB Editor AlloyDB Viewer |
alloydb.users.list |
AlloyDB Admin AlloyDB Editor AlloyDB Viewer |
alloydb.users.login |
AlloyDB Admin AlloyDB Database User AlloyDB Editor |
alloydb.users.update |
AlloyDB Admin AlloyDB Editor |