Microsoft.Web sites/slots/config

Template format

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

{
  "name": "web",
  "type": "Microsoft.Web/sites/slots/config",
  "apiVersion": "2020-06-01",
  "kind": "string",
  "properties": {
    "numberOfWorkers": "integer",
    "defaultDocuments": [
      "string"
    ],
    "netFrameworkVersion": "string",
    "phpVersion": "string",
    "pythonVersion": "string",
    "nodeVersion": "string",
    "powerShellVersion": "string",
    "linuxFxVersion": "string",
    "windowsFxVersion": "string",
    "requestTracingEnabled": "boolean",
    "requestTracingExpirationTime": "string",
    "remoteDebuggingEnabled": "boolean",
    "remoteDebuggingVersion": "string",
    "httpLoggingEnabled": "boolean",
    "logsDirectorySizeLimit": "integer",
    "detailedErrorLoggingEnabled": "boolean",
    "publishingUsername": "string",
    "appSettings": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "connectionStrings": [
      {
        "name": "string",
        "connectionString": "string",
        "type": "string"
      }
    ],
    "handlerMappings": [
      {
        "extension": "string",
        "scriptProcessor": "string",
        "arguments": "string"
      }
    ],
    "documentRoot": "string",
    "scmType": "string",
    "use32BitWorkerProcess": "boolean",
    "webSocketsEnabled": "boolean",
    "alwaysOn": "boolean",
    "javaVersion": "string",
    "javaContainer": "string",
    "javaContainerVersion": "string",
    "appCommandLine": "string",
    "managedPipelineMode": "string",
    "virtualApplications": [
      {
        "virtualPath": "string",
        "physicalPath": "string",
        "preloadEnabled": "boolean",
        "virtualDirectories": [
          {
            "virtualPath": "string",
            "physicalPath": "string"
          }
        ]
      }
    ],
    "loadBalancing": "string",
    "experiments": {
      "rampUpRules": [
        {
          "actionHostName": "string",
          "reroutePercentage": "number",
          "changeStep": "number",
          "changeIntervalInMinutes": "integer",
          "minReroutePercentage": "number",
          "maxReroutePercentage": "number",
          "changeDecisionCallbackUrl": "string",
          "name": "string"
        }
      ]
    },
    "limits": {
      "maxPercentageCpu": "number",
      "maxMemoryInMb": "integer",
      "maxDiskSizeInMb": "integer"
    },
    "autoHealEnabled": "boolean",
    "autoHealRules": {
      "triggers": {
        "requests": {
          "count": "integer",
          "timeInterval": "string"
        },
        "privateBytesInKB": "integer",
        "statusCodes": [
          {
            "status": "integer",
            "subStatus": "integer",
            "win32Status": "integer",
            "count": "integer",
            "timeInterval": "string"
          }
        ],
        "slowRequests": {
          "timeTaken": "string",
          "count": "integer",
          "timeInterval": "string"
        }
      },
      "actions": {
        "actionType": "string",
        "customAction": {
          "exe": "string",
          "parameters": "string"
        },
        "minProcessExecutionTime": "string"
      }
    },
    "tracingOptions": "string",
    "vnetName": "string",
    "vnetRouteAllEnabled": "boolean",
    "vnetPrivatePortsCount": "integer",
    "cors": {
      "allowedOrigins": [
        "string"
      ],
      "supportCredentials": "boolean"
    },
    "push": {
      "kind": "string",
      "properties": {
        "isPushEnabled": "boolean",
        "tagWhitelistJson": "string",
        "tagsRequiringAuth": "string",
        "dynamicTagsJson": "string"
      }
    },
    "apiDefinition": {
      "url": "string"
    },
    "apiManagementConfig": {
      "id": "string"
    },
    "autoSwapSlotName": "string",
    "localMySqlEnabled": "boolean",
    "managedServiceIdentityId": "integer",
    "xManagedServiceIdentityId": "integer",
    "ipSecurityRestrictions": [
      {
        "ipAddress": "string",
        "subnetMask": "string",
        "vnetSubnetResourceId": "string",
        "action": "string",
        "tag": "string",
        "priority": "integer",
        "name": "string",
        "description": "string",
        "headers": {}
      }
    ],
    "scmIpSecurityRestrictions": [
      {
        "ipAddress": "string",
        "subnetMask": "string",
        "vnetSubnetResourceId": "string",
        "action": "string",
        "tag": "string",
        "priority": "integer",
        "name": "string",
        "description": "string",
        "headers": {}
      }
    ],
    "scmIpSecurityRestrictionsUseMain": "boolean",
    "http20Enabled": "boolean",
    "minTlsVersion": "string",
    "scmMinTlsVersion": "string",
    "ftpsState": "string",
    "preWarmedInstanceCount": "integer",
    "healthCheckPath": "string"
  }
}

