Update Role Module Permissions
Updates the module permission configuration of a specified role.
Request URL: /openapi/v1/role/module/update
Request Method: POST
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| roleId | String | Yes | Role ID. You can call List Roles to obtain it. | 2394 |
| permissionList | Array | No | List of module permissions. See permissionList Fields below. | [{...}] |
permissionList Fields
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| action | String | Yes | Module permission action identifier. Please refer to action Values below. | SQLEditor |
| access | Boolean | Yes | Whether to grant the permission. true means grant and false means revoke. | true |
action Values
| action | Display Name |
|---|---|
| SQLEditor | SQL Editor |
| DSQL | DSQL |
| SQLTask | SQL Task |
| SQLReview | SQL Review |
| DataImport | Data Import |
| DataExport | Data Export |
| DataArchive | Data Archive |
| DataTrack | Data Tracking |
| SlowLog | Slow Log Analysis |
| DataGenerate | Data Generation |
| Backup | Backup |
| Restore | Restore |
| BackupSet | Backup Set |
| BackupQuery | Backup Data Query |
| Replication | Data Replication |
| DataCompare | Data Comparison |
| SchemaCompare | Schema Comparison |
| DataSource | Data Source |
| PolicyProcess | Process and Policy |
| SensitiveData | Sensitive Data Management |
| Monitor | O&M Monitoring |
| Audit | Audit Log |
| DatabaseVersion | Database Version Management |
| OpsTask | O&M Center Task Management |
| OpsCluster | O&M Cluster Management |
| OpsNode | O&M Node Management |
| OpsPod | O&M Pod Management |
Request Example
{
"roleId": "2394",
"permissionList": [
{
"action": "SQLTask",
"access": true
},
{
"action": "DataExport",
"access": false
},
{
"action": "Monitor",
"access": true
}
]
}
Response Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| success | Boolean | Whether the request is successful. | true |
| requestId | String | Request ID. | Nf5u0BQS-bhhhfLQnedcq0AGdeco3LPI |
Successful Invocation Example
{
"success": true,
"requestId": "Nf5u0BQS-bhhhfLQnedcq0AGdeco3LPI"
}