Microsoft.Sql servers/databases/auditingPolicies 2014-04-01

Bicep resource definition

The servers/databases/auditingPolicies resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Sql/servers/databases/auditingPolicies resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Sql/servers/databases/auditingPolicies@2014-04-01' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    auditingState: 'string'
    auditLogsTableName: 'string'
    eventTypesToAudit: 'string'
    fullAuditLogsTableName: 'string'
    retentionDays: 'string'
    storageAccountKey: 'string'
    storageAccountName: 'string'
    storageAccountResourceGroupName: 'string'
    storageAccountSecondaryKey: 'string'
    storageAccountSubscriptionId: 'string'
    storageTableEndpoint: 'string'
    useServerDefault: 'string'
  }
}

Property values

DatabaseTableAuditingPolicyProperties

Name Description Value
auditingState The state of the policy. string
auditLogsTableName The audit logs table name. string
eventTypesToAudit Comma-separated list of event types to audit. string
fullAuditLogsTableName The full audit logs table name. string
retentionDays The number of days to keep in the audit logs. string
storageAccountKey The key of the auditing storage account. string
storageAccountName The table storage account name string
storageAccountResourceGroupName The table storage account resource group name string
storageAccountSecondaryKey The secondary key of the auditing storage account. string
storageAccountSubscriptionId The table storage subscription Id. string

Constraints:
Min length = 36
Max length = 36
Pattern = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
storageTableEndpoint The storage table endpoint. string
useServerDefault Whether server default is enabled or disabled. string

Microsoft.Sql/servers/databases/auditingPolicies

Name Description Value
name The resource name 'default' (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: servers/databases
properties Resource properties. DatabaseTableAuditingPolicyProperties

ARM template resource definition

The servers/databases/auditingPolicies resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Sql/servers/databases/auditingPolicies resource, add the following JSON to your template.

{
  "type": "Microsoft.Sql/servers/databases/auditingPolicies",
  "apiVersion": "2014-04-01",
  "name": "string",
  "properties": {
    "auditingState": "string",
    "auditLogsTableName": "string",
    "eventTypesToAudit": "string",
    "fullAuditLogsTableName": "string",
    "retentionDays": "string",
    "storageAccountKey": "string",
    "storageAccountName": "string",
    "storageAccountResourceGroupName": "string",
    "storageAccountSecondaryKey": "string",
    "storageAccountSubscriptionId": "string",
    "storageTableEndpoint": "string",
    "useServerDefault": "string"
  }
}

Property values

DatabaseTableAuditingPolicyProperties

Name Description Value
auditingState The state of the policy. string
auditLogsTableName The audit logs table name. string
eventTypesToAudit Comma-separated list of event types to audit. string
fullAuditLogsTableName The full audit logs table name. string
retentionDays The number of days to keep in the audit logs. string
storageAccountKey The key of the auditing storage account. string
storageAccountName The table storage account name string
storageAccountResourceGroupName The table storage account resource group name string
storageAccountSecondaryKey The secondary key of the auditing storage account. string
storageAccountSubscriptionId The table storage subscription Id. string

Constraints:
Min length = 36
Max length = 36
Pattern = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
storageTableEndpoint The storage table endpoint. string
useServerDefault Whether server default is enabled or disabled. string

Microsoft.Sql/servers/databases/auditingPolicies

Name Description Value
apiVersion The api version '2014-04-01'
name The resource name 'default' (required)
properties Resource properties. DatabaseTableAuditingPolicyProperties
type The resource type 'Microsoft.Sql/servers/databases/auditingPolicies'

Terraform (AzAPI provider) resource definition

The servers/databases/auditingPolicies resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Sql/servers/databases/auditingPolicies resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Sql/servers/databases/auditingPolicies@2014-04-01"
  name = "string"
  body = jsonencode({
    properties = {
      auditingState = "string"
      auditLogsTableName = "string"
      eventTypesToAudit = "string"
      fullAuditLogsTableName = "string"
      retentionDays = "string"
      storageAccountKey = "string"
      storageAccountName = "string"
      storageAccountResourceGroupName = "string"
      storageAccountSecondaryKey = "string"
      storageAccountSubscriptionId = "string"
      storageTableEndpoint = "string"
      useServerDefault = "string"
    }
  })
}

Property values

DatabaseTableAuditingPolicyProperties

Name Description Value
auditingState The state of the policy. string
auditLogsTableName The audit logs table name. string
eventTypesToAudit Comma-separated list of event types to audit. string
fullAuditLogsTableName The full audit logs table name. string
retentionDays The number of days to keep in the audit logs. string
storageAccountKey The key of the auditing storage account. string
storageAccountName The table storage account name string
storageAccountResourceGroupName The table storage account resource group name string
storageAccountSecondaryKey The secondary key of the auditing storage account. string
storageAccountSubscriptionId The table storage subscription Id. string

Constraints:
Min length = 36
Max length = 36
Pattern = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
storageTableEndpoint The storage table endpoint. string
useServerDefault Whether server default is enabled or disabled. string

Microsoft.Sql/servers/databases/auditingPolicies

Name Description Value
name The resource name 'default' (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: servers/databases
properties Resource properties. DatabaseTableAuditingPolicyProperties
type The resource type "Microsoft.Sql/servers/databases/auditingPolicies@2014-04-01"