Property values

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

Microsoft.Web/sites/slots/config object

Name Type Required Value
name string Yes web
-or-
{site-name}/{slot-name}/web
type enum Yes config
-or-
Microsoft.Web/sites/slots/config

See Set name and type for child resources.
apiVersion enum Yes 2020-06-01
kind string No Kind of resource.
properties object Yes Core resource properties - SiteConfig object

SiteConfig object

Name Type Required Value
numberOfWorkers integer No Number of workers.
defaultDocuments array No Default documents. - string
netFrameworkVersion string No .NET Framework version.
phpVersion string No Version of PHP.
pythonVersion string No Version of Python.
nodeVersion string No Version of Node.js.
powerShellVersion string No Version of PowerShell.
linuxFxVersion string No Linux App Framework and version
windowsFxVersion string No Xenon App Framework and version
requestTracingEnabled boolean No true if request tracing is enabled; otherwise, false.
requestTracingExpirationTime string No Request tracing expiration time.
remoteDebuggingEnabled boolean No true if remote debugging is enabled; otherwise, false.
remoteDebuggingVersion string No Remote debugging version.
httpLoggingEnabled boolean No true if HTTP logging is enabled; otherwise, false.
logsDirectorySizeLimit integer No HTTP logs directory size limit.
detailedErrorLoggingEnabled boolean No true if detailed error logging is enabled; otherwise, false.
publishingUsername string No Publishing user name.
appSettings array No Application settings. - NameValuePair object
connectionStrings array No Connection strings. - ConnStringInfo object
handlerMappings array No Handler mappings. - HandlerMapping object
documentRoot string No Document root.
scmType enum No SCM type. - None, Dropbox, Tfs, LocalGit, GitHub, CodePlexGit, CodePlexHg, BitbucketGit, BitbucketHg, ExternalGit, ExternalHg, OneDrive, VSO, VSTSRM
use32BitWorkerProcess boolean No true to use 32-bit worker process; otherwise, false.
webSocketsEnabled boolean No true if WebSocket is enabled; otherwise, false.
alwaysOn boolean No true if Always On is enabled; otherwise, false.
javaVersion string No Java version.
javaContainer string No Java container.
javaContainerVersion string No Java container version.
appCommandLine string No App command line to launch.
managedPipelineMode enum No Managed pipeline mode. - Integrated or Classic
virtualApplications array No Virtual applications. - VirtualApplication object
loadBalancing enum No Site load balancing. - WeightedRoundRobin, LeastRequests, LeastResponseTime, WeightedTotalTraffic, RequestHash
experiments object No This is work around for polymorphic types. - Experiments object
limits object No Site limits. - SiteLimits object
autoHealEnabled boolean No true if Auto Heal is enabled; otherwise, false.
autoHealRules object No Auto Heal rules. - AutoHealRules object
tracingOptions string No Tracing options.
vnetName string No Virtual Network name.
vnetRouteAllEnabled boolean No Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied.
vnetPrivatePortsCount integer No The number of private ports assigned to this app. These will be assigned dynamically on runtime.
cors object No Cross-Origin Resource Sharing (CORS) settings. - CorsSettings object
push object No Push endpoint settings. - PushSettings object
apiDefinition object No Information about the formal API definition for the app. - ApiDefinitionInfo object
apiManagementConfig object No Azure API management settings linked to the app. - ApiManagementConfig object
autoSwapSlotName string No Auto-swap slot name.
localMySqlEnabled boolean No true to enable local MySQL; otherwise, false.
managedServiceIdentityId integer No Managed Service Identity Id
xManagedServiceIdentityId integer No Explicit Managed Service Identity Id
ipSecurityRestrictions array No IP security restrictions for main. - IpSecurityRestriction object
scmIpSecurityRestrictions array No IP security restrictions for scm. - IpSecurityRestriction object
scmIpSecurityRestrictionsUseMain boolean No IP security restrictions for scm to use main.
http20Enabled boolean No Http20Enabled: configures a web site to allow clients to connect over http2.0
minTlsVersion enum No MinTlsVersion: configures the minimum version of TLS required for SSL requests. - 1.0, 1.1, 1.2
scmMinTlsVersion enum No ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. - 1.0, 1.1, 1.2
ftpsState enum No State of FTP / FTPS service. - AllAllowed, FtpsOnly, Disabled
preWarmedInstanceCount integer No Number of preWarmed instances.This setting only applies to the Consumption and Elastic Plans
healthCheckPath string No Health check path

NameValuePair object

Name Type Required Value
name string No Pair name.
value string No Pair value.

ConnStringInfo object

Name Type Required Value
name string No Name of connection string.
connectionString string No Connection string value.
type enum No Type of database. - MySql, SQLServer, SQLAzure, Custom, NotificationHub, ServiceBus, EventHub, ApiHub, DocDb, RedisCache, PostgreSQL

HandlerMapping object

Name Type Required Value
extension string No Requests with this extension will be handled using the specified FastCGI application.
scriptProcessor string No The absolute path to the FastCGI application.
arguments string No Command-line arguments to be passed to the script processor.

VirtualApplication object

Name Type Required Value
virtualPath string No Virtual path.
physicalPath string No Physical path.
preloadEnabled boolean No true if preloading is enabled; otherwise, false.
virtualDirectories array No Virtual directories for virtual application. - VirtualDirectory object

Experiments object

Name Type Required Value
rampUpRules array No List of ramp-up rules. - RampUpRule object

SiteLimits object

Name Type Required Value
maxPercentageCpu number No Maximum allowed CPU usage percentage.
maxMemoryInMb integer No Maximum allowed memory usage in MB.
maxDiskSizeInMb integer No Maximum allowed disk size usage in MB.

AutoHealRules object

Name Type Required Value
triggers object No Conditions that describe when to execute the auto-heal actions. - AutoHealTriggers object
actions object No Actions to be executed when a rule is triggered. - AutoHealActions object

CorsSettings object

