Microsoft.Web sites/slots/config 'backup' 2020-10-01

Bicep resource definition

The sites/slots/config resource type can be deployed with operations that target:

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: 'backup'.

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@2020-10-01' = {
  name: 'backup'
  kind: 'string'
  parent: resourceSymbolicName
  properties: {
    backupName: 'string'
    backupSchedule: {
      frequencyInterval: int
      frequencyUnit: 'string'
      keepAtLeastOneBackup: bool
      retentionPeriodInDays: int
      startTime: 'string'
    }
    databases: [
      {
        connectionString: 'string'
        connectionStringName: 'string'
        databaseType: 'string'
        name: 'string'
      }
    ]
    enabled: bool
    storageAccountUrl: 'string'
  }
}

Property values

sites/slots/config-backup

Name Description Value
name The resource name

See how to set names and types for child resources in Bicep.
'backup'
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 BackupRequest resource specific properties BackupRequestProperties

BackupRequestProperties

Name Description Value
backupName Name of the backup. string
backupSchedule Schedule for the backup if it is executed periodically. BackupSchedule
databases Databases included in the backup. DatabaseBackupSetting[]
enabled True if the backup schedule is enabled (must be included in that case), false if the backup schedule should be disabled. bool
storageAccountUrl SAS URL to the container. string (required)

BackupSchedule

Name Description Value
frequencyInterval How often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day) int (required)
frequencyUnit The unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7) 'Day'
'Hour' (required)
keepAtLeastOneBackup True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise. bool (required)
retentionPeriodInDays After how many days backups should be deleted. int (required)
startTime When the schedule should start working. string

DatabaseBackupSetting

Name Description Value
connectionString Contains a connection string to a database which is being backed up or restored. If the restore should happen to a new database, the database name inside is the new one. string
connectionStringName Contains a connection string name that is linked to the SiteConfig.ConnectionStrings.
This is used during restore with overwrite connection strings options.
string
databaseType Database type (e.g. SqlAzure / MySql). 'LocalMySql'
'MySql'
'PostgreSql'
'SqlAzure' (required)
name string

ARM template resource definition

The sites/slots/config resource type can be deployed with operations that target:

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: 'backup'.

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": "2020-10-01",
  "name": "backup",
  "kind": "string",
  "properties": {
    "backupName": "string",
    "backupSchedule": {
      "frequencyInterval": "int",
      "frequencyUnit": "string",
      "keepAtLeastOneBackup": "bool",
      "retentionPeriodInDays": "int",
      "startTime": "string"
    },
    "databases": [
      {
        "connectionString": "string",
        "connectionStringName": "string",
        "databaseType": "string",
        "name": "string"
      }
    ],
    "enabled": "bool",
    "storageAccountUrl": "string"
  }
}

Property values

sites/slots/config-backup

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

See how to set names and types for child resources in JSON ARM templates.
'backup'
kind Kind of resource. string
properties BackupRequest resource specific properties BackupRequestProperties

BackupRequestProperties

Name Description Value
backupName Name of the backup. string
backupSchedule Schedule for the backup if it is executed periodically. BackupSchedule
databases Databases included in the backup. DatabaseBackupSetting[]
enabled True if the backup schedule is enabled (must be included in that case), false if the backup schedule should be disabled. bool
storageAccountUrl SAS URL to the container. string (required)

BackupSchedule

Name Description Value
frequencyInterval How often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day) int (required)
frequencyUnit The unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7) 'Day'
'Hour' (required)
keepAtLeastOneBackup True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise. bool (required)
retentionPeriodInDays After how many days backups should be deleted. int (required)
startTime When the schedule should start working. string

DatabaseBackupSetting

Name Description Value
connectionString Contains a connection string to a database which is being backed up or restored. If the restore should happen to a new database, the database name inside is the new one. string
connectionStringName Contains a connection string name that is linked to the SiteConfig.ConnectionStrings.
This is used during restore with overwrite connection strings options.
string
databaseType Database type (e.g. SqlAzure / MySql). 'LocalMySql'
'MySql'
'PostgreSql'
'SqlAzure' (required)
name string

Terraform (AzAPI provider) resource definition

The sites/slots/config resource type can be deployed with operations that target:

  • 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: 'backup'.

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@2020-10-01"
  name = "backup"
  parent_id = "string"
  body = jsonencode({
    properties = {
      backupName = "string"
      backupSchedule = {
        frequencyInterval = int
        frequencyUnit = "string"
        keepAtLeastOneBackup = bool
        retentionPeriodInDays = int
        startTime = "string"
      }
      databases = [
        {
          connectionString = "string"
          connectionStringName = "string"
          databaseType = "string"
          name = "string"
        }
      ]
      enabled = bool
      storageAccountUrl = "string"
    }
    kind = "string"
  })
}

Property values

sites/slots/config-backup

Name Description Value
type The resource type "Microsoft.Web/sites/slots/config@2020-10-01"
name The resource name "backup"
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 BackupRequest resource specific properties BackupRequestProperties

BackupRequestProperties

Name Description Value
backupName Name of the backup. string
backupSchedule Schedule for the backup if it is executed periodically. BackupSchedule
databases Databases included in the backup. DatabaseBackupSetting[]
enabled True if the backup schedule is enabled (must be included in that case), false if the backup schedule should be disabled. bool
storageAccountUrl SAS URL to the container. string (required)

BackupSchedule

Name Description Value
frequencyInterval How often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day) int (required)
frequencyUnit The unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7) "Day"
"Hour" (required)
keepAtLeastOneBackup True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise. bool (required)
retentionPeriodInDays After how many days backups should be deleted. int (required)
startTime When the schedule should start working. string

DatabaseBackupSetting

Name Description Value
connectionString Contains a connection string to a database which is being backed up or restored. If the restore should happen to a new database, the database name inside is the new one. string
connectionStringName Contains a connection string name that is linked to the SiteConfig.ConnectionStrings.
This is used during restore with overwrite connection strings options.
string
databaseType Database type (e.g. SqlAzure / MySql). "LocalMySql"
"MySql"
"PostgreSql"
"SqlAzure" (required)
name string