文档

授权信息

更新时间:
访问控制(RAM)是阿里云提供的管理用户身份与资源访问权限的服务。使用RAM可以让您避免与其他用户共享阿里云账号密钥,并可按需为用户授予最小权限。RAM中使用权限策略描述授权的具体内容。
本文为您介绍云原生关系型数据库 PolarDB(PolarDB)为RAM权限策略定义的操作(Action)、资源(Resource)和条件(Condition)。云原生关系型数据库 PolarDB(PolarDB)的RAM代码(RamCode)为polardb,支持的授权粒度为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)

下表是云原生关系型数据库 PolarDB(PolarDB)定义的操作,这些操作可以在RAM权限策略语句的Action元素中使用,用来授予执行该操作的权限。下面对表中的具体项提供说明:
  • 操作:是指具体的权限点。
  • API:是指操作对应的API接口。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。该列不体现适用于任何操作的通用条件关键字
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作API访问级别资源类型条件关键字关联操作
polardb:CancelScheduleTasksCancelScheduleTasksWrite
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
polardb:CheckAccountNameCheckAccountNameRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:CheckDBNameCheckDBNameRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:CheckKMSAuthorizedCheckKMSAuthorizedRead
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
polardb:CloseAITaskCloseAITaskWrite
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:CloseDBClusterMigrationCloseDBClusterMigrationWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:CreateAccountCreateAccountWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:CreateBackupCreateBackupWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:CreateColdStorageInstanceCreateColdStorageInstanceWrite
全部资源
*
polardb:CreateDBClusterCreateDBClusterWrite
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
polardb:CreateDBClusterEndpointCreateDBClusterEndpointWrite
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
polardb:CreateDBEndpointAddressCreateDBEndpointAddressWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:CreateDBLinkCreateDBLinkWrite
全部资源
*
polardb:CreateDBNodesCreateDBNodesWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:CreateDatabaseCreateDatabaseWrite
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
polardb:CreateGlobalDatabaseNetworkCreateGlobalDatabaseNetworkWrite
全部资源
*
polardb:CreateGlobalSecurityIPGroupCreateGlobalSecurityIPGroupWrite
全部资源
*
polardb:CreateParameterGroupCreateParameterGroupWrite
全部资源
*
polardb:DeleteAccountDeleteAccountWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DeleteBackupDeleteBackupWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DeleteDBClusterDeleteDBClusterWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DeleteDBClusterEndpointDeleteDBClusterEndpointWrite
全部资源
*
polardb:DeleteDBEndpointAddressDeleteDBEndpointAddressWrite
全部资源
*
polardb:DeleteDBLinkDeleteDBLinkWrite
全部资源
*
polardb:DeleteDBNodesDeleteDBNodesWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DeleteDatabaseDeleteDatabaseWrite
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
polardb:DeleteGlobalDatabaseNetworkDeleteGlobalDatabaseNetworkWrite
全部资源
*
polardb:DeleteGlobalSecurityIPGroupDeleteGlobalSecurityIPGroupWrite
全部资源
*
polardb:DeleteMaskingRulesDeleteMaskingRulesWrite
全部资源
*
polardb:DeleteParameterGroupDeleteParameterGroupWrite
全部资源
*
polardb:DescribeAITaskStatusDescribeAITaskStatusRead
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeAccountsDescribeAccountsRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeAutoRenewAttributeDescribeAutoRenewAttributeRead
全部资源
*
polardb:DescribeBackupLogsDescribeBackupLogsRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeBackupPolicyDescribeBackupPolicyRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeBackupTasksDescribeBackupTasksRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeBackupsDescribeBackupsRead
全部资源
*
polardb:DescribeClassListDescribeClassListRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/*
polardb:DescribeDBClusterAccessWhiteListDescribeDBClusterAccessWhitelistRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeDBClusterAttributeDescribeDBClusterAttributeRead
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
polardb:DescribeDBClusterAuditLogCollectorDescribeDBClusterAuditLogCollectorRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeDBClusterConnectivityDescribeDBClusterConnectivityRead
全部资源
*
polardb:DescribeDBClusterEndpointsDescribeDBClusterEndpointsRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeDBClusterMigrationDescribeDBClusterMigrationRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeDBClusterMonitorDescribeDBClusterMonitorRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeDBClusterParametersDescribeDBClusterParametersRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeDBClusterPerformanceDescribeDBClusterPerformanceRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeDBClusterSSLDescribeDBClusterSSLRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeDBClusterServerlessConfDescribeDBClusterServerlessConfRead
全部资源
*
polardb:DescribeDBClusterTDEDescribeDBClusterTDERead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeDBClusterVersionDescribeDBClusterVersionRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeDBClustersDescribeDBClustersList
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
polardb:DescribeDBClustersWithBackupsDescribeDBClustersWithBackupsRead
全部资源
*
polardb:DescribeDBInitializeVariableDescribeDBInitializeVariableRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeDBLinksDescribeDBLinksRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeDBNodePerformanceDescribeDBNodePerformanceRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeDBNodesParametersDescribeDBNodesParametersRead
全部资源
*
polardb:DescribeDBProxyPerformanceDescribeDBProxyPerformanceRead
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeDasConfigDescribeDasConfigRead
DBCluster
acs:polardb:{#regionId}:{#AccountId}:dbcluster/{#DbClusterId}
polardb:DescribeDatabasesDescribeDatabasesRead
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
polardb:DescribeDetachedBackupsDescribeDetachedBackupsRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:DBCluster/{#DbClusterId}
polardb:DescribeGlobalDatabaseNetworkDescribeGlobalDatabaseNetworkRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeGlobalDatabaseNetworksDescribeGlobalDatabaseNetworksRead
全部资源
*
polardb:DescribeGlobalSecurityIPGroupDescribeGlobalSecurityIPGroupRead
全部资源
*
polardb:DescribeGlobalSecurityIPGroupRelationDescribeGlobalSecurityIPGroupRelationRead
全部资源
*
polardb:DescribeLogBackupPolicyDescribeLogBackupPolicyRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeMaskingRulesDescribeMaskingRulesRead
全部资源
*
polardb:DescribeMetaListDescribeMetaListRead
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
polardb:DescribeParameterGroupDescribeParameterGroupRead
全部资源
*
polardb:DescribeParameterGroupsDescribeParameterGroupsRead
全部资源
*
polardb:DescribeParameterTemplatesDescribeParameterTemplatesRead
全部资源
*
polardb:DescribePendingMaintenanceActionDescribePendingMaintenanceActionRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/*
polardb:DescribePendingMaintenanceActionsDescribePendingMaintenanceActionsRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/*
polardb:DescribePolarSQLCollectorPolicyDescribePolarSQLCollectorPolicyRead
全部资源
*
polardb:DescribeScheduleTasksDescribeScheduleTasksRead
全部资源
*
polardb:DescribeSlowLogRecordsDescribeSlowLogRecordsRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeSlowLogsDescribeSlowLogsRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeTasksDescribeTasksRead
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:DescribeUserEncryptionKeyListDescribeUserEncryptionKeyListRead
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
polardb:DescribeVSwitchesDescribeVSwitchesRead
全部资源
*
polardb:DisableDBClusterServerlessDisableDBClusterServerlessWrite
全部资源
*
polardb:EnableDBClusterServerlessEnableDBClusterServerlessWrite
全部资源
*
polardb:FailoverDBClusterFailoverDBClusterWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:GrantAccountPrivilegeGrantAccountPrivilegeWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:ListTagResourcesListTagResourcesRead
全部资源
*
polardb:ManuallyStartDBClusterManuallyStartDBClusterWrite
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
polardb:ModifyAccountDescriptionModifyAccountDescriptionWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:ModifyAccountPasswordModifyAccountPasswordWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:ModifyAutoRenewAttributeModifyAutoRenewAttributeWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:ModifyBackupPolicyModifyBackupPolicyWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:ModifyDBClusterModifyDBClusterWrite
全部资源
*
polardb:ModifyDBClusterAccessWhitelistModifyDBClusterAccessWhitelistWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:ModifyDBClusterAndNodesParametersModifyDBClusterAndNodesParametersWrite
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:ModifyDBClusterAuditLogCollectorModifyDBClusterAuditLogCollectorWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:ModifyDBClusterDeletionModifyDBClusterDeletionWrite
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
polardb:ModifyDBClusterDescriptionModifyDBClusterDescriptionWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:ModifyDBClusterEndpointModifyDBClusterEndpointWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:ModifyDBClusterMaintainTimeModifyDBClusterMaintainTimeWrite
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:ModifyDBClusterMigrationModifyDBClusterMigrationWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:ModifyDBClusterMonitorModifyDBClusterMonitorWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:ModifyDBClusterParametersModifyDBClusterParametersWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:ModifyDBClusterPrimaryZoneModifyDBClusterPrimaryZoneWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:ModifyDBClusterSSLModifyDBClusterSSLWrite
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
polardb:ModifyDBClusterServerlessConfModifyDBClusterServerlessConfWrite
全部资源
*
polardb:ModifyDBClusterStorageSpaceModifyDBClusterStorageSpaceWrite
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
polardb:ModifyDBClusterTDEModifyDBClusterTDEWrite
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
polardb:ModifyDBDescriptionModifyDBDescriptionWrite
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:ModifyDBEndpointAddressModifyDBEndpointAddressWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:ModifyDBNodeClassModifyDBNodeClassWrite
全部资源
*
polardb:ModifyDBNodeHotReplicaModeModifyDBNodeHotReplicaModeWrite
全部资源
*
polardb:ModifyDBNodesClassModifyDBNodesClassWrite
全部资源
*
polardb:ModifyDBNodesParametersModifyDBNodesParametersWrite
全部资源
*
polardb:ModifyGlobalDatabaseNetworkModifyGlobalDatabaseNetworkWrite
全部资源
*
polardb:ModifyGlobalSecurityIPGroupModifyGlobalSecurityIPGroupWrite
全部资源
*
polardb:ModifyGlobalSecurityIPGroupNameModifyGlobalSecurityIPGroupNameWrite
全部资源
*
polardb:ModifyGlobalSecurityIPGroupRelationModifyGlobalSecurityIPGroupRelationWrite
全部资源
*
polardb:ModifyLogBackupPolicyModifyLogBackupPolicyWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:ModifyMaskingRulesModifyMaskingRulesWrite
全部资源
*
polardb:ModifyPendingMaintenanceActionModifyPendingMaintenanceActionWrite
全部资源
*
polardb:OpenAITaskOpenAITaskWrite
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
polardb:RemoveDBClusterFromGDNRemoveDBClusterFromGDNWrite
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:ResetAccountResetAccountWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:ResetGlobalDatabaseNetworkResetGlobalDatabaseNetworkWrite
全部资源
*
polardb:RestartDBLinkRestartDBLinkWrite
全部资源
*
polardb:RestartDBNodeRestartDBNodeWrite
全部资源
*
polardb:RestoreTableRestoreTableWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:RevokeAccountPrivilegeRevokeAccountPrivilegeWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:SwitchOverGlobalDatabaseNetworkSwitchOverGlobalDatabaseNetworkWrite
全部资源
*
polardb:TagResourcesTagResourcesWrite
全部资源
*
polardb:TempModifyDBNodeTempModifyDBNodeWrite
全部资源
*
polardb:TransformDBClusterPayTypeTransformDBClusterPayTypeWrite
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
polardb:UntagResourcesUntagResourcesWrite
DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
polardb:UpgradeDBClusterVersionUpgradeDBClusterVersionWrite
dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}

资源(Resource)

下表是云原生关系型数据库 PolarDB(PolarDB)定义的资源,这些资源可以在RAM权限策略语句的Resource元素中使用,用来授予对该资源执行具体操作的权限。 其中,资源ARN是资源在阿里云上的唯一标识。具体说明如下:
  • {#}为变量标识,需要您替换为实际值。例如:{#ramcode}需要您替换为实际的云服务RAM代码。
  • *表示全部。例如:
    • {#resourceType}*时:表示全部资源。
    • {#regionId}*时:表示全部地域。
    • {#accountId}*时:表示全部阿里云账号。
资源类型资源ARN
DBClusteracs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
GlobalDatabaseNetworkacs:polardb::{#accountId}:globaldatabasenetwork/{#GdnId}
DBNodeacs:{#ramcode}:*:{#accountId}:dbnode/{#DBNodeId}
ParameterGroupacs:{#ramcode}:{#regionId}:{#accountId}:parametergroup/{#ParameterGroupId}
Endpointacs:{#ramcode}:*:{#accountId}:endpoint/{#DBClusterId}/{#DBEndpointId}
Backupacs:{#ramcode}:{#regionId}:{#accountId}:backup/{#DBClusterId}

条件(Condition)

云原生关系型数据库 PolarDB(PolarDB)未定义产品级别的条件关键字。如需查看适用于所有云产品的通用条件关键字,请参见通用条件关键字

相关操作

您可以创建自定义权限策略,并将权限策略授予RAM用户、RAM用户组或RAM角色。具体操作如下:
  • 本页导读 (0)
文档反馈