Querying Permission Check Results
Function
This API is used to query permission check results. It can be called only when the value of permission_check_status is SUCCESS or FAILED.
URI
GET /v1/{project_id}/migration-projects/{migration_project_id}/permission-result
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region. For details about how to obtain the project ID, see Obtaining a Project ID. |
migration_project_id |
Yes |
String |
Migration project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
No |
Integer |
Offset of the pagination query. Minimum value: 0 Maximum value: 99 Default value: 0. |
limit |
No |
Integer |
Number of items displayed per page. Minimum value: 1 Maximum value: 100 Default value: 10 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token obtained from IAM. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total_count |
Integer |
Total number of permission check items. |
passed_permission_items |
Array of Table 5 objects |
Item that passed the permission check. |
alarm_permission_items |
Array of Table 5 objects |
Item for which an alarm was generated. |
failed_permission_items |
Array of Table 5 objects |
Item that failed the permission check. |
passed_count |
Integer |
Number of items that passed the permission check. |
alarm_count |
Integer |
Number of items for which alarms were generated. |
failed_count |
Integer |
Number of items that failed the permission check. |
Parameter |
Type |
Description |
---|---|---|
permission_type |
String |
Permission type. |
schema_name |
String |
Schema name. |
description |
String |
Permission description. |
status |
String |
Whether the item passed the permission check. |
failed_reason |
String |
Failure cause. |
failed_detail |
String |
Failure details. |
suggest_solution |
Array of strings |
Handling suggestions. |
Example Request
Obtaining permission check results
POST https://{endpoint}/v1/0ac6eb2c8000d2ee2fd9c006dededbe6/migration-projects/permission-result?offset=0&limit=2
Example Response
Status code: 200
Request succeeded.
{ "total_count" : 119, "passed_permission_items" : [ { "permission_type" : "MATERIALIZED_VIEW Create Permission", "schema_name" : "SYNTAX_MIG_SCHEMA", "description" : "Permission to Create/Drop MATERIALIZED_VIEW", "status" : "alarm", "failed_reason" : "Permission not found.", "failed_detail" : "User does not have the permission to Create/Drop/Alter TABLE", "suggest_solution" : [ "Provide user with Create/Drop/Alter Privilege, for example:- GRANT CREATE, DROP, ALTER ON *.* TO \"{user}\"@\"{host}\";" ] }, { "permission_type" : "SUPERUSER Privilege", "schema_name" : "", "description" : "Check whether user has the super user privilege", "status" : "alarm", "failed_reason" : "Permission not found.", "failed_detail" : "User does not have Super User privilege", "suggest_solution" : [ "Provide user with Super User Privilege, for example:- GRANT SUPER ON *.* TO \"{user}\"@\"{host}\";" ] } ], "alarm_permission_items" : [ { "permission_type" : "MATERIALIZED_VIEW Create Permission", "schema_name" : "SYNTAX_MIG_SCHEMA", "description" : "Permission to Create/Drop MATERIALIZED_VIEW", "status" : "alarm", "failed_reason" : "Permission not found.", "failed_detail" : "User does not have the permission to Create/Drop/Alter TABLE", "suggest_solution" : [ "Provide user with Create/Drop/Alter Privilege, for example:- GRANT CREATE, DROP, ALTER ON *.* TO \"{user}\"@\"{host}\";" ] }, { "permission_type" : "SUPERUSER Privilege", "schema_name" : "", "description" : "Check whether user has the super user privilege", "status" : "alarm", "failed_reason" : "Permission not found.", "failed_detail" : "User does not have Super User privilege", "suggest_solution" : [ "Provide user with Super User Privilege, for example:- GRANT SUPER ON *.* TO \"{user}\"@\"{host}\";" ] } ], "passed_count" : 116, "alarm_count" : 3 }
Status Codes
Status Code |
Description |
---|---|
200 |
Request succeeded. |
Error Codes
For details, see Error Codes.
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