Resource Access Management (RAM) is a service provided by Alibaba Cloud to manage user identities and resource access permissions. You can use RAM to prevent RAM users from sharing the AccessKey pairs of your Alibaba Cloud account. You can also use RAM to grant minimum permissions to RAM users. RAM uses policies to define permissions.
This topic describes the elements, such as Action, Resource, and Condition, which are defined by ADB. You can use the elements to create policies in RAM. The code (RamCode) in RAM that is used to indicate ADB is adb. You can grant permissions on ADB at the RESOURCE.
General structure of a policy
Policies can be stored as JSON files. The following code provides an example on the general structure of a policy:
{
"Version": "1",
"Statement": [
{
"Effect": "<Effect>",
"Action": "<Action>",
"Resource": "<Resource>",
"Condition": {
"<Condition_operator>": {
"<Condition_key>": [
"<Condition_value>"
]
}
}
}
]
}
- Effect: specifies the authorization effect. Valid values: Allow, Deny.
- Action: specifies one or more API operations that are allowed or denied. For more information, see the Action section of this topic.
- Resource: specifies one or more resources to which the policy applies. You can use an Alibaba Cloud Resource Name (ARN) to specify a resource. For more information, see the Resource section of this topic.
- Condition: specifies one or more conditions that are required for the policy to take effect. This is an optional field. For more information, see the Condition section of this topic.
- Condition_operator: specifies the conditional operators. Different types of conditions support different conditional operators. For more information, see Policy elements.
- Condition_key: specifies the condition keys.
- Condition_value: specifies the condition values.
Action
ADB defines the values that you can use in theAction
element of a policy statement. The following table describes the values.- Operation: the value that you can use in the Action element to specify the operation on a resource.
- API operation: the API operation that you can call to perform the operation.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition key: the condition keys that are defined by the Alibaba Cloud service. The Condition key column does not list the common condition keys that are defined by Alibaba Cloud. For more information about the common condition keys, see Generic Condition Keyword.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Actions | API operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|---|
adb:ModifyDBCluster | ModifyDBCluster | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:DescribeAutoRenewAttribute | DescribeAutoRenewAttribute | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:ModifyDBClusterSSL | ModifyDBClusterSSL | update | All Resources * | adb:EnableSSL | None |
adb:ModifyDBClusterAccessWhiteList | ModifyDBClusterAccessWhiteList | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeTableStatistics | DescribeTableStatistics | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:ApplyAdviceById | ApplyAdviceById | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeDBClusterSpaceSummary | DescribeDBClusterSpaceSummary | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:KillProcess | KillProcess | delete | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:ModifyDBResourceGroup | ModifyDBResourceGroup | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:DescribeDiagnosisRecords | DescribeDiagnosisRecords | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:CreateDBResourcePool | CreateDBResourcePool | create | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeDiagnosisTasks | DescribeDiagnosisTasks | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:MigrateDBCluster | MigrateDBCluster | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:ModifyDBClusterDescription | ModifyDBClusterDescription | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:DeleteDBCluster | DeleteDBCluster | delete | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:ModifyClusterConnectionString | ModifyClusterConnectionString | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeAuditLogConfig | DescribeAuditLogConfig | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeDBClusterPerformance | DescribeDBClusterPerformance | list | All Resources * | None | None |
adb:DescribeDBClusters | DescribeDBClusters | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/* | None | None |
adb:ReleaseClusterPublicConnection | ReleaseClusterPublicConnection | delete | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:DescribeAvailableResource | DescribeAvailableResource | get | All Resources * | None | None |
adb:DescribeDBResourcePool | DescribeDBResourcePool | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:ModifyAutoRenewAttribute | ModifyAutoRenewAttribute | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeAccounts | DescribeAccounts | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:DeleteElasticPlan | DeleteElasticPlan | delete | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:ModifyMaintenanceAction | ModifyMaintenanceAction | update | All Resources * | None | None |
adb:UnbindDBResourcePoolWithUser | UnbindDBResourcePoolWithUser | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:CreateElasticPlan | CreateElasticPlan | create | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:ModifyBackupPolicy | ModifyBackupPolicy | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:DescribeLoadTasksRecords | DescribeLoadTasksRecords | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeDBClusterAccessWhiteList | DescribeDBClusterAccessWhiteList | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:DescribeComputeResource | DescribeComputeResource | get | All Resources * | None | None |
adb:ModifyDBResourcePool | ModifyDBResourcePool | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeDiagnosisSQLInfo | DescribeDiagnosisSQLInfo | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeElasticDailyPlan | DescribeElasticDailyPlan | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:TagResources | TagResources | create | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:DescribeSqlPattern | DescribeSqlPattern | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeTaskInfo | DescribeTaskInfo | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeKernelVersion | DescribeKernelVersion | list | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeBackups | DescribeBackups | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:GrantOperatorPermission | GrantOperatorPermission | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:DescribeDBResourceGroup | DescribeDBResourceGroup | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:DescribeProcessList | DescribeProcessList | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeDiagnosisDimensions | DescribeDiagnosisDimensions | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:ModifySQAConfig | ModifySQAConfig | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeAuditLogRecords | DescribeAuditLogRecords | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeDownloadRecords | DescribeDownloadRecords | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:ModifyAuditLogConfig | ModifyAuditLogConfig | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeTablePartitionDiagnose | DescribeTablePartitionDiagnose | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:BatchApplyAdviceByIdList | BatchApplyAdviceByIdList | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeElasticPlan | DescribeElasticPlan | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeMaintenanceAction | DescribeMaintenanceAction | get | All Resources * | None | None |
adb:DescribeEIURange | DescribeEIURange | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:DescribeAllDataSource | DescribeAllDataSource | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:BindDBResourceGroupWithUser | BindDBResourceGroupWithUser | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:DeleteAccount | DeleteAccount | delete | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:DescribeSchemas | DescribeSchemas | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:DescribeColumns | DescribeColumns | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:ModifyDBClusterPayType | ModifyDBClusterPayType | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:DescribeResubmitConfig | DescribeResubmitConfig | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeSQLPatterns | DescribeSQLPatterns | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:ModifyLogBackupPolicy | ModifyLogBackupPolicy | update | All Resources * | None | None |
adb:DescribeTables | DescribeTables | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeSQLPlan | DescribeSQLPlan | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribePatternPerformance | DescribePatternPerformance | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:UntagResources | UntagResources | delete | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:DescribeAvailableAdvices | DescribeAvailableAdvices | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:AllocateClusterPublicConnection | AllocateClusterPublicConnection | update | DBCluster acs:adb:*:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:DeleteDBResourceGroup | DeleteDBResourceGroup | delete | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeDBClusterAttribute | DescribeDBClusterAttribute | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:UnbindDBResourceGroupWithUser | UnbindDBResourceGroupWithUser | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:ModifyDBClusterResourceGroup | ModifyDBClusterResourceGroup | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeDBClusterHealthStatus | DescribeDBClusterHealthStatus | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:CreateAccount | CreateAccount | create | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:DescribeDBClusterNetInfo | DescribeDBClusterNetInfo | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:UpgradeKernelVersion | UpgradeKernelVersion | update | All Resources * | None | None |
adb:DetachUserENI | DetachUserENI | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeSQAConfig | DescribeSQAConfig | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeInclinedTables | DescribeInclinedTables | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:AttachUserENI | AttachUserENI | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeAppliedAdvices | DescribeAppliedAdvices | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:CreateDBCluster | CreateDBCluster | create | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/* | adb:DiskEncryption adb:EnableSSL | None |
adb:DescribeDBClusterResourcePoolPerformance | DescribeDBClusterResourcePoolPerformance | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:EnableAdviceService | EnableAdviceService | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DownloadDiagnosisRecords | DownloadDiagnosisRecords | create | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeDBClusterSSL | DescribeDBClusterSSL | get | All Resources * | None | None |
adb:DescribeAdviceServiceEnabled | DescribeAdviceServiceEnabled | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DeleteDBResourcePool | DeleteDBResourcePool | delete | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:ModifyResubmitConfig | ModifyResubmitConfig | update | All Resources * | None | None |
adb:DisableAdviceService | DisableAdviceService | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeConnectionCountRecords | DescribeConnectionCountRecords | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:ModifyDBClusterMaintainTime | ModifyDBClusterMaintainTime | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:ModifyAccountDescription | ModifyAccountDescription | update | All Resources * | None | None |
adb:ModifyElasticPlan | ModifyElasticPlan | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:BindDBResourcePoolWithUser | BindDBResourcePoolWithUser | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:CreateDBResourceGroup | CreateDBResourceGroup | create | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:ResetAccountPassword | ResetAccountPassword | update | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
adb:DescribeAllAccounts | DescribeAllAccounts | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeTableAccessCount | DescribeTableAccessCount | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeDiagnosisMonitorPerformance | DescribeDiagnosisMonitorPerformance | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:DescribeSQLPlanTask | DescribeSQLPlanTask | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} | None | None |
adb:ListTagResources | ListTagResources | get | DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} | None | None |
Resource
ADB defines the values that you can use in theResource
. You can attach the policy to a RAM user or a RAM role so that the RAM user or the RAM role can perform a specific operation on a specific resource.
The ARN is the unique identifier of the resource on Alibaba Cloud. Take note of the following items:{#}
indicates a variable. {#} must be replaced with an actual value. For example,{#ramcode}
must be replaced with the actual code of an Alibaba Cloud service in RAM.- An asterisk (
*
) is used as a wildcard. Examples:{#resourceType}
is set to*
, all resources are specified.{#regionId}
is set to*
, all regions are specified.{#accountId}
is set to*
, all Alibaba Cloud accounts are specified.
Resource type | ARN |
---|---|
DBCluster | acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} |
DBCluster | acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} |
DBCluster | acs:adb:{#regionId}:{#accountId}:dbcluster/* |
DBClusterLakeVersion | acs:adb:{#Region}:{#AccountId}:dbcluster/{#DBClusterId} |
DBCluster | acs:adb:{#regionId}:{#accountId}:null/* |
DBCluster | acs:adb:*:{#accountId}:dbcluster/{#dbclusterId} |
DBClusterLakeVersion | acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} |
Condition
ADB defines the values that you can use in the
Condition
element of a policy statement. The following table describes the values. The following table describes the service-specific condition keys. The common condition keys that are defined by Alibaba Cloud also apply to ADB. For more information about the common condition keys, see Generic Condition Keyword.The data type determines the conditional operators that you can use to compare the value in a request with the value in a policy statement. You must use conditional operators that are supported by the data type. Otherwise, you cannot compare the value in the request with the value in the policy statement. In this case, the authorization is invalid. For more information about the conditional operators that are supported by each data type, see Policy elements.
Condition key | Description | Data type |
---|---|---|
adb:DiskEncryption | Whether to enable cloud disk encryption | String |
adb:EnableSSL | Whether to enable SSL encryption link | String |