Server Table Auditing Policies - List By Server

Lists a server's table auditing policies. Table auditing is deprecated, use blob auditing instead.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingPolicies?api-version=2014-04-01

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

serverName
path True

string

The name of the server.

subscriptionId
path True

string

The subscription ID that identifies an Azure subscription.

api-version
query True

string

The API version to use for the request.

Responses

Name Type Description
200 OK

ServerTableAuditingPolicyListResult

Successfully retrieved the server table auditing policies.

Examples

List server table auditing policy

Sample request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/auditingPolicies?api-version=2014-04-01

Sample response

{
  "value": [
    {
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb/auditingPolicies/Default",
      "name": "Default",
      "type": "Microsoft.Sql/servers/databases/auditingPolicies",
      "location": "West US",
      "kind": null,
      "properties": {
        "auditingState": "New",
        "eventTypesToAudit": "PlainSQL_Success,PlainSQL_Failure,ParameterizedSQL_Success,ParameterizedSQL_Failure,StoredProcedure_Success,StoredProcedure_Failure,Login_Success,Login_Failure,TransactionManagement_Success,TransactionManagement_Failure",
        "storageAccountName": null,
        "storageAccountKey": null,
        "storageAccountSecondaryKey": null,
        "storageTableEndpoint": null,
        "storageAccountResourceGroupName": null,
        "storageAccountSubscriptionId": null,
        "fullAuditLogsTableName": "SQLDBAuditLogsBlobauditingtest2080",
        "auditLogsTableName": "Blobauditingtest2080",
        "retentionDays": "0"
      }
    }
  ]
}

Definitions

Name Description
ServerTableAuditingPolicy

A server table auditing policy.

ServerTableAuditingPolicyListResult

Represents the response to a list server table auditing policies request.

ServerTableAuditingPolicy

A server table auditing policy.

Name Type Description
id

string

Resource ID.

kind

string

Resource kind.

location

string

Resource location.

name

string

Resource name.

properties.auditLogsTableName

string

The audit logs table name.

properties.auditingState

string

The state of the policy.

properties.eventTypesToAudit

string

Comma-separated list of event types to audit.

properties.fullAuditLogsTableName

string

The full audit logs table name.

properties.retentionDays

string

The number of days to keep in the audit logs.

properties.storageAccountKey

string

The key of the auditing storage account.

properties.storageAccountName

string

The table storage account name

properties.storageAccountResourceGroupName

string

The table storage account resource group name

properties.storageAccountSecondaryKey

string

The secondary key of the auditing storage account.

properties.storageAccountSubscriptionId

string

The table storage subscription Id.

properties.storageTableEndpoint

string

The storage table endpoint.

type

string

Resource type.

ServerTableAuditingPolicyListResult

Represents the response to a list server table auditing policies request.

Name Type Description
value

ServerTableAuditingPolicy[]

The list of server table auditing policies.