Microsoft.Web sites/slots/config 'logs'

Bicep resource definition

The sites/slots/config resource type can be deployed to:

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

Options for name property

The sites/slots/config resource accepts different properties based on the value of the name property. This article shows the properties that are available when you set name: 'logs'.

For other options, see:

Resource format

To create a Microsoft.Web/sites/slots/config resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Web/sites/slots/config@2022-03-01' = {
  name: 'logs'
  kind: 'string'
  parent: resourceSymbolicName
  properties: {
    applicationLogs: {
      azureBlobStorage: {
        level: 'string'
        retentionInDays: int
        sasUrl: 'string'
      }
      azureTableStorage: {
        level: 'string'
        sasUrl: 'string'
      }
      fileSystem: {
        level: 'string'
      }
    }
    detailedErrorMessages: {
      enabled: bool
    }
    failedRequestsTracing: {
      enabled: bool
    }
    httpLogs: {
      azureBlobStorage: {
        enabled: bool
        retentionInDays: int
        sasUrl: 'string'
      }
      fileSystem: {
        enabled: bool
        retentionInDays: int
        retentionInMb: int
      }
    }
  }
}

Property values

sites/slots/config-logs

Name Description Value
name The resource name

See how to set names and types for child resources in Bicep.
'logs'
kind Kind of resource. string
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: slots
properties SiteLogsConfig resource specific properties SiteLogsConfigProperties

SiteLogsConfigProperties

Name Description Value
applicationLogs Application logs configuration. ApplicationLogsConfig
detailedErrorMessages Detailed error messages configuration. EnabledConfig
failedRequestsTracing Failed requests tracing configuration. EnabledConfig
httpLogs HTTP logs configuration. HttpLogsConfig

ApplicationLogsConfig

Name Description Value
azureBlobStorage Application logs to blob storage configuration. AzureBlobStorageApplicationLogsConfig
azureTableStorage Application logs to azure table storage configuration. AzureTableStorageApplicationLogsConfig
fileSystem Application logs to file system configuration. FileSystemApplicationLogsConfig

AzureBlobStorageApplicationLogsConfig

Name Description Value
level Log level. 'Error'
'Information'
'Off'
'Verbose'
'Warning'
retentionInDays Retention in days.
Remove blobs older than X days.
0 or lower means no retention.
int
sasUrl SAS url to a azure blob container with read/write/list/delete permissions. string

AzureTableStorageApplicationLogsConfig

Name Description Value
level Log level. 'Error'
'Information'
'Off'
'Verbose'
'Warning'
sasUrl SAS URL to an Azure table with add/query/delete permissions. string (required)

FileSystemApplicationLogsConfig

Name Description Value
level Log level. 'Error'
'Information'
'Off'
'Verbose'
'Warning'

EnabledConfig

Name Description Value
enabled True if configuration is enabled, false if it is disabled and null if configuration is not set. bool

HttpLogsConfig

Name Description Value
azureBlobStorage Http logs to azure blob storage configuration. AzureBlobStorageHttpLogsConfig
fileSystem Http logs to file system configuration. FileSystemHttpLogsConfig

AzureBlobStorageHttpLogsConfig

Name Description Value
enabled True if configuration is enabled, false if it is disabled and null if configuration is not set. bool
retentionInDays Retention in days.
Remove blobs older than X days.
0 or lower means no retention.
int
sasUrl SAS url to a azure blob container with read/write/list/delete permissions. string

FileSystemHttpLogsConfig

Name Description Value
enabled True if configuration is enabled, false if it is disabled and null if configuration is not set. bool
retentionInDays Retention in days.
Remove files older than X days.
0 or lower means no retention.
int
retentionInMb Maximum size in megabytes that http log files can use.
When reached old log files will be removed to make space for new ones.
Value can range between 25 and 100.
int

ARM template resource definition

The sites/slots/config resource type can be deployed to:

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

Options for name property

The sites/slots/config resource accepts different properties based on the value of the name property. This article shows the properties that are available when you set name: 'logs'.

For other options, see:

Resource format

To create a Microsoft.Web/sites/slots/config resource, add the following JSON to your template.

{
  "type": "Microsoft.Web/sites/slots/config",
  "apiVersion": "2022-03-01",
  "name": "logs",
  "kind": "string",
  "properties": {
    "applicationLogs": {
      "azureBlobStorage": {
        "level": "string",
        "retentionInDays": "int",
        "sasUrl": "string"
      },
      "azureTableStorage": {
        "level": "string",
        "sasUrl": "string"
      },
      "fileSystem": {
        "level": "string"
      }
    },
    "detailedErrorMessages": {
      "enabled": "bool"
    },
    "failedRequestsTracing": {
      "enabled": "bool"
    },
    "httpLogs": {
      "azureBlobStorage": {
        "enabled": "bool",
        "retentionInDays": "int",
        "sasUrl": "string"
      },
      "fileSystem": {
        "enabled": "bool",
        "retentionInDays": "int",
        "retentionInMb": "int"
      }
    }
  }
}

Property values

sites/slots/config-logs

Name Description Value
type The resource type 'Microsoft.Web/sites/slots/config'
apiVersion The resource api version '2022-03-01'
name The resource name

See how to set names and types for child resources in JSON ARM templates.
'logs'
kind Kind of resource. string
properties SiteLogsConfig resource specific properties SiteLogsConfigProperties

SiteLogsConfigProperties

Name Description Value
applicationLogs Application logs configuration. ApplicationLogsConfig
detailedErrorMessages Detailed error messages configuration. EnabledConfig
failedRequestsTracing Failed requests tracing configuration. EnabledConfig
httpLogs HTTP logs configuration. HttpLogsConfig

ApplicationLogsConfig

Name Description Value
azureBlobStorage Application logs to blob storage configuration. AzureBlobStorageApplicationLogsConfig
azureTableStorage Application logs to azure table storage configuration. AzureTableStorageApplicationLogsConfig
fileSystem Application logs to file system configuration. FileSystemApplicationLogsConfig

AzureBlobStorageApplicationLogsConfig

Name Description Value
level Log level. 'Error'
'Information'
'Off'
'Verbose'
'Warning'
retentionInDays Retention in days.
Remove blobs older than X days.
0 or lower means no retention.
int
sasUrl SAS url to a azure blob container with read/write/list/delete permissions. string

AzureTableStorageApplicationLogsConfig

Name Description Value
level Log level. 'Error'
'Information'
'Off'
'Verbose'
'Warning'
sasUrl SAS URL to an Azure table with add/query/delete permissions. string (required)

FileSystemApplicationLogsConfig

Name Description Value
level Log level. 'Error'
'Information'
'Off'
'Verbose'
'Warning'

EnabledConfig

Name Description Value
enabled True if configuration is enabled, false if it is disabled and null if configuration is not set. bool

HttpLogsConfig

Name Description Value
azureBlobStorage Http logs to azure blob storage configuration. AzureBlobStorageHttpLogsConfig
fileSystem Http logs to file system configuration. FileSystemHttpLogsConfig

AzureBlobStorageHttpLogsConfig

Name Description Value
enabled True if configuration is enabled, false if it is disabled and null if configuration is not set. bool
retentionInDays Retention in days.
Remove blobs older than X days.
0 or lower means no retention.
int
sasUrl SAS url to a azure blob container with read/write/list/delete permissions. string

FileSystemHttpLogsConfig

Name Description Value
enabled True if configuration is enabled, false if it is disabled and null if configuration is not set. bool
retentionInDays Retention in days.
Remove files older than X days.
0 or lower means no retention.
int
retentionInMb Maximum size in megabytes that http log files can use.
When reached old log files will be removed to make space for new ones.
Value can range between 25 and 100.
int

Terraform (AzAPI provider) resource definition

The sites/slots/config resource type can be deployed to:

  • Resource groups

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

Options for name property

The sites/slots/config resource accepts different properties based on the value of the name property. This article shows the properties that are available when you set name: 'logs'.

For other options, see:

Resource format

To create a Microsoft.Web/sites/slots/config resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Web/sites/slots/config@2022-03-01"
  name = "logs"
  parent_id = "string"
  body = jsonencode({
    properties = {
      applicationLogs = {
        azureBlobStorage = {
          level = "string"
          retentionInDays = int
          sasUrl = "string"
        }
        azureTableStorage = {
          level = "string"
          sasUrl = "string"
        }
        fileSystem = {
          level = "string"
        }
      }
      detailedErrorMessages = {
        enabled = bool
      }
      failedRequestsTracing = {
        enabled = bool
      }
      httpLogs = {
        azureBlobStorage = {
          enabled = bool
          retentionInDays = int
          sasUrl = "string"
        }
        fileSystem = {
          enabled = bool
          retentionInDays = int
          retentionInMb = int
        }
      }
    }
    kind = "string"
  })
}

Property values

sites/slots/config-logs

Name Description Value
type The resource type "Microsoft.Web/sites/slots/config@2022-03-01"
name The resource name "logs"
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: slots
kind Kind of resource. string
properties SiteLogsConfig resource specific properties SiteLogsConfigProperties

SiteLogsConfigProperties

Name Description Value
applicationLogs Application logs configuration. ApplicationLogsConfig
detailedErrorMessages Detailed error messages configuration. EnabledConfig
failedRequestsTracing Failed requests tracing configuration. EnabledConfig
httpLogs HTTP logs configuration. HttpLogsConfig

ApplicationLogsConfig

Name Description Value
azureBlobStorage Application logs to blob storage configuration. AzureBlobStorageApplicationLogsConfig
azureTableStorage Application logs to azure table storage configuration. AzureTableStorageApplicationLogsConfig
fileSystem Application logs to file system configuration. FileSystemApplicationLogsConfig

AzureBlobStorageApplicationLogsConfig

Name Description Value
level Log level. "Error"
"Information"
"Off"
"Verbose"
"Warning"
retentionInDays Retention in days.
Remove blobs older than X days.
0 or lower means no retention.
int
sasUrl SAS url to a azure blob container with read/write/list/delete permissions. string

AzureTableStorageApplicationLogsConfig

Name Description Value
level Log level. "Error"
"Information"
"Off"
"Verbose"
"Warning"
sasUrl SAS URL to an Azure table with add/query/delete permissions. string (required)

FileSystemApplicationLogsConfig

Name Description Value
level Log level. "Error"
"Information"
"Off"
"Verbose"
"Warning"

EnabledConfig

Name Description Value
enabled True if configuration is enabled, false if it is disabled and null if configuration is not set. bool

HttpLogsConfig

Name Description Value
azureBlobStorage Http logs to azure blob storage configuration. AzureBlobStorageHttpLogsConfig
fileSystem Http logs to file system configuration. FileSystemHttpLogsConfig

AzureBlobStorageHttpLogsConfig

Name Description Value
enabled True if configuration is enabled, false if it is disabled and null if configuration is not set. bool
retentionInDays Retention in days.
Remove blobs older than X days.
0 or lower means no retention.
int
sasUrl SAS url to a azure blob container with read/write/list/delete permissions. string

FileSystemHttpLogsConfig

Name Description Value
enabled True if configuration is enabled, false if it is disabled and null if configuration is not set. bool
retentionInDays Retention in days.
Remove files older than X days.
0 or lower means no retention.
int
retentionInMb Maximum size in megabytes that http log files can use.
When reached old log files will be removed to make space for new ones.
Value can range between 25 and 100.
int