SQL Audit Settings - Update SQL Audit Settings
Update settings associated with the warehouse.
Permissions
The caller must have audit item permission.
Required Delegated Scopes
Item.Audit.All
Microsoft Entra supported identities
This API supports the Microsoft identities listed in this section.
| Identity | Support |
|---|---|
| User | Yes |
| Service principal and Managed identities | Yes |
Interface
PATCH https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/warehouses/{itemId}/settings/sqlAudit
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
item
|
path | True |
string (uuid) |
The item ID. |
|
workspace
|
path | True |
string (uuid) |
The workspace ID. |
Request Body
| Name | Type | Description |
|---|---|---|
| retentionDays |
integer |
Retention days. |
| state |
Audit settings state type. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Request completed successfully. |
|
| 429 Too Many Requests |
The service rate limit was exceeded. The server returns a Headers Retry-After: integer |
|
| Other Status Codes |
Common error codes:
|
Examples
Update SQL Audit Settings
Sample request
PATCH https://api.fabric.microsoft.com/v1/workspaces/a97f3e88-9f0a-4183-b1d9-31e6eb00e778/warehouses/70bcc992-a346-4f21-afe5-8b9ed1596a2b/settings/sqlAudit
{
"state": "Enabled",
"retentionDays": 10
}
Sample response
{
"state": "Enabled",
"retentionDays": 10,
"auditActionsAndGroups": [
"SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"
]
}
Definitions
| Name | Description |
|---|---|
|
Audit |
Audit settings state. Additional AuditSettingsState may be added over time. |
|
Error |
The error related resource details object. |
|
Error |
The error response. |
|
Error |
The error response details. |
|
Sql |
The current state of audit settings for an item. |
|
Sql |
Audit settings update request. |
AuditSettingsState
Audit settings state. Additional AuditSettingsState may be added over time.
| Value | Description |
|---|---|
| Enabled |
Enable the SQL audit. |
| Disabled |
Disable the SQL audit. |
ErrorRelatedResource
The error related resource details object.
| Name | Type | Description |
|---|---|---|
| resourceId |
string |
The resource ID that's involved in the error. |
| resourceType |
string |
The type of the resource that's involved in the error. |
ErrorResponse
The error response.
| Name | Type | Description |
|---|---|---|
| errorCode |
string |
A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users. |
| message |
string |
A human readable representation of the error. |
| moreDetails |
List of additional error details. |
|
| relatedResource |
The error related resource details. |
|
| requestId |
string (uuid) |
ID of the request associated with the error. |
ErrorResponseDetails
The error response details.
| Name | Type | Description |
|---|---|---|
| errorCode |
string |
A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users. |
| message |
string |
A human readable representation of the error. |
| relatedResource |
The error related resource details. |
SqlAuditSettings
The current state of audit settings for an item.
| Name | Type | Description |
|---|---|---|
| auditActionsAndGroups |
string[] |
Audit actions and groups. |
| retentionDays |
integer |
Retention days. 0 indicates indefinite retention period. |
| state |
Audit settings state type. |
SqlAuditSettingsUpdate
Audit settings update request.
| Name | Type | Default value | Description |
|---|---|---|---|
| retentionDays |
integer |
0 |
Retention days. |
| state |
Audit settings state type. |