Document Database Service (DDS)
The Organizations service provides Service Control Policies (SCPs) to set access control policies.
SCPs do not actually grant any permissions to a principal. They only set the permissions boundary for the principal. When SCPs are attached to a member account or an organizational unit (OU), they do not directly grant permissions to that member account or OU. Instead, the SCPs just determine what permissions are available for that member account or the member accounts under that OU.
This section describes the elements used by Organizations SCPs. The elements include actions, resources, and conditions.
For details about how to use these elements to create a custom SCP, see Creating an SCP.
Actions
Actions are specific operations that are allowed or denied in an SCP.
- The Access Level column describes how the action is classified (List, Read, or Write). This classification helps you understand the level of access that an action grants when you use it in an SCP.
- The Resource Type column indicates whether the action supports resource-level permissions.
- You can use a wildcard (*) to indicate all resource types. If this column is empty (-), the action does not support resource-level permissions, and you must specify all resources ("*") in your SCP statements.
- If this column includes a resource type, you must specify the URN in the Resource element of your statements.
- Required resources are marked with asterisks (*) in the table. If you specify a resource in a statement using this action, then it must be of this type.
For details about the resource types defined by DDS, see Resources.
- The Condition Key column contains keys that you can specify in the Condition element of an SCP statement.
- If the Resource Type column has values for an action, the condition key takes effect only for the listed resource types.
- If the Resource Type column is empty (-) for an action, the condition key takes effect for all resources that action supports.
- If the Condition Key column is empty (-) for an action, the action does not support any condition keys.
For details about the condition keys defined by DDS, see Conditions.
The following table lists the actions that you can define in SCP statements for DDS.
Action |
Description |
Access Level |
Resource Type (*: required) |
Condition Key |
---|---|---|---|---|
dds:instance:setSsl |
Grants permission to enable or disable SSL. |
permission_management |
instance |
- |
dds:instance:unbindEIP |
Grants permission to unbind an EIP from a DB instance. |
write |
- |
- |
dds:instance:migrateAz |
Grants permission to migrate a DB instance to another AZ. |
write |
- |
- |
dds:instance:listMigrateAz |
Grants permission to query AZs to which an instance can be migrated. |
list |
- |
- |
dds:instance:updateIp |
Grants permission to change the private IP address of a DB instance. |
write |
instance |
- |
dds:instance:bindEIP |
Grants permission to bind an EIP to a DB instance. |
write |
- |
- |
dds:instance:resetPassword |
Grants permission to reset the password of a database user. |
write |
instance |
- |
dds:instance:checkPassword |
Grants permission to check a database password. |
read |
instance |
- |
dds:instance:updatePort |
Grants permission to change a database port. |
write |
instance |
- |
dds:backup:download |
Grants permission to download backups. |
read |
instance |
- |
dds:instance:setAuditLogPolicy |
Grants permission to set a policy for audit logs. |
permission_management |
instance |
- |
dds:instance:getAuditLogPolicy |
Grants permission to query the policy for audit logs. |
list |
instance |
- |
dds:instance:listAuditLog |
Grants permission to query audit logs. |
list |
instance |
- |
dds:instance:listSlowLog |
Grants permission to query slow query logs. |
list |
instance |
- |
dds:instance:downloadSlowLog |
Grants permission to download slow query logs. |
read |
instance |
- |
dds:instance:listErrorLog |
Grants permission to query error logs. |
list |
instance |
- |
dds:instance:downloadErrorLog |
Grants permission to download error logs. |
read |
instance |
- |
dds:configuration:delete |
Grants permission to delete a parameter template. |
write |
- |
g:EnterpriseProjectId |
dds:configuration:update |
Grants permission to modify parameters in a parameter template. |
write |
- |
g:EnterpriseProjectId |
dds:backup:listAll |
Grants permission to query backups. |
list |
- |
- |
dds:instance:updateConfiguration |
Grants permission to modify the parameter template configuration of a DB instance or DB instance node. |
write |
instance |
- |
dds:instance:applyConfiguration |
Grants permission to apply a parameter template to a DB instance or DB instance node. |
write |
- |
- |
dds:instance:createIp |
Grants permission to create an IP address. |
write |
- |
- |
dds:backup:delete |
Grants permission to delete a backup. |
write |
- |
- |
dds:instance:updateSecurityGroup |
Grants permission to change the security group of a DB instance. |
write |
instance |
- |
dds:configuration:listAll |
Grants permission to query parameter templates. |
list |
- |
g:EnterpriseProjectId |
dds:instance:getConfiguration |
Grants permission to query parameters of a specified DB instance. |
read |
instance |
- |
dds:configuration:get |
Grants permission to query details about a parameter template. |
read |
- |
g:EnterpriseProjectId |
dds:instance:updateSpec |
Grants permission to change DB instance specifications. |
write |
instance |
- |
dds:instance:getSecondLevelMonitoringConfig |
Grants permission to query the configuration of Monitoring by Seconds. |
read |
instance |
- |
dds:instance:setSecondLevelMonitoringConfig |
Grants permission to enable Monitoring by Seconds. |
write |
instance |
- |
dds:instance:switchover |
Grants permission to switch over the primary and secondary nodes. |
write |
instance |
- |
dds:instance:extendVolume |
Grants permission to scale up storage space of a DB instance. |
write |
instance |
- |
dds:instance:listAll |
Grants permission to query DB instances. |
list |
- |
- |
dds:instance:setRecyclePolicy |
Grants permission to modify the recycling policy. |
write |
- |
- |
dds:instance:getRecyclePolicy |
Grants permission to query the recycling policy. |
read |
- |
- |
dds:instance:listRecycleInstances |
Grants permission to query DB instances in the recycle bin. |
list |
- |
- |
dds:instance:getUpgradeDuration |
Grants permission to query the estimated database patch upgrade duration. |
read |
instance |
- |
dds:instance:getDiskUsage |
Grants permission to query disk usage. |
read |
instance |
- |
dds:configuration:listAppliedHistory |
Grants permission to query application records of a parameter template. |
list |
- |
- |
dds:configuration:listUpdatedHistory |
Grants permission to query change history of a parameter template. |
list |
- |
- |
dds:configuration:compare |
Grants permission to compare two parameter templates. |
read |
- |
- |
dds:configuration:copy |
Grants permission to replicate a parameter template. |
write |
- |
- |
dds:configuration:reset |
Grants permission to reset a parameter template. |
write |
- |
- |
dds:instance:getSslCertDownloadAddress |
Grants permission to obtain the address for downloading the SSL certificate. |
read |
instance |
- |
dds:instance:addNode |
Grants permission to add nodes for a DB instance. |
write |
instance |
- |
dds:instance:deleteEnlargeFailedNode |
Grants permission to delete an instance node that fails to be added. |
write |
instance |
- |
dds:task:listAll |
Grants permission to query tasks. |
list |
- |
- |
dds:task:getDetail |
Grants permission to query task details. |
read |
- |
- |
dds:instance:restart |
Grants permission to restart a DB instance. |
write |
instance |
- |
dds:instance:deleteAuditLog |
Grants permission to delete audit logs. |
write |
instance |
- |
dds:instance:delete |
Grants permission to delete a DB instance. |
write |
instance |
- |
dds:instance:updateName |
Grants permission to change a DB instance name. |
write |
instance |
- |
dds:instance:updateRemark |
Grants permission to change a DB instance description. |
write |
instance |
- |
dds:instance:setTag |
Grants permission to add or delete tags of a specified DB instance in batches. |
tagging |
instance |
- |
dds:instance:listTags |
Grants permission to query tags of a specified DB instance. |
read |
- |
- |
dds:instance:setBackupPolicy |
Grants permission to configure an automated backup policy. |
write |
- |
dds:BackupEnabled |
dds:instance:getBackupPolicy |
Grants permission to query an automated backup policy. |
read |
- |
- |
dds:configuration:create |
Grants permission to create a parameter template. |
write |
- |
g:EnterpriseProjectId |
dds:instance:setSlowLogPlaintextStatus |
Grants permission to enable or disable Show Original Log. |
permission_management |
instance |
- |
dds:instance:getSlowLogPlaintextStatus |
Grants permission to query the switch of Show Original Log. |
read |
instance |
- |
dds:instance:downloadAuditLog |
Grants permission to download audit logs. |
read |
instance |
- |
dds:instance:create |
Grants permission to create a DB instance. |
write |
- |
dds:Encrypted |
dds:BackupEnabled |
||||
dds:instance:restore |
Grants permission to restore data to the original instance. |
write |
- |
- |
dds:backup:getRestoreTimeList |
Grants permission to query the restoration time range. |
read |
- |
- |
dds:backup:getRestoreCollections |
Grant permission to obtain the list of database collections that can be restored. |
list |
- |
- |
dds:backup:getRestoreDatabases |
Grant permission to obtain the list of databases that can be restored. |
list |
- |
- |
dds:instance:getConnectionStatistics |
Grants permission to query the number of connections to an instance. |
read |
instance |
- |
dds:instance:getQuotas |
Grants permission to query quotas. |
read |
- |
- |
dds:instance:createDatabaseUser |
Grants permission to create a database user. |
write |
instance |
- |
dds:instance:getDatabaseUser |
Grants permission to query database users. |
read |
instance |
- |
dds:instance:deleteDatabaseUser |
Grants permission to delete a database user. |
write |
instance |
- |
dds:instance:createDatabaseRole |
Grants permission to create a database role. |
write |
instance |
- |
dds:instance:deleteDatabaseRole |
Grants permission to delete a database role. |
write |
instance |
- |
dds:instance:getDatabaseRole |
Grants permission to query database roles. |
read |
instance |
- |
dds:instance:setSourceSubnet |
Grants permission to configure network segments. |
write |
instance |
- |
dds:instance:upgradeDatabaseVersion |
Grants permission to upgrade the version of a DB instance. |
write |
instance |
- |
dds:backup:create |
Grants permission to create a manual backup for a DB instance. |
write |
- |
- |
dds:instance:deleteSession |
Grants permission to killing sessions of an instance node. |
write |
- |
- |
dds:instance:listSession |
Grants permission to query sessions of an instance node. |
list |
- |
- |
dds:instance:getShardingBalancer |
Grants permission to query the cluster balancer. |
read |
instance |
- |
dds:instance:setShardingBalancer |
Grants permission to set the cluster balancer. |
write |
instance |
- |
dds:instance:setBalancerWindow |
Grants permission to set the activity time window for DDS cluster balancing. |
write |
instance |
- |
dds:instance:updateOpsWindow |
Grants permission to set the maintenance window of a DB instance. |
write |
instance |
- |
dds:instance:listFlavors |
Grants permission to query specifications. |
read |
- |
- |
dds:instance:listStorageType |
Grants permission to query the database disk type. |
read |
- |
- |
dds:instance:listDatabaseVersion |
Grants permission to query the database version information. |
read |
- |
- |
dds:tag:listAll |
Grants permission to query all tags in a project. |
list |
- |
- |
dds:instance:reduceNode |
Grants permission to delete nodes from a cluster DB instance. |
write |
instance |
- |
dds:instance:createDomainName |
Grants permission to create DNS. |
write |
- |
- |
dds:instance:updateDomainName |
Grants permission to change a DNS name. |
write |
- |
- |
dds:instance:updateReplicaSetName |
Grants permission to change the name of the replica set in the connection address. |
write |
instance |
- |
dds:instance:getDetail |
Grants permission to query instance details. |
read |
instance |
- |
dds:instance:getNodeList |
Grants permission to query instance nodes. |
read |
instance |
- |
dds:instance:updateTag |
Grants permission to change a DB instance tag. |
tagging |
instance |
- |
dds:instance:deleteTag |
Grants permission to delete a DB instance tag. |
tagging |
instance |
- |
dds:backup:get |
Grants permission to query information about a backup. |
read |
- |
- |
dds:offsiteBackup:listRegion |
Grants permission to obtain the remote backup region of a specified instance. |
read |
- |
- |
dds:offsiteBackup:listInstance |
Grants permission to obtain the cross-region backup instance. |
read |
- |
- |
dds:offsiteBackup:listAll |
Grants permission to obtain cross-region backups. |
read |
- |
- |
dds:instance:saveLogConfig |
Grants permission to enable log reporting for DB instances in batches. |
write |
- |
- |
dds:instance:deleteLogConfig |
Grants permission to disable log reporting for DB instances in batches. |
write |
- |
- |
Each API of DDS usually supports one or more actions. Table 2 lists the supported actions and dependencies.
API |
Action |
Dependencies |
---|---|---|
POST /v3/{project_id}/instances |
dds:instance:create vpc:vpcs:list vpc:vpcs:get vpc:subnets:get vpc:securityGroups:get vpc:ports:get |
- |
GET /v3/{project_id}/instances?id={id}&name={name}&mode={mode}&datastore_type={datastore_type}&vpc_id={vpc_id}&subnet_id={subnet_id}&offset={offset}&limit={limit} |
dds:instance:listAll |
- |
DELETE /v3/{project_id}/instances/{instance_id} |
dds:instance:delete |
- |
POST /v3/{project_id}/instances/{instance_id}/restart |
dds:instance:restart |
- |
POST /v3/{project_id}/instances/{instance_id}/enlarge-volume |
dds:instance:extendVolume |
- |
POST /v3/{project_id}/instances/{instance_id}/enlarge |
dds:instance:addNode vpc:vpcs:list vpc:vpcs:get vpc:subnets:get vpc:securityGroups:get vpc:ports:get |
- |
POST /v3/{project_id}/instances/{instance_id}/resize |
dds:instance:updateSpec |
- |
POST /v3/{project_id}/instances/{instance_id}/switchover |
dds:instance:switchover |
- |
POST/v3/{project_id}/instances/{instance_id}/switch-ssl |
dds:instance:setSSL |
- |
PUT /v3/{project_id}/instances/{instance_id}/modify-name |
dds:instance:updateName |
- |
POST /v3/{project_id}/instances/{instance_id}/modify-port |
dds:instance:updatePort |
- |
POST /v3/{project_id}/instances/{instance_id}/modify-security-group |
dds:instance:updateSecurityGroup |
- |
POST /v3/{project_id}/nodes/{node_id}/bind-eip |
dds:instance:bindEIP |
- |
POST /v3/{project_id}/nodes/{node_id}/unbind-eip |
dds:instance:unbindEIP |
- |
POST /v3/{project_id}/instances/{instance_id}/modify-internal-ip |
dds:instance:updateIp |
- |
POST /v3/{project_id}/instances/{instance_id}/create-ip |
dds:instance:createIp |
- |
GET /v3/{project_id}/instances/{instance_id}/migrate/az |
dds:instance:listMigrateAz |
- |
POST /v3/{project_id}/instances/{instance_id}/migrate |
dds:instance:migrateAz |
- |
GET /v3/{project_id}/nodes/{node_id}/sessions |
dds:instance:lisSession |
- |
POST /v3/{project_id}/nodes/{node_id}/session |
dds:instance:deleteSession |
- |
GET /v3/{projectId}/instances/{instance_id}/conn-statistics |
dds:instance:getConnectionStatistics |
- |
POST /v3/{project_id}/backups |
dds:backup:create |
- |
DELETE /v3/{project_id}/backups/{backups_id} |
dds:backup:delete |
- |
GET /v3/{project_id}/backups?instance_id={instance_id}&backup_id={backup_id}&backup_type={backup_type}&offset={offset}&limit={limit}&begin_time={begin_time}&end_time={end_time}&mode={mode} |
dds:backup:listAll |
- |
GET /v3/{project_id}/instances/{instance_id}/backups/policy |
dds:instance:getBackupPolicy |
- |
PUT /v3/{project_id}/instances/{instance_id}/backups/policy |
dds:instance:setBackupPolicy |
- |
POST /v3/{project_id}/instances |
dds:instance:create vpc:vpcs:list vpc:vpcs:get vpc:subnets:get vpc:securityGroups:get vpc:ports:get |
- |
GET /v3/{projectId}/backups/download-file |
dds:backup:download |
- |
GET /v3/{project_id}/instances/{instance_id}/restore-time |
dds:backup:getRestoreTimeList |
- |
GET /v3/{project_id}/instances/{instance_id}/restore-database |
dds:backup:getRestoreDatabases |
- |
GET /v3/{project_id}/instances/{instance_id}/restore-collection |
dds:backup:getRestoreCollections |
- |
POST /v3/{project_id}/instances/recovery |
dds:backup:restore |
- |
POST /v3/{project_id}/instances/{instance_id}/restore/collections |
dds:backup:restore |
- |
GET /v3/{project_id}/configurations |
dds:configuration:listAll |
- |
PUT /v3/{project_id}/configurations |
dds:configuration:create |
- |
DELETE /v3/{project_id}/configurations/{config_id} |
dds:configuration:delete |
- |
GET /v3/{projectId}/configurations/{configId} |
dds:configuration:get |
- |
PUT /v3/{project_id}/configurations/{config_id} |
dds:configuration:update |
- |
PUT /v3/{project_id}/configurations/{config_id}/apply |
dds:instance:applyConfiguration |
- |
GET /v3/{project_id}/instances/{instance_id}/configurations |
dds:instance:getConfiguration |
- |
PUT /v3/{project_id}/instances/{instance_id}/configurations |
dds:instance:updateConfiguration |
- |
GET /v3/{project_id}/instances/{instance_id}/slowlog |
dds:instance:listSlowLog |
- |
POST /v3/{project_id}/instances/{instance_id}/slowlog-download |
dds:instance:downloadSlowLog |
- |
GET /v3/{project_id}/instances/{instance_id}/errorlog |
dds:instance:listErrorLog |
- |
POST /v3/{project_id}/instances/{instance_id}/errorlog-download |
dds:instance:downloadErrorLog |
- |
POST /v3/{project_id}/instances/{instance_id}/auditlog-policy |
dds:instance:setAuditLogPolicy |
- |
GET /v3/{project_id}/instances/{instance_id}/auditlog-policy |
dds:instance:getAuditLogPolicy |
- |
GET /v3/{project_id}/instances/{instance_id}/auditlog |
dds:instance:listAuditLog |
- |
POST /v3/{project_id}/instances/{instance_id}/auditlog-links |
dds:instance:downloadAuditLog |
- |
POST /v3/{project_id}/instances/{instance_id}/tags/action |
dds:instance:setTag |
- |
GET /v3/{project_id}/instances/{instance_id}/tags |
dds:instance:listTags |
- |
POST /v3/{project_id}/instances/{instance_id}/db-user |
dds:instance:createDatabaseUser |
- |
POST /v3/{project_id}/instances/{instance_id}/db-role |
dds:instance:createDatabaseRole |
- |
DELETE /v3/{project_id}/instances/{instance_id}/db-user |
dds:instance:deleteDatabaseUser |
- |
DELETE /v3/{project_id}/instances/{instance_id}/db-role |
dds:instance:deleteDatabaseRole |
- |
PUT /v3/{project_id}/instances/{instance_id}/reset-password |
dds:instance:resetPasswd |
- |
GET /v3/{project_id}/instances/{instance_id}/db-user/detail? offset ={offset}&limit={limit}&user_name={user_name }&db_name={db_name} |
dds:instance:getDatabaseUser |
- |
GET /v3/{project_id}/instances/{instance_id}/db-roles?role_name={role_name}&db_name={db_name}&offset={offset}&limit={limit} |
dds:instance:getDatabaseRole |
- |
GET /v3/{project_id}/instances/{instance_id}/balancer |
dds:instance:getShardingBalancer |
- |
PUT /v3/{project_id}/instances/{instance_id}/balancer/{action} |
dds:instance:setShardingBalancer |
- |
PUT /v3/{project_id}/instances/{instance_id}/balancer/active-window |
dds:instance:setBalancerWindow |
- |
Resources
A resource type indicates the resources that an SCP applies to. If you specify a resource type for any action in Table 3, the resource URN must be specified in the SCP statements using that action, and the SCP applies only to resources of this type. If no resource type is specified, the Resource element is marked with an asterisk (*) and the SCP applies to all resources. You can also set condition keys in an SCP to define resource types.
The following table lists the resource types that you can define in SCP statements for DDS.
Conditions
A Condition element lets you specify conditions for when an SCP is in effect. It contains condition keys and operators.
- The condition key that you specify can be a global condition key or a service-specific condition key.
- Global condition keys (with the g: prefix) apply to all actions. Cloud services do not need to provide user identity information. Instead, the system automatically obtains such information and authenticates users. For details, see Global Condition Keys.
- Service-specific condition keys (with the abbreviation of a service name plus a colon as the prefix, for example, DDS:) only apply to operations of the DDS service. For details, see Table 4.
- The number of values associated with a condition key in the request context of an API call makes the condition key single-valued or multivalued. Single-valued condition keys have at most one value in the request context of an API call. Multivalued condition keys can have multiple values in the request context of an API call. For example, a request can originate from at most one VPC endpoint, so g:SourceVpce is a single-valued condition key. You can tag resources and include multiple tag key-value pairs in a request, so g:TagKeys is a multivalued condition key.
- A condition operator, condition key, and a condition value together constitute a complete condition statement. An SCP can be applied only when its request conditions are met. For supported condition operators, see Condition operators.
The following table lists the condition keys that you can define in SCPs for DDS. You can include these condition keys to specify conditions for when your SCP is in effect.
Service-specific Condition Key |
Type |
Description |
---|---|---|
dds:Encrypted |
boolean |
Filters access by the tag key specifying whether to enable disk encryption transferred in the request parameter. |
dds:BackupEnabled |
boolean |
Filters access by the tag key specifying whether to enable the backup policy transferred in the request parameter. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot