Edit

Share via


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
itemId
path True

string (uuid)

The item ID.

workspaceId
path True

string (uuid)

The workspace ID.

Request Body

Name Type Description
retentionDays

integer

Retention days.

state

AuditSettingsState

Audit settings state type.

Responses

Name Type Description
200 OK

SqlAuditSettings

Request completed successfully.

429 Too Many Requests

ErrorResponse

The service rate limit was exceeded. The server returns a Retry-After header indicating, in seconds, how long the client must wait before sending additional requests.

Headers

Retry-After: integer

Other Status Codes

ErrorResponse

Common error codes:

  • ItemNotFound - The requested item was not found.

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
AuditSettingsState

Audit settings state. Additional AuditSettingsState may be added over time.

ErrorRelatedResource

The error related resource details object.

ErrorResponse

The error response.

ErrorResponseDetails

The error response details.

SqlAuditSettings

The current state of audit settings for an item.

SqlAuditSettingsUpdate

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

ErrorResponseDetails[]

List of additional error details.

relatedResource

ErrorRelatedResource

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

ErrorRelatedResource

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

AuditSettingsState

Audit settings state type.

SqlAuditSettingsUpdate

Audit settings update request.

Name Type Default value Description
retentionDays

integer

0

Retention days.

state

AuditSettingsState

Audit settings state type.