View database access permissions

Request

Method Request URI
GET https://management.chinacloudapi.cn/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.MySql/servers/{server-name}/databases/{database-name}/privileges/{user-name}?api-version=2015-09-01

URI parameters

None

Request header

Request header Describe URI
x-ms-client-request-id Optional. An opaque value generated by the client, not to exceed 1KB of characters. We strongly recommend setting this value, so that the server can use it to obtain the client’s activity information.

Request body

None

Response

An HTTPS response comprises a status code, a response header and a response body.

Status code

200 OK: Indicates that the server has returned successfully.

Response header

Request header Describe URI
x-ms-client-request-id Can uniquely identify the database request value. The request ID is used to track the request information.

Response body

An example JavaScript Object Notation (JSON) file is provided below:

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.MySql/servers/{server-name}/databases/{database-name}/privileges/{user-name}",
  "name": "{server-name}/{database-name}/{user-name}",
  "type": "Microsoft.MySql/servers/databases/privileges",
  "properties": { "canWrite": false }
}
Parameter name Description
canwrite Read/write permissions, wherein “false” indicates read-only and “true” indicates read and write.