Cloud SQL 权限

Google Cloud 控制台中常见任务所需的权限

如需查看角色及其关联权限的列表,请参阅 Cloud SQL 角色

任务 所需其他权限
显示实例列表页面 cloudsql.instances.list
resourcemanager.projects.get
创建实例 cloudsql.instances.create
cloudsql.instances.get
cloudsql.instances.list
resourcemanager.projects.get
compute.machineTypes.list
compute.machineTypes.get
compute.projects.get roles/compute.viewer
使用 Cloud Shell 连接到实例 cloudsql.instances.get
cloudsql.instances.list
cloudsql.instances.update
resourcemanager.projects.get
创建用户 cloudsql.instances.get
cloudsql.instances.list
cloudsql.users.create
cloudsql.users.list
resourcemanager.projects.get
查看实例信息 cloudsql.databases.list
cloudsql.instances.get
cloudsql.instances.list
cloudsql.users.list
monitoring.timeSeries.list
resourcemanager.projects.get
在 Dataplex Catalog 中查看实例元数据 cloudsql.schemas.view

gcloud sql 命令所需的权限

命令 所需权限
gcloud sql backups create cloudsql.backupRuns.create
gcloud sql backups delete cloudsql.backupRuns.delete
gcloud sql backups describe cloudsql.backupRuns.get
gcloud sql backups list cloudsql.backupRuns.list
gcloud sql backups restore cloudsql.backupRuns.get
cloudsql.instances.restoreBackup
gcloud sql connect cloudsql.instances.get
cloudsql.instances.update
gcloud sql databases create cloudsql.databases.create
gcloud sql databases delete cloudsql.databases.delete
gcloud sql databases describe cloudsql.databases.get
gcloud sql databases list cloudsql.databases.list
gcloud sql databases patch cloudsql.databases.get
cloudsql.databases.update
gcloud sql export cloudsql.instances.export
cloudsql.instances.get
gcloud sql flags list
gcloud sql import cloudsql.instances.import
gcloud sql instances clone cloudsql.instances.clone
gcloud sql instances create cloudsql.instances.create
gcloud sql instances delete cloudsql.instances.delete
gcloud sql instances describe cloudsql.instances.get
gcloud sql instances failover cloudsql.instances.failover
gcloud sql instances import cloudsql.instances.import
gcloud sql instances list cloudsql.instances.list
gcloud sql instances patch cloudsql.instances.get
cloudsql.instances.update
gcloud sql instances promote-replica cloudsql.instances.promoteReplica
gcloud sql instances reset-ssl-config cloudsql.instances.resetSslConfig
gcloud sql instances restart cloudsql.instances.restart
gcloud sql instances restore-backup cloudsql.backupRuns.get
cloudsql.instances.restoreBackup
gcloud sql operations describe cloudsql.instances.get
gcloud sql operations list cloudsql.instances.get
gcloud sql operations wait cloudsql.instances.get
gcloud sql ssl client-certs create cloudsql.sslCerts.create
gcloud sql ssl client-certs delete cloudsql.sslCerts.delete
gcloud sql ssl client-certs describe cloudsql.sslCerts.list
gcloud sql ssl client-certs list cloudsql.sslCerts.list
gcloud sql tiers list
gcloud sql users create cloudsql.users.create
gcloud sql users delete cloudsql.users.delete
gcloud sql users list cloudsql.users.list
gcloud sql users set-password cloudsql.users.update

Cloud SQL Admin API 方法所需的权限

下表列出了调用方在调用 Cloud SQL Admin API 中的每种方法或通过使用该 API 的 Google Cloud 工具(例如 Google Cloud 控制台或 gcloud 命令行工具)执行任务时必须具备的权限。

如需了解详情,请参阅使用 OAuth 2.0 为请求授权。 所有权限都会应用于项目。您不能基于实例或其他较低级别的对象应用不同的权限。

方法 所需权限
backupRuns.delete cloudsql.backupRuns.delete
backupRuns.get cloudsql.backupRuns.get
backupRuns.insert cloudsql.backupRuns.create
backupRuns.list cloudsql.backupRuns.list
databases.delete cloudsql.databases.delete
databases.get cloudsql.databases.get
databases.insert cloudsql.databases.create
databases.list cloudsql.databases.list
databases.patch cloudsql.databases.updatecloudsql.databases.get
databases.update cloudsql.databases.update
flags.list
instances.clone cloudsql.instances.clone
instances.delete cloudsql.instances.delete
instances.export cloudsql.instances.export
instances.failover cloudsql.instances.failover
instances.get cloudsql.instances.get
instances.import cloudsql.instances.import
instances.insert cloudsql.instances.create
instances.list cloudsql.instances.list
instances.patch cloudsql.instances.getcloudsql.instances.update
instances.promoteReplica cloudsql.instances.promoteReplica
instances.resetSslConfig cloudsql.instances.resetSslConfig
instances.restart cloudsql.instances.restart
instances.restoreBackup cloudsql.instances.restoreBackupcloudsql.backupRuns.get
instances.startReplica cloudsql.instances.startReplica
instances.stopReplica cloudsql.instances.stopReplica
instances.truncateLog cloudsql.instances.truncateLog
instances.update cloudsql.instances.update
operations.get cloudsql.instances.get
operations.list cloudsql.instances.get
sslCerts.delete cloudsql.sslCerts.delete
sslCerts.get cloudsql.sslCerts.get
sslCerts.insert cloudsql.sslCerts.create
sslCerts.list cloudsql.sslCerts.list
users.delete cloudsql.users.delete
users.insert cloudsql.users.create
users.list cloudsql.users.list
users.update cloudsql.users.update