Microsoft.Sql servers/databases/auditingSettings 2015-05-01-preview

Template format

To create a Microsoft.Sql/servers/databases/auditingSettings resource, add the following JSON to the resources section of your template.

  "name": "string",
  "type": "Microsoft.Sql/servers/databases/auditingSettings",
  "apiVersion": "2015-05-01-preview",
  "properties": {
    "state": "string",
    "storageEndpoint": "string",
    "storageAccountAccessKey": "string",
    "retentionDays": "integer",
    "auditActionsAndGroups": [
    "storageAccountSubscriptionId": "string",
    "isStorageSecondaryKeyInUse": "boolean"

Property values

The following tables describe the values you need to set in the schema.

Microsoft.Sql/servers/databases/auditingSettings object

Name Type Required Value
name string Yes The name of the blob auditing policy.
type enum Yes auditingSettings

See Set name and type for child resources.
apiVersion enum Yes 2015-05-01-preview
properties object Yes Resource properties. - DatabaseBlobAuditingPolicyProperties object

DatabaseBlobAuditingPolicyProperties object

Name Type Required Value
state enum Yes Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required. - Enabled or Disabled
storageEndpoint string No Specifies the blob storage endpoint (e.g. If state is Enabled, storageEndpoint is required.
storageAccountAccessKey string No Specifies the identifier key of the auditing storage account. If state is Enabled, storageAccountAccessKey is required.
retentionDays integer No Specifies the number of days to keep in the audit logs.
auditActionsAndGroups array No Specifies the Actions and Actions-Groups to audit. - string
storageAccountSubscriptionId string No Specifies the blob storage subscription Id. - globally unique identifier
isStorageSecondaryKeyInUse boolean No Specifies whether storageAccountAccessKey value is the storage’s secondary key.