访问控制(RAM)是阿里云提供的管理用户身份与资源访问权限的服务。使用RAM可以让您避免与其他用户共享阿里云账号密钥,并可按需为用户授予最小权限。RAM中使用权限策略描述授权的具体内容。
本文为您介绍云原生数据仓库AnalyticDB MySQL版(ADB)为RAM权限策略定义的操作(Action)、资源(Resource)和条件(Condition)。云原生数据仓库AnalyticDB MySQL版(ADB)的RAM代码(RamCode)为adb,支持的授权粒度为RESOURCE。
权限策略通用结构
权限策略支持JSON格式,其通用结构如下:
{
"Version": "1",
"Statement": [
{
"Effect": "<Effect>",
"Action": "<Action>",
"Resource": "<Resource>",
"Condition": {
"<Condition_operator>": {
"<Condition_key>": [
"<Condition_value>"
]
}
}
}
]
}
- Effect:权限策略效果。取值:Allow(允许)、Deny(拒绝)。
- Action:授予允许或拒绝权限的具体操作。具体信息,请参见操作(Action)。
- Resource:受操作影响的具体对象,您可以使用资源ARN来描述指定资源。具体信息,请参见资源(Resource)。
- Condition:指授权生效的条件。可选字段。具体信息,请参见条件(Condition)。
- Condition_operator:条件运算符,不同类型的条件对应不同的条件运算符。具体信息,请参见权限策略基本元素。
- Condition_key:条件关键字。
- Condition_value:条件关键字对应的值。
操作(Action)
下表是云原生数据仓库AnalyticDB MySQL版(ADB)定义的操作,这些操作可以在RAM权限策略语句的Action
元素中使用,用来授予执行该操作的权限。下面对表中的具体项提供说明:- 操作:是指具体的权限点。
- API:是指操作对应的API接口。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用背景高亮的方式表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。该列不体现适用于任何操作的通用条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | API | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|---|
adb:DescribeAutoRenewAttribute | DescribeAutoRenewAttribute | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:DescribeOperatorPermission | DescribeOperatorPermission | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:ModifyClusterConnectionString | ModifyClusterConnectionString | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeDBClusterPerformance | DescribeDBClusterPerformance | list | 全部资源 * | 无 | 无 |
adb:ModifyDBClusterSSL | ModifyDBClusterSSL | update | 全部资源 * | adb:EnableSSL | 无 |
adb:DescribeDBClusters | DescribeDBClusters | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/* | 无 | 无 |
adb:DescribeDiagnosisTasks | DescribeDiagnosisTasks | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeAvailableResource | DescribeAvailableResource | get | 全部资源 * | 无 | 无 |
adb:DescribeTableDetail | DescribeTableDetail | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:ModifyDBClusterDescription | ModifyDBClusterDescription | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:ApplyAdviceById | ApplyAdviceById | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeAuditLogConfig | DescribeAuditLogConfig | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:ModifyDBResourceGroup | ModifyDBResourceGroup | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:ModifyAutoRenewAttribute | ModifyAutoRenewAttribute | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:ReleaseClusterPublicConnection | ReleaseClusterPublicConnection | delete | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:CreateDBResourcePool | CreateDBResourcePool | create | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeAccounts | DescribeAccounts | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:DescribeDBResourcePool | DescribeDBResourcePool | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DeleteElasticPlan | DeleteElasticPlan | delete | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DeleteDBCluster | DeleteDBCluster | delete | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:MigrateDBCluster | MigrateDBCluster | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeTableStatistics | DescribeTableStatistics | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:ModifyDBCluster | ModifyDBCluster | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:DescribeDBClusterSpaceSummary | DescribeDBClusterSpaceSummary | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:KillProcess | KillProcess | delete | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeDiagnosisRecords | DescribeDiagnosisRecords | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:ModifyDBClusterAccessWhiteList | ModifyDBClusterAccessWhiteList | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:ModifyMaintenanceAction | ModifyMaintenanceAction | update | 全部资源 * | 无 | 无 |
adb:CreateElasticPlan | CreateElasticPlan | create | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeKernelVersion | DescribeKernelVersion | list | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeDBClusterAccessWhiteList | DescribeDBClusterAccessWhiteList | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:DescribeBackups | DescribeBackups | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeDBResourceGroup | DescribeDBResourceGroup | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:DescribeDiagnosisSQLInfo | DescribeDiagnosisSQLInfo | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeDiagnosisDimensions | DescribeDiagnosisDimensions | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:ModifySQAConfig | ModifySQAConfig | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeSqlPattern | DescribeSqlPattern | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeDownloadRecords | DescribeDownloadRecords | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:UnbindDBResourcePoolWithUser | UnbindDBResourcePoolWithUser | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeAuditLogRecords | DescribeAuditLogRecords | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:ModifyBackupPolicy | ModifyBackupPolicy | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:DescribeLoadTasksRecords | DescribeLoadTasksRecords | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeComputeResource | DescribeComputeResource | get | 全部资源 * | 无 | 无 |
adb:DescribeTaskInfo | DescribeTaskInfo | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:ModifyDBResourcePool | ModifyDBResourcePool | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeElasticDailyPlan | DescribeElasticDailyPlan | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeProcessList | DescribeProcessList | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:TagResources | TagResources | create | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:GrantOperatorPermission | GrantOperatorPermission | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:ModifyAuditLogConfig | ModifyAuditLogConfig | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeExcessivePrimaryKeys | DescribeExcessivePrimaryKeys | get | DBClusterLakeVersion acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeTablePartitionDiagnose | DescribeTablePartitionDiagnose | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:BatchApplyAdviceByIdList | BatchApplyAdviceByIdList | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeElasticPlan | DescribeElasticPlan | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeMaintenanceAction | DescribeMaintenanceAction | get | 全部资源 * | 无 | 无 |
adb:DescribeAllDataSource | DescribeAllDataSource | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:DescribeEIURange | DescribeEIURange | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:DeleteAccount | DeleteAccount | delete | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:BindDBResourceGroupWithUser | BindDBResourceGroupWithUser | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:DescribeSchemas | DescribeSchemas | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:DescribeColumns | DescribeColumns | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:ModifyLogBackupPolicy | ModifyLogBackupPolicy | update | 全部资源 * | 无 | 无 |
adb:DescribeResubmitConfig | DescribeResubmitConfig | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeTables | DescribeTables | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:ModifyDBClusterPayType | ModifyDBClusterPayType | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:DescribeSQLPlan | DescribeSQLPlan | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:UntagResources | UntagResources | delete | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:AllocateClusterPublicConnection | AllocateClusterPublicConnection | update | DBCluster acs:adb:*:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:DescribeSQLPatterns | DescribeSQLPatterns | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeAvailableAdvices | DescribeAvailableAdvices | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribePatternPerformance | DescribePatternPerformance | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DeleteDBResourceGroup | DeleteDBResourceGroup | delete | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DetachUserENI | DetachUserENI | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:UnbindDBResourceGroupWithUser | UnbindDBResourceGroupWithUser | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:ModifyDBClusterResourceGroup | ModifyDBClusterResourceGroup | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:AttachUserENI | AttachUserENI | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeDBClusterHealthStatus | DescribeDBClusterHealthStatus | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:CreateAccount | CreateAccount | create | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:CreateDBCluster | CreateDBCluster | create | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/* | adb:DiskEncryption adb:EnableSSL | 无 |
adb:DescribeDBClusterNetInfo | DescribeDBClusterNetInfo | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:UpgradeKernelVersion | UpgradeKernelVersion | update | 全部资源 * | 无 | 无 |
adb:DescribeSQAConfig | DescribeSQAConfig | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeDBClusterAttribute | DescribeDBClusterAttribute | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:DescribeInclinedTables | DescribeInclinedTables | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeAppliedAdvices | DescribeAppliedAdvices | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeDBClusterResourcePoolPerformance | DescribeDBClusterResourcePoolPerformance | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:ModifyAccountDescription | ModifyAccountDescription | update | 全部资源 * | 无 | 无 |
adb:EnableAdviceService | EnableAdviceService | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:CreateDBResourceGroup | CreateDBResourceGroup | create | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:RevokeOperatorPermission | RevokeOperatorPermission | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:DescribeDBClusterSSL | DescribeDBClusterSSL | get | 全部资源 * | 无 | 无 |
adb:DescribeAdviceServiceEnabled | DescribeAdviceServiceEnabled | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeDiagnosisMonitorPerformance | DescribeDiagnosisMonitorPerformance | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:ModifyResubmitConfig | ModifyResubmitConfig | update | 全部资源 * | 无 | 无 |
adb:DeleteDBResourcePool | DeleteDBResourcePool | delete | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DisableAdviceService | DisableAdviceService | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:ModifyDBClusterMaintainTime | ModifyDBClusterMaintainTime | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:ListTagResources | ListTagResources | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:DownloadDiagnosisRecords | DownloadDiagnosisRecords | create | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:ModifyElasticPlan | ModifyElasticPlan | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeBackupPolicy | DescribeBackupPolicy | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:ResetAccountPassword | ResetAccountPassword | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | 无 | 无 |
adb:DescribeTableAccessCount | DescribeTableAccessCount | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:BindDBResourcePoolWithUser | BindDBResourcePoolWithUser | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeConnectionCountRecords | DescribeConnectionCountRecords | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeSQLPlanTask | DescribeSQLPlanTask | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
adb:DescribeAllAccounts | DescribeAllAccounts | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | 无 | 无 |
资源(Resource)
下表是云原生数据仓库AnalyticDB MySQL版(ADB)定义的资源,这些资源可以在RAM权限策略语句的Resource
元素中使用,用来授予对该资源执行具体操作的权限。 其中,资源ARN是资源在阿里云上的唯一标识。具体说明如下:{#}
为变量标识,需要您替换为实际值。例如:{#ramcode}
需要您替换为实际的云服务RAM代码。-
*
表示全部。例如:{#resourceType}
为*
时:表示全部资源。{#regionId}
为*
时:表示全部地域。{#accountId}
为*
时:表示全部阿里云账号。
资源类型 | 资源ARN |
---|---|
DBCluster | acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} |
DBCluster | acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} |
DBClusterLakeVersion | acs:adb:{#Region}:{#AccountId}:dbcluster/{#DBClusterId} |
DBCluster | acs:adb:{#regionId}:{#accountId}:dbcluster/* |
DBCluster | acs:adb:{#regionId}:{#accountId}:null/* |
DBCluster | acs:adb:*:{#accountId}:dbcluster/{#dbclusterId} |
DBClusterLakeVersion | acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} |
条件(Condition)
下表是云原生数据仓库AnalyticDB MySQL版(ADB)定义的产品级条件关键字,这些条件关键字可以在RAM权限策略语句的
Condition
元素中使用,用来描述授予权限的条件。以下仅列举产品级的条件关键字,阿里云定义的通用条件关键字也同样适用云原生数据仓库AnalyticDB MySQL版(ADB)。其中,数据类型决定了您可以使用哪些条件运算符将请求中的值与权限策略语句中的值进行比较。您必须使用与数据类型匹配的条件运算符,否则无法匹配策略语句,授权行为无效。数据类型与条件运算符的对应关系,请参见条件操作类型。
条件关键字 | 描述 | 类型 |
---|---|---|
adb:DiskEncryption | 是否开启云盘加密 | String |
adb:EnableSSL | 是否开启SSL加密链接 | String |