Name Type Required Value
allowedOrigins array No Gets or sets the list of origins that should be allowed to make cross-origincalls (for example: http://example.com:12345). Use "*" to allow all. - string
supportCredentials boolean No Gets or sets whether CORS requests with credentials are allowed. See https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentialsfor more details.

PushSettings object

Name Type Required Value
kind string No Kind of resource.
properties object No PushSettings resource specific properties - PushSettingsProperties object

ApiDefinitionInfo object

Name Type Required Value
url string No The URL of the API definition.

ApiManagementConfig object

Name Type Required Value
id string No APIM-Api Identifier.

IpSecurityRestriction object

Name Type Required Value
ipAddress string No IP address the security restriction is valid for.It can be in form of pure ipv4 address (required SubnetMask property) orCIDR notation such as ipv4/mask (leading bit match). For CIDR,SubnetMask property must not be specified.
subnetMask string No Subnet mask for the range of IP addresses the restriction is valid for.
vnetSubnetResourceId string No Virtual network resource id
action string No Allow or Deny access for this IP range.
priority integer No Priority of IP restriction rule.
name string No IP restriction rule name.
description string No IP restriction rule description.
headers object No IP restriction rule headers.X-Forwarded-Host (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples). The matching logic is ..- If the property is null or empty (default), all hosts(or lack of) are allowed.- A value is compared using ordinal-ignore-case (excluding port number).- Subdomain wildcards are permitted but don't match the root domain. For example, *.contoso.com matches the subdomain foo.contoso.com but not the root domain contoso.com or multi-level foo.bar.contoso.com- Unicode host names are allowed but are converted to Punycode for matching.X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples).The matching logic is ..- If the property is null or empty (default), any forwarded-for chains (or lack of) are allowed.- If any address (excluding port number) in the chain (comma separated) matches the CIDR defined by the property.X-Azure-FDID and X-FD-HealthProbe.The matching logic is exact match.

VirtualDirectory object

Name Type Required Value
virtualPath string No Path to virtual application.
physicalPath string No Physical path.

RampUpRule object

Name Type Required Value
actionHostName string No Hostname of a slot to which the traffic will be redirected if decided to. E.g. myapp-stage.azurewebsites.net.
reroutePercentage number No Percentage of the traffic which will be redirected to ActionHostName.
changeStep number No In auto ramp up scenario this is the step to add/remove from ReroutePercentage until it reaches \nMinReroutePercentage or MaxReroutePercentage. Site metrics are checked every N minutes specified in ChangeIntervalInMinutes.\nCustom decision algorithm can be provided in TiPCallback site extension which URL can be specified in ChangeDecisionCallbackUrl.
changeIntervalInMinutes integer No Specifies interval in minutes to reevaluate ReroutePercentage.
minReroutePercentage number No Specifies lower boundary above which ReroutePercentage will stay.
maxReroutePercentage number No Specifies upper boundary below which ReroutePercentage will stay.
changeDecisionCallbackUrl string No Custom decision algorithm can be provided in TiPCallback site extension which URL can be specified. See TiPCallback site extension for the scaffold and contracts.https://www.siteextensions.net/packages/TiPCallback/
name string No Name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment.

AutoHealTriggers object

Name Type Required Value
requests object No A rule based on total requests. - RequestsBasedTrigger object
privateBytesInKB integer No A rule based on private bytes.
statusCodes array No A rule based on status codes. - StatusCodesBasedTrigger object
slowRequests object No A rule based on request execution time. - SlowRequestsBasedTrigger object

AutoHealActions object

Name Type Required Value
actionType enum No Predefined action to be taken. - Recycle, LogEvent, CustomAction
customAction object No Custom action to be taken. - AutoHealCustomAction object
minProcessExecutionTime string No Minimum time the process must executebefore taking the action

PushSettingsProperties object

Name Type Required Value
isPushEnabled boolean Yes Gets or sets a flag indicating whether the Push endpoint is enabled.
tagWhitelistJson string No Gets or sets a JSON string containing a list of tags that are whitelisted for use by the push registration endpoint.
tagsRequiringAuth string No Gets or sets a JSON string containing a list of tags that require user authentication to be used in the push registration endpoint.Tags can consist of alphanumeric characters and the following:'_', '@', '#', '.', ':', '-'. Validation should be performed at the PushRequestHandler.
dynamicTagsJson string No Gets or sets a JSON string containing a list of dynamic tags that will be evaluated from user claims in the push registration endpoint.

RequestsBasedTrigger object

Name Type Required Value
count integer No Request Count.
timeInterval string No Time interval.

StatusCodesBasedTrigger object

Name Type Required Value
status integer No HTTP status code.
subStatus integer No Request Sub Status.
win32Status integer No Win32 error code.
count integer No Request Count.
timeInterval string No Time interval.

SlowRequestsBasedTrigger object

Name Type Required Value
timeTaken string No Time taken.
count integer No Request Count.
timeInterval string No Time interval.

AutoHealCustomAction object

Name Type Required Value
exe string No Executable to be run.
parameters string No Parameters for the executable.