Microsoft.Sql servers/auditingPolicies 2014-04-01

Bicep resource definition

The servers/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/auditingPolicies resource, add the following Bicep to your template.

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

Property values

servers/auditingPolicies

Name Description Value
name The resource name

See how to set names and types for child resources in Bicep.
'default'
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
properties Resource properties. ServerTableAuditingPolicyProperties

ServerTableAuditingPolicyProperties

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

ARM template resource definition

The servers/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/auditingPolicies resource, add the following JSON to your template.

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

Property values

servers/auditingPolicies

Name Description Value
type The resource type 'Microsoft.Sql/servers/auditingPolicies'
apiVersion The resource api version '2014-04-01'
name The resource name

See how to set names and types for child resources in JSON ARM templates.
'default'
properties Resource properties. ServerTableAuditingPolicyProperties

ServerTableAuditingPolicyProperties

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

Terraform (AzAPI provider) resource definition

The servers/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/auditingPolicies resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Sql/servers/auditingPolicies@2014-04-01"
  name = "default"
  parent_id = "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"
    }
  })
}

Property values

servers/auditingPolicies

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

ServerTableAuditingPolicyProperties

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