云数据库 RDS
Organizations服务中的服务控制策略(Service Control Policy,以下简称SCP)可以使用以下授权项元素设置访问控制策略。
SCP不直接进行授权,只划定权限边界。将SCP绑定到组织单元或者成员账号时,并没有直接对组织单元或成员账号授予操作权限,而是规定了成员账号或组织单元包含的成员账号的授权范围。
本章节介绍组织服务中SCP使用的元素,这些元素包含了操作(Action)、资源(Resource)和条件(Condition)。
如何使用这些元素编辑SCP自定义策略,请参考创建SCP。
操作(Action)
操作(Action)即为SCP中支持的授权项。
- “访问级别”列描述如何对操作进行分类(list、read和write等)。此分类可帮助您了解在SCP中相应操作对应的访问级别。
- “资源类型”列指每个操作是否支持资源级权限。
- 资源类型支持通配符号*表示所有。如果此列没有值(-),则必须在SCP语句的Resource元素中指定所有资源类型(“*”)。
- 如果该列包含资源类型,则必须在具有该操作的语句中指定该资源的URN。
- 资源类型列中必需资源在表中用星号(*)标识,表示使用此操作必须指定该资源类型。
关于RDS定义的资源类型的详细信息请参见资源类型(Resource)。
- “条件键”列包括了可以在SCP语句的Condition元素中支持指定的键值。
- 如果该授权项资源类型列存在值,则表示条件键仅对列举的资源类型生效。
- 如果该授权项资源类型列没有值(-),则表示条件键对整个授权项生效。
- 如果此列条件键没有值(-),表示此操作不支持指定条件键。
关于RDS定义的条件键的详细信息请参见条件(Condition)。
您可以在SCP语句的Action元素中指定以下RDS的相关操作。
授权项 |
描述 |
访问级别 |
资源类型(*为必须) |
条件键 |
---|---|---|---|---|
rds:task:listAll |
授予获取任务信息的权限。 |
list |
- |
- |
rds:tag:list |
授予查询项目标签的权限。 |
list |
- |
- |
rds:param:listAll |
授予获取参数模板列表的权限。 |
list |
- |
- |
rds:param:listInstanceParamHistories |
授予查询实例参数修改历史列表的权限。 |
list |
- |
- |
rds:databaseUser:list |
授予查询数据库用户列表的权限。 |
list |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:database:list |
授予查询数据库列表的权限。 |
list |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:backup:list |
授予获取备份列表的权限。 |
list |
- |
- |
rds:log:setSlowLogSensitiveStatus |
授予慢日志明文显示的权限。 |
permission_management |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:enableSecondLevelMonitoring |
授予开启秒级监控的权限。 |
permission_management |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:tde |
授予开启tde的权限。 |
permission_management |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:openReadonly |
授予设置只读参数的权限。 |
permission_management |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:modifySynchronizeModel |
授予设置主备实例数据同步方式的权限。 |
permission_management |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:modifyStrategy |
授予主备实例倒换策略的权限。 |
permission_management |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:modifySSL |
授予关闭或开启SSL的权限。 |
permission_management |
- |
- |
rds:instance:modifyForceSwitch |
授予开启强切高可用的权限。 |
permission_management |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:setAutoEnlargePolicy |
授予设置自动扩容策略的权限。 |
permission_management |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:modifyBackupPolicy |
授予设置自动备份策略的权限。 |
permission_management |
instance |
g:EnterpriseProjectId rds:BackupEnabled g:ResourceTag/<tag-key> |
rds:instance:extendSpace |
授予扩容数据库实例的磁盘空间的权限。 |
permission_management |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:shrinkSpace |
授予缩小数据库实例的磁盘空间的权限。 |
permission_management |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:database:shrink |
授予收缩数据库的权限。 |
permission_management |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:binlog:setPolicy |
授予设置binlog策略的权限。 |
permission_management |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:auditlog:operate |
授予设置审计日志策略的权限。 |
permission_management |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:getParameter |
授予获取指定实例的参数模板的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:param:get |
授予获取指定参数模板参数的权限。 |
read |
- |
- |
rds:instance:getSecondLevelMonitoringConfig |
授予查询秒级监控配置的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:log:getErrorLogs |
授予查询数据库错误日志的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:log:getSlowLogs |
授予查询慢日志的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:log:download |
授予日志下载的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:log:setLogSwitchover |
授予查询主备切换日志的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:getAutoEnlargePolicy |
授予查询自动扩容策略的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:getBackupPolicy |
授予查询备份策略的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:getDBProxy |
授予查询数据库代理信息的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:getDnsName |
授予查询实例域名的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:getMsdtcHosts |
授予查询MSDTC的hosts的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:getProxyFlavors |
授予查询数据库代理可变更规格的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:getReplicaStatus |
授予查询实例复制状态的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:getRestoreTime |
授予查询实例的可恢复时间段的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:listAll |
授予查询数据库实例列表的权限。 |
read |
- |
- |
rds:instance:get |
授予查询数据库单个实例详情的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:getEip |
授予查实例绑定公网IP信息的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:update |
授予修改实例相关信息的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:updateQuota |
授予修改项目配额的权限。 |
read |
- |
- |
rds:instance:listQuotas |
授予查询资源配额的权限。 |
read |
- |
- |
rds:instance:deleteTag |
授予批量删除标签的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
- |
g:RequestTag/<tag-key> g:TagKeys |
|||
rds:instance:createTag |
授予批量增加标签的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
- |
g:RequestTag/<tag-key> g:TagKeys |
|||
rds:binlog:get |
授予获取binlog的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:binlog:download |
授予下载binlog的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:backup:download |
授予获取备份下载链接的权限。 |
read |
- |
- |
rds:auditlog:list |
授予实例获取审计日志列表的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:auditlog:download |
授予生成审计日志下载链接的权限。 |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:listDatabaseVersion |
授予查询数据库版本信息的权限。 |
read |
- |
- |
rds:instance:listFlavors |
授予查询规格列表的权限。 |
read |
- |
- |
rds:instance:listStorageType |
授予查询数据库磁盘类型的权限。 |
read |
- |
- |
rds:coldTable:query |
授予冷热分离查询的权限。 |
read |
- |
- |
rds:task:delete |
授予删除任务中心任务的权限。 |
write |
- |
- |
rds:password:update |
授予修改数据库密码的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:param:save |
授予保存参数组的权限。 |
write |
- |
- |
rds:param:reset |
授予重置参数组的权限。 |
write |
- |
- |
rds:param:updateTemplate |
授予修改参数模板参数的权限。 |
write |
- |
- |
rds:instance:updateParameter |
授予修改指定实例的参数的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:param:delete |
授予删除参数模板的权限。 |
write |
- |
- |
rds:param:createTemplate |
授予创建参数模板的权限。 |
write |
- |
- |
rds:param:copy |
授予复制参数模板的权限。 |
write |
- |
- |
rds:param:apply |
授予应用参数模板的权限。 |
write |
- |
- |
rds:instance:tableRestore |
授予表级恢复的权限。 |
write |
- |
- |
rds:instance:switchover |
授予手动主备切换的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:singleToHa |
授予单机转主备实例的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:haToSingle |
授予主备转单机实例的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:setRecycleBin |
授予设置回收站策略的权限。 |
write |
- |
- |
rds:instance:restoreInPlace |
授予恢复到已有或当前实例。 |
write |
- |
- |
rds:instance:restart |
授予重启数据库实例的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:stop |
授予停止实例的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:start |
授予开启实例的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:modifySpec |
授予变更数据库实例的规格的权限。 |
write |
- |
- |
rds:instance:modifySecurityGroup |
授予修改安全组的权限。 |
write |
- |
- |
rds:instance:modifyPublicAccess |
授予绑定和解绑弹性公网IP的权限。 |
write |
- |
- |
rds:instance:modifyProxy |
授予开启/关闭数据库代理的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:modifyPort |
授予修改端口的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:modifyIp |
授予修改内网IP的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:modifyHost |
授予修改主机权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:updateDnsName |
授予修改域名的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:SetMsdtcHosts |
授予添加MSDTC主机的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:updateOpsWindow |
授予设置实例可维护时间窗的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:updateName |
授予修改实例名称的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:updateRemark |
授予修改实例备注的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:upgradeDatabaseVersion |
授予升级数据库版本的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:deleteInstance |
授予删除数据库实例。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:deleteNode |
授予删除数据库节点。 |
write |
- |
- |
rds:instance:createDns |
授予创建内网DNS的权限。 |
write |
- |
- |
rds:instance:create |
授予创建数据库实例的权限。 |
write |
- |
rds:Encrypted rds:BackupEnabled g:RequestTag/<tag-key> g:TagKeys g:EnterpriseProjectId |
rds:instance:batchTableRestore |
授予批量表级时间点恢复的权限。 |
write |
- |
- |
rds:databaseUser:update |
授予修改数据库用户名备注的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:databaseUser:drop |
授予删除数据库用户的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:databaseUser:create |
授予创建数据库用户的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:databasePrivilege:revoke |
授予解除数据库账号权限的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:databasePrivilege:grant |
授予数据库账号或用户的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:database:drop |
授予删除数据库的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:database:update |
授予修改数据库的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:database:createDatabase |
授予创建数据库的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:binlog:merge |
授予合并binlog的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:binlog:delete |
授予删除binlog的权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:backup:delete |
授予删除手动备份的权限。 |
write |
- |
- |
rds:backup:create |
授予创建手动备份的权限。 |
write |
- |
- |
rds:instance:buildDrRelation |
授予配置灾备实例容灾能力权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:instance:modifyDRRole |
授予灾备升主权限。 |
write |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
rds:ltsConfig:update |
授予配置日志转存LTS能力权限。 |
write |
- |
- |
rds:coldTable:operate |
授予冷热分离操作的权限。 |
write |
- |
- |
RDS的API通常对应着一个或多个授权项。表2展示了API与授权项的关系,以及该API需要依赖的授权项。
API |
对应的授权项 |
依赖的授权项 |
---|---|---|
GET /v3/{project_id}/jobs?id={id} |
rds:task:listAll |
- |
GET /v3/{project_id}/tags |
rds:tag:list |
- |
GET /v3/{project_id}/configurations |
rds:param:listAll |
- |
GET /v3/{project_id}/instances/{instance_id}/configuration-histories?offset={offset}&limit={limit}&start_time={start_time}&end_time={end_time}¶m_name={param_name} |
rds:param:listInstanceParamHistories |
- |
GET /v3/{project_id}/instances/{instance_id}/db_user/detail?page={page}&limit={limit} |
rds:databaseUser:list |
- |
GET /v3/{project_id}/instances/{instance_id}/database/detail?page={page}&limit={limit} |
rds:database:list |
- |
GET /v3/{project_id}/backups?instance_id={instance_id} |
rds:backup:list |
- |
PUT /v3/{project_id}/instances/{instance_id}/slowlog-sensitization/{status} |
rds:log:setSlowLogSensitiveStatus |
- |
PUT /v3/{project_id}/instances/{instance_id}/second-level-monitor |
rds:instance:enableSecondLevelMonitoring |
- |
PUT /v3/{project_id}/instances/{instance_id}/tde |
rds:instance:tde |
- |
PUT /v3/{project_id}/instances/{instance_id}/readonly-status |
rds:instance:openReadonly |
- |
PUT /v3/{project_id}/instances/{instance_id}/failover/mode |
rds:instance:modifySynchronizeModel |
- |
PUT /v3/{project_id}/instances/{instance_id}/failover/strategy |
rds:instance:modifyStrategy |
- |
PUT /v3/{project_id}/instances/{instance_id}/ssl |
rds:instance:modifySSL |
- |
POST /v3/{project_id}/instances/{instance_id}/action |
rds:instance:modifyForceSwitch |
- |
PUT /v3/{project_id}/instances/{instance_id}/disk-auto-expansion |
rds:instance:setAutoEnlargePolicy |
- |
PUT /v3/{project_id}/instances/{instance_id}/backups/policy |
rds:instance:modifyBackupPolicy |
- |
POST /v3/{project_id}/instances/{instance_id}/action |
rds:instance:extendSpace |
- |
POST /v3/{project_id}/instances/{instance_id}/db_shrink |
rds:database:shrink |
- |
PUT /v3/{project_id}/instances/{instance_id}/binlog/clear-policy |
rds:binlog:setPolicy |
- |
PUT /v3/{project_id}/instances/{instance_id}/auditlog-policy |
rds:auditlog:operate |
- |
GET /v3/{project_id}/instances/{instance_id}/configurations |
rds:instance:getParameter |
- |
GET /v3/{project_id}/configurations/{config_id} |
rds:param:get |
- |
GET /v3/{project_id}/instances/{instance_id}/second-level-monitor |
rds:instance:getSecondLevelMonitoringConfig |
- |
POST /v3/{project_id}/instances/{instance_id}/error-logs |
rds:log:getErrorLogs |
- |
POST /v3/{project_id}/instances/{instance_id}/slow-logs |
rds:log:getSlowLogs |
- |
POST /v3/{project_id}/instances/{instance_id}/slowlog-download |
rds:log:download |
- |
GET /v3/{project_id}/instances/{instance_id}/disk-auto-expansion |
rds:instance:getAutoEnlargePolicy |
- |
GET /v3/{project_id}/instances/{instance_id}/backups/policy |
rds:instance:getBackupPolicy |
- |
GET /v3/{project_id}/instances/{instance_id}/proxy |
rds:instance:getDBProxy |
- |
GET /v3/{project_id}/instances/{instance_id}/dns |
rds:instance:getDnsName |
- |
GET /v3/{project_id}/instances/{instance_id}/msdtc/hosts?offset={offset}&limit={limit} |
rds:instance:getMsdtcHosts |
- |
GET /v3/{project_id}/flavors/{database_name}?version_name={version_name}&spec_code={spec_code} |
rds:instance:getProxyFlavors |
- |
GET /v3/{project_id}/instances/{instance_id}/replication/status |
rds:instance:getReplicaStatus |
- |
GET /v3/{project_id}/instances/{instance_id}/restore-time?date={date} |
rds:instance:getRestoreTime |
- |
GET /v3/{project_id}/instances |
rds:instance:listAll |
- |
GET /v3/{project_id}/instances?id={id}&name={name}&type={type}&datastore_type={datastore_type}&vpc_id={vpc_id}&subnet_id={subnet_id}&offset={offset}&limit={limit}&tags={key}={value} |
rds:instance:get |
- |
GET https://{Endpoint}/v3/{project_id}/quotas |
rds:instance:listQuotas |
- |
POST /v3/{project_id}/instances/{instance_id}/tags/action |
rds:instance:deleteTag |
- |
POST /v3/{project_id}/instances/{instance_id}/tags/action |
rds:instance:createTag |
- |
GET /v3/{project_id}/instances/{instance_id}/binlog/clear-policy |
rds:binlog:get |
- |
GET /v3/{project_id}/backup-files?backup_id={backup_id} |
rds:backup:download |
- |
GET /v3/{project_id}/instances/{instance_id}/auditlog?start_time={start_time}&end_time={end_time}&offset={offset}&limit={limit} |
rds:auditlog:list |
- |
POST /v3/{project_id}/instances/{instance_id}/auditlog-links |
rds:auditlog:download |
- |
GET /v3/{project_id}/datastores/{database_name} |
rds:instance:listDatabaseVersion |
- |
GET /v3/{project_id}/flavors/{database_name}?version_name={version_name}&spec_code={spec_code} |
rds:instance:listFlavors |
- |
GET /v3/{project_id}/storage-type/{database_name}?version_name={version_name}&ha_mode={ha_mode} |
rds:instance:listStorageType |
- |
POST /v3/{project_id}/instances/{instance_id}/password |
rds:password:update |
- |
PUT /v3/{project_id}/configurations/{config_id} |
rds:param:updateTemplate |
- |
PUT /v3.1/{project_id}/instances/{instance_id}/configurations |
rds:instance:updateParameter |
- |
DELETE /v3/{project_id}/configurations/{config_id} |
rds:param:delete |
- |
POST /v3/{project_id}/configurations |
rds:param:createTemplate |
- |
POST /v3/{project_id}/configurations/{config_id}/copy |
rds:param:copy |
- |
PUT /v3.1/{project_id}/configurations/{config_id}/apply |
rds:param:apply |
- |
POST /v3.1/{project_id}/instances/{instance_id}/restore/tables |
rds:instance:tableRestore |
- |
PUT /v3/{project_id}/instances/{instance_id}/failover |
rds:instance:switchover |
- |
POST /v3/{project_id}/instances/{instance_id}/action |
rds:instance:singleToHa |
- |
PUT /v3/{project_id}/instances/recycle-policy |
rds:instance:setRecycleBin |
- |
POST /v3/{project_id}/instances |
rds:instance:restoreInPlace |
- |
POST /v3/{project_id}/instances/{instance_id}/action |
rds:instance:restart |
- |
POST /v3/{project_id}/instances/{instance_id}/action/shutdown |
rds:instance:stop |
- |
POST /v3/{project_id}/instances/{instance_id}/action/startup |
rds:instance:start |
- |
POST /v3/{project_id}/instances/{instance_id}/action |
rds:instance:modifySpec |
- |
PUT /v3/{project_id}/instances/{instance_id}/security-group |
rds:instance:modifySecurityGroup |
- |
PUT /v3/{project_id}/instances/{instance_id}/public-ip |
rds:instance:modifyPublicAccess |
- |
POST /v3/{project_id}/instances/{instance_id}/proxy |
rds:instance:modifyProxy |
- |
PUT /v3/{project_id}/instances/{instance_id}/port |
rds:instance:modifyPort |
- |
PUT /v3/{project_id}/instances/{instance_id}/ip |
rds:instance:modifyIp |
- |
PUT /v3/{project_id}/instances/{instance_id}/modify-dns |
rds:instance:updateDnsName |
- |
POST /v3/{project_id}/instances/{instance_id}/msdtc/host |
rds:instance:SetMsdtcHosts |
- |
PUT /v3/{project_id}/instances/{instance_id}/ops-window |
rds:instance:updateOpsWindow |
- |
PUT /v3/{project_id}/instances/{instance_id}/name |
rds:instance:updateName |
- |
PUT /v3/{project_id}/instances/{instance_id}/alias |
rds:instance:updateRemark |
- |
POST /v3/{project_id}/instances/{instance_id}/db-upgrade |
rds:instance:upgradeDatabaseVersion |
- |
DELETE /v3/{project_id}/instances/{instance_id} |
rds:instance:deleteInstance |
- |
POST /v3/{project_id}/instances/{instance_id}/create-dns |
rds:instance:createDns |
- |
POST /v3/{project_id}/instances |
rds:instance:create |
- |
PUT /v3/{project_id}/instances/{instance_id}/db-users/{user_name}/comment |
rds:databaseUser:update |
- |
DELETE /v3/{project_id}/instances/{instance_id}/db_user/{user_name} |
rds:databaseUser:drop |
- |
POST /v3/{project_id}/instances/{instance_id}/db_user |
rds:databaseUser:create |
- |
DELETE /v3/{project_id}/instances/{instance_id}/db_privilege |
rds:databasePrivilege:revoke |
- |
POST /v3/{project_id}/instances/{instance_id}/db_privilege |
rds:databasePrivilege:grant |
- |
DELETE /v3/{project_id}/instances/{instance_id}/database/{db_name} |
rds:database:drop |
- |
POST /v3/{project_id}/instances/{instance_id}/database |
rds:database:createDatabase |
- |
DELETE /v3/{project_id}/backups/{backup_id} |
rds:backup:delete |
- |
POST /v3/{project_id}/backups |
rds:backup:create |
- |
POST /v3/{project_id}/instances/{instance_id}/action |
rds:instance:buildDrRelation |
- |
POST /v3/{project_id}/instances/{instance_id}/action |
rds:instance:modifyDRRole |
- |
资源类型(Resource)
资源类型(Resource)表示SCP所作用的资源。如表3中的某些操作指定了可以在该操作指定的资源类型,则必须在具有该操作的SCP语句中指定该资源的URN,SCP仅作用于此资源;如未指定,Resource默认为“*”,则SCP将应用到所有资源。您也可以在SCP中设置条件,从而指定资源类型。
RDS定义了以下可以在SCP的Resource元素中使用的资源类型。
条件(Condition)
条件(Condition)是SCP生效的特定条件,包括条件键和运算符。
- 条件键表示SCP语句的Condition元素中的键值。根据适用范围,分为全局级条件键和服务级条件键。
- 全局级条件键(前缀为g:)适用于所有操作,在鉴权过程中,云服务不需要提供用户身份信息,系统将自动获取并鉴权。详情请参见:全局条件键。
- 服务级条件键(前缀通常为服务缩写,如rds:)仅适用于对应服务的操作,详情请参见表4。
- 单值/多值表示API调用时请求中与条件关联的值数。单值条件键在API调用时的请求中最多包含一个值,多值条件键在API调用时请求可以包含多个值。例如:g:SourceVpce是单值条件键,表示仅允许通过某个VPC终端节点发起请求访问某资源,一个请求最多包含一个VPC终端节点ID值。g:TagKeys是多值条件键,表示请求中携带的所有标签的key组成的列表,当用户在调用API请求时传入标签可以传入多个值。
- 运算符与条件键、条件值一起构成完整的条件判断语句,当请求信息满足该条件时,SCP才能生效。支持的运算符请参见:运算符。
RDS定义了以下可以在SCP的Condition元素中使用的条件键,您可以使用这些条件键进一步细化SCP语句应用的条件。