Microsoft.Web sites/slots 2015-08-01
Bicep resource definition
The sites/slots resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Web/sites/slots resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Web/sites/slots@2015-08-01' = {
kind: 'string'
location: 'string'
name: 'string'
properties: {
clientAffinityEnabled: bool
clientCertEnabled: bool
cloningInfo: {
appSettingsOverrides: {
{customized property}: 'string'
}
cloneCustomHostNames: bool
cloneSourceControl: bool
configureLoadBalancing: bool
correlationId: 'string'
hostingEnvironment: 'string'
overwrite: bool
sourceWebAppId: 'string'
trafficManagerProfileId: 'string'
trafficManagerProfileName: 'string'
}
containerSize: int
enabled: bool
gatewaySiteName: 'string'
hostingEnvironmentProfile: {
id: 'string'
name: 'string'
type: 'string'
}
hostNamesDisabled: bool
hostNameSslStates: [
{
name: 'string'
sslState: 'string'
thumbprint: 'string'
toUpdate: bool
virtualIP: 'string'
}
]
maxNumberOfWorkers: int
microService: 'string'
name: 'string'
scmSiteAlsoStopped: bool
serverFarmId: 'string'
siteConfig: {
id: 'string'
kind: 'string'
location: 'string'
name: 'string'
properties: {
alwaysOn: bool
apiDefinition: {
url: 'string'
}
appCommandLine: 'string'
appSettings: [
{
name: 'string'
value: 'string'
}
]
autoHealEnabled: bool
autoHealRules: {
actions: {
actionType: 'string'
customAction: {
exe: 'string'
parameters: 'string'
}
minProcessExecutionTime: 'string'
}
triggers: {
privateBytesInKB: int
requests: {
count: int
timeInterval: 'string'
}
slowRequests: {
count: int
timeInterval: 'string'
timeTaken: 'string'
}
statusCodes: [
{
count: int
status: int
subStatus: int
timeInterval: 'string'
win32Status: int
}
]
}
}
autoSwapSlotName: 'string'
connectionStrings: [
{
connectionString: 'string'
name: 'string'
type: 'string'
}
]
cors: {
allowedOrigins: [
'string'
]
}
defaultDocuments: [
'string'
]
detailedErrorLoggingEnabled: bool
documentRoot: 'string'
experiments: {
rampUpRules: [
{
actionHostName: 'string'
changeDecisionCallbackUrl: 'string'
changeIntervalInMinutes: int
changeStep: int
maxReroutePercentage: int
minReroutePercentage: int
name: 'string'
reroutePercentage: int
}
]
}
handlerMappings: [
{
arguments: 'string'
extension: 'string'
scriptProcessor: 'string'
}
]
httpLoggingEnabled: bool
ipSecurityRestrictions: [
{
ipAddress: 'string'
subnetMask: 'string'
}
]
javaContainer: 'string'
javaContainerVersion: 'string'
javaVersion: 'string'
limits: {
maxDiskSizeInMb: int
maxMemoryInMb: int
maxPercentageCpu: int
}
loadBalancing: 'string'
localMySqlEnabled: bool
logsDirectorySizeLimit: int
managedPipelineMode: 'string'
metadata: [
{
name: 'string'
value: 'string'
}
]
netFrameworkVersion: 'string'
nodeVersion: 'string'
numberOfWorkers: int
phpVersion: 'string'
publishingPassword: 'string'
publishingUsername: 'string'
pythonVersion: 'string'
remoteDebuggingEnabled: bool
remoteDebuggingVersion: 'string'
requestTracingEnabled: bool
requestTracingExpirationTime: 'string'
scmType: 'string'
tracingOptions: 'string'
use32BitWorkerProcess: bool
virtualApplications: [
{
physicalPath: 'string'
preloadEnabled: bool
virtualDirectories: [
{
physicalPath: 'string'
virtualPath: 'string'
}
]
virtualPath: 'string'
}
]
vnetName: 'string'
webSocketsEnabled: bool
}
tags: {
{customized property}: 'string'
}
type: 'string'
}
}
tags: {
{customized property}: 'string'
}
}
Property values
ApiDefinitionInfo
Name | Description | Value |
---|---|---|
url | The URL of the API definition. | string |
AutoHealActions
Name | Description | Value |
---|---|---|
actionType | ActionType - predefined action to be taken | 'CustomAction' 'LogEvent' 'Recycle' (required) |
customAction | CustomAction - custom action to be taken | AutoHealCustomAction |
minProcessExecutionTime | MinProcessExecutionTime - minimum time the process must execute before taking the action |
string |
AutoHealCustomAction
Name | Description | Value |
---|---|---|
exe | Executable to be run | string |
parameters | Parameters for the executable | string |
AutoHealRules
Name | Description | Value |
---|---|---|
actions | Actions - Actions to be executed when a rule is triggered | AutoHealActions |
triggers | Triggers - Conditions that describe when to execute the auto-heal actions | AutoHealTriggers |
AutoHealTriggers
Name | Description | Value |
---|---|---|
privateBytesInKB | PrivateBytesInKB - Defines a rule based on private bytes | int |
requests | Requests - Defines a rule based on total requests | RequestsBasedTrigger |
slowRequests | SlowRequests - Defines a rule based on request execution time | SlowRequestsBasedTrigger |
statusCodes | StatusCodes - Defines a rule based on status codes | StatusCodesBasedTrigger[] |
CloningInfo
Name | Description | Value |
---|---|---|
appSettingsOverrides | Application settings overrides for cloned web app. If specified these settings will override the settings cloned from source web app. If not specified, application settings from source web app are retained. |
CloningInfoAppSettingsOverrides |
cloneCustomHostNames | If true, clone custom hostnames from source web app | bool |
cloneSourceControl | Clone source control from source web app | bool |
configureLoadBalancing | If specified configure load balancing for source and clone site | bool |
correlationId | Correlation Id of cloning operation. This id ties multiple cloning operations together to use the same snapshot |
string |
hostingEnvironment | Hosting environment | string |
overwrite | Overwrite destination web app | bool |
sourceWebAppId | ARM resource id of the source web app. Web app resource id is of the form /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} for production slots and /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} for other slots |
string |
trafficManagerProfileId | ARM resource id of the traffic manager profile to use if it exists. Traffic manager resource id is of the form /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName} |
string |
trafficManagerProfileName | Name of traffic manager profile to create. This is only needed if traffic manager profile does not already exist | string |
CloningInfoAppSettingsOverrides
Name | Description | Value |
---|
ConnStringInfo
Name | Description | Value |
---|---|---|
connectionString | Connection string value | string |
name | Name of connection string | string |
type | Type of database | 'Custom' 'MySql' 'SQLAzure' 'SQLServer' (required) |
CorsSettings
Name | Description | Value |
---|---|---|
allowedOrigins | Gets or sets the list of origins that should be allowed to make cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. |
string[] |
Experiments
Name | Description | Value |
---|---|---|
rampUpRules | List of {Microsoft.Web.Hosting.Administration.RampUpRule} objects. | RampUpRule[] |
HandlerMapping
Name | Description | Value |
---|---|---|
arguments | Command-line arguments to be passed to the script processor. | string |
extension | Requests with this extension will be handled using the specified FastCGI application. | string |
scriptProcessor | The absolute path to the FastCGI application. | string |
HostingEnvironmentProfile
Name | Description | Value |
---|---|---|
id | Resource id of the hostingEnvironment (App Service Environment) | string |
name | Name of the hostingEnvironment (App Service Environment) (read only) | string |
type | Resource type of the hostingEnvironment (App Service Environment) (read only) | string |
HostNameSslState
Name | Description | Value |
---|---|---|
name | Host name | string |
sslState | SSL type | 'Disabled' 'IpBasedEnabled' 'SniEnabled' (required) |
thumbprint | SSL cert thumbprint | string |
toUpdate | Set this flag to update existing host name | bool |
virtualIP | Virtual IP address assigned to the host name if IP based SSL is enabled | string |
IpSecurityRestriction
Name | Description | Value |
---|---|---|
ipAddress | IP address the security restriction is valid for | string |
subnetMask | Subnet mask for the range of IP addresses the restriction is valid for | string |
Microsoft.Web/sites/slots
Name | Description | Value |
---|---|---|
kind | Kind of resource | string |
location | Resource Location | string (required) |
name | The resource name | string (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: sites |
properties | SiteProperties | |
tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
NameValuePair
Name | Description | Value |
---|---|---|
name | Pair name | string |
value | Pair value | string |
RampUpRule
Name | Description | Value |
---|---|---|
actionHostName | Hostname of a slot to which the traffic will be redirected if decided to. E.g. mysite-stage.azurewebsites.net | string |
changeDecisionCallbackUrl | 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/ |
string |
changeIntervalInMinutes | [Optional] Specifies interval in minutes to reevaluate ReroutePercentage | int |
changeStep | [Optional] In auto ramp up scenario this is the step to add/remove from {Microsoft.Web.Hosting.Administration.RampUpRule.ReroutePercentage} until it reaches {Microsoft.Web.Hosting.Administration.RampUpRule.MinReroutePercentage} or {Microsoft.Web.Hosting.Administration.RampUpRule.MaxReroutePercentage}. Site metrics are checked every N minutes specified in {Microsoft.Web.Hosting.Administration.RampUpRule.ChangeIntervalInMinutes}. Custom decision algorithm can be provided in TiPCallback site extension which Url can be specified in {Microsoft.Web.Hosting.Administration.RampUpRule.ChangeDecisionCallbackUrl} |
int |
maxReroutePercentage | [Optional] Specifies upper boundary below which ReroutePercentage will stay. | int |
minReroutePercentage | [Optional] Specifies lower boundary above which ReroutePercentage will stay. | int |
name | Name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment. | string |
reroutePercentage | Percentage of the traffic which will be redirected to {Microsoft.Web.Hosting.Administration.RampUpRule.ActionHostName} | int |
RequestsBasedTrigger
Name | Description | Value |
---|---|---|
count | Count | int |
timeInterval | TimeInterval | string |
ResourceTags
Name | Description | Value |
---|
ResourceTags
Name | Description | Value |
---|
SiteConfig
Name | Description | Value |
---|---|---|
id | Resource Id | string |
kind | Kind of resource | string |
location | Resource Location | string (required) |
name | Resource Name | string |
properties | SiteConfigProperties | |
tags | Resource tags | ResourceTags |
type | Resource type | string |
SiteConfigProperties
Name | Description | Value |
---|---|---|
alwaysOn | Always On | bool |
apiDefinition | Information about the formal API definition for the web app. | ApiDefinitionInfo |
appCommandLine | App Command Line to launch | string |
appSettings | Application Settings | NameValuePair[] |
autoHealEnabled | Auto heal enabled | bool |
autoHealRules | Auto heal rules | AutoHealRules |
autoSwapSlotName | Auto swap slot name | string |
connectionStrings | Connection strings | ConnStringInfo[] |
cors | Cross-Origin Resource Sharing (CORS) settings. | CorsSettings |
defaultDocuments | Default documents | string[] |
detailedErrorLoggingEnabled | Detailed error logging enabled | bool |
documentRoot | Document root | string |
experiments | This is work around for polymorphic types | Experiments |
handlerMappings | Handler mappings | HandlerMapping[] |
httpLoggingEnabled | HTTP logging Enabled | bool |
ipSecurityRestrictions | Ip Security restrictions | IpSecurityRestriction[] |
javaContainer | Java container | string |
javaContainerVersion | Java container version | string |
javaVersion | Java version | string |
limits | Site limits | SiteLimits |
loadBalancing | Site load balancing | 'LeastRequests' 'LeastResponseTime' 'RequestHash' 'WeightedRoundRobin' 'WeightedTotalTraffic' |
localMySqlEnabled | Local mysql enabled | bool |
logsDirectorySizeLimit | HTTP Logs Directory size limit | int |
managedPipelineMode | Managed pipeline mode | 'Classic' 'Integrated' |
metadata | Site Metadata | NameValuePair[] |
netFrameworkVersion | Net Framework Version | string |
nodeVersion | Version of Node | string |
numberOfWorkers | Number of workers | int |
phpVersion | Version of PHP | string |
publishingPassword | Publishing password | string |
publishingUsername | Publishing user name | string |
pythonVersion | Version of Python | string |
remoteDebuggingEnabled | Remote Debugging Enabled | bool |
remoteDebuggingVersion | Remote Debugging Version | string |
requestTracingEnabled | Enable request tracing | bool |
requestTracingExpirationTime | Request tracing expiration time | string |
scmType | SCM type | string |
tracingOptions | Tracing options | string |
use32BitWorkerProcess | Use 32 bit worker process | bool |
virtualApplications | Virtual applications | VirtualApplication[] |
vnetName | Vnet name | string |
webSocketsEnabled | Web socket enabled. | bool |
SiteLimits
Name | Description | Value |
---|---|---|
maxDiskSizeInMb | Maximum allowed disk size usage in MB | int |
maxMemoryInMb | Maximum allowed memory usage in MB | int |
maxPercentageCpu | Maximum allowed CPU usage percentage | int |
SiteProperties
Name | Description | Value |
---|---|---|
clientAffinityEnabled | Specifies if the client affinity is enabled when load balancing http request for multiple instances of the web app | bool |
clientCertEnabled | Specifies if the client certificate is enabled for the web app | bool |
cloningInfo | This is only valid for web app creation. If specified, web app is cloned from a source web app |
CloningInfo |
containerSize | Size of a function container | int |
enabled | True if the site is enabled; otherwise, false. Setting this value to false disables the site (takes the site off line). | bool |
gatewaySiteName | Name of gateway app associated with web app | string |
hostingEnvironmentProfile | Specification for the hosting environment (App Service Environment) to use for the web app | HostingEnvironmentProfile |
hostNamesDisabled | Specifies if the public hostnames are disabled the web app. If set to true the app is only accessible via API Management process |
bool |
hostNameSslStates | Hostname SSL states are used to manage the SSL bindings for site's hostnames. | HostNameSslState[] |
maxNumberOfWorkers | Maximum number of workers This only applies to function container |
int |
microService | string | |
name | Name of web app | string |
scmSiteAlsoStopped | If set indicates whether to stop SCM (KUDU) site when the web app is stopped. Default is false. | bool |
serverFarmId | string | |
siteConfig | Configuration of web app | SiteConfig |
SlowRequestsBasedTrigger
Name | Description | Value |
---|---|---|
count | Count | int |
timeInterval | TimeInterval | string |
timeTaken | TimeTaken | string |
StatusCodesBasedTrigger
Name | Description | Value |
---|---|---|
count | Count | int |
status | HTTP status code | int |
subStatus | SubStatus | int |
timeInterval | TimeInterval | string |
win32Status | Win32 error code | int |
VirtualApplication
Name | Description | Value |
---|---|---|
physicalPath | string | |
preloadEnabled | bool | |
virtualDirectories | VirtualDirectory[] | |
virtualPath | string |
VirtualDirectory
Name | Description | Value |
---|---|---|
physicalPath | string | |
virtualPath | string |
Quickstart samples
The following quickstart samples deploy this resource type.
Bicep File | Description |
---|---|
Azure Function App with a Deployment Slot | This template provisions a function app on a Premium plan with production slot and an additional deployment slot. |
Highly Available Multi-region Web App | This template allows you to create a secure, highly available, multi-region end to end solution with two web apps in different regions behind Azure Front Door |
Provision Consumption plan function with a Deployment Slot | This template provisions a function app on a Consumption plan, which is a dynamic hosting plan. The app runs on demand and you're billed per execution, with no standing resource committment. There are other templates available for provisioning on a dedicated hosting plan. |
Secure N-tier Web App | This template allows you to create a secure end to end solution with two web apps with staging slots, front end and back end, front end will consume securely the back through VNet injection and Private Endpoint |
ARM template resource definition
The sites/slots resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Web/sites/slots resource, add the following JSON to your template.
{
"type": "Microsoft.Web/sites/slots",
"apiVersion": "2015-08-01",
"name": "string",
"kind": "string",
"location": "string",
"properties": {
"clientAffinityEnabled": "bool",
"clientCertEnabled": "bool",
"cloningInfo": {
"appSettingsOverrides": {
"{customized property}": "string"
},
"cloneCustomHostNames": "bool",
"cloneSourceControl": "bool",
"configureLoadBalancing": "bool",
"correlationId": "string",
"hostingEnvironment": "string",
"overwrite": "bool",
"sourceWebAppId": "string",
"trafficManagerProfileId": "string",
"trafficManagerProfileName": "string"
},
"containerSize": "int",
"enabled": "bool",
"gatewaySiteName": "string",
"hostingEnvironmentProfile": {
"id": "string",
"name": "string",
"type": "string"
},
"hostNamesDisabled": "bool",
"hostNameSslStates": [
{
"name": "string",
"sslState": "string",
"thumbprint": "string",
"toUpdate": "bool",
"virtualIP": "string"
}
],
"maxNumberOfWorkers": "int",
"microService": "string",
"name": "string",
"scmSiteAlsoStopped": "bool",
"serverFarmId": "string",
"siteConfig": {
"id": "string",
"kind": "string",
"location": "string",
"name": "string",
"properties": {
"alwaysOn": "bool",
"apiDefinition": {
"url": "string"
},
"appCommandLine": "string",
"appSettings": [
{
"name": "string",
"value": "string"
}
],
"autoHealEnabled": "bool",
"autoHealRules": {
"actions": {
"actionType": "string",
"customAction": {
"exe": "string",
"parameters": "string"
},
"minProcessExecutionTime": "string"
},
"triggers": {
"privateBytesInKB": "int",
"requests": {
"count": "int",
"timeInterval": "string"
},
"slowRequests": {
"count": "int",
"timeInterval": "string",
"timeTaken": "string"
},
"statusCodes": [
{
"count": "int",
"status": "int",
"subStatus": "int",
"timeInterval": "string",
"win32Status": "int"
}
]
}
},
"autoSwapSlotName": "string",
"connectionStrings": [
{
"connectionString": "string",
"name": "string",
"type": "string"
}
],
"cors": {
"allowedOrigins": [ "string" ]
},
"defaultDocuments": [ "string" ],
"detailedErrorLoggingEnabled": "bool",
"documentRoot": "string",
"experiments": {
"rampUpRules": [
{
"actionHostName": "string",
"changeDecisionCallbackUrl": "string",
"changeIntervalInMinutes": "int",
"changeStep": "int",
"maxReroutePercentage": "int",
"minReroutePercentage": "int",
"name": "string",
"reroutePercentage": "int"
}
]
},
"handlerMappings": [
{
"arguments": "string",
"extension": "string",
"scriptProcessor": "string"
}
],
"httpLoggingEnabled": "bool",
"ipSecurityRestrictions": [
{
"ipAddress": "string",
"subnetMask": "string"
}
],
"javaContainer": "string",
"javaContainerVersion": "string",
"javaVersion": "string",
"limits": {
"maxDiskSizeInMb": "int",
"maxMemoryInMb": "int",
"maxPercentageCpu": "int"
},
"loadBalancing": "string",
"localMySqlEnabled": "bool",
"logsDirectorySizeLimit": "int",
"managedPipelineMode": "string",
"metadata": [
{
"name": "string",
"value": "string"
}
],
"netFrameworkVersion": "string",
"nodeVersion": "string",
"numberOfWorkers": "int",
"phpVersion": "string",
"publishingPassword": "string",
"publishingUsername": "string",
"pythonVersion": "string",
"remoteDebuggingEnabled": "bool",
"remoteDebuggingVersion": "string",
"requestTracingEnabled": "bool",
"requestTracingExpirationTime": "string",
"scmType": "string",
"tracingOptions": "string",
"use32BitWorkerProcess": "bool",
"virtualApplications": [
{
"physicalPath": "string",
"preloadEnabled": "bool",
"virtualDirectories": [
{
"physicalPath": "string",
"virtualPath": "string"
}
],
"virtualPath": "string"
}
],
"vnetName": "string",
"webSocketsEnabled": "bool"
},
"tags": {
"{customized property}": "string"
},
"type": "string"
}
},
"tags": {
"{customized property}": "string"
}
}
Property values
ApiDefinitionInfo
Name | Description | Value |
---|---|---|
url | The URL of the API definition. | string |
AutoHealActions
Name | Description | Value |
---|---|---|
actionType | ActionType - predefined action to be taken | 'CustomAction' 'LogEvent' 'Recycle' (required) |
customAction | CustomAction - custom action to be taken | AutoHealCustomAction |
minProcessExecutionTime | MinProcessExecutionTime - minimum time the process must execute before taking the action |
string |
AutoHealCustomAction
Name | Description | Value |
---|---|---|
exe | Executable to be run | string |
parameters | Parameters for the executable | string |
AutoHealRules
Name | Description | Value |
---|---|---|
actions | Actions - Actions to be executed when a rule is triggered | AutoHealActions |
triggers | Triggers - Conditions that describe when to execute the auto-heal actions | AutoHealTriggers |
AutoHealTriggers
Name | Description | Value |
---|---|---|
privateBytesInKB | PrivateBytesInKB - Defines a rule based on private bytes | int |
requests | Requests - Defines a rule based on total requests | RequestsBasedTrigger |
slowRequests | SlowRequests - Defines a rule based on request execution time | SlowRequestsBasedTrigger |
statusCodes | StatusCodes - Defines a rule based on status codes | StatusCodesBasedTrigger[] |
CloningInfo
Name | Description | Value |
---|---|---|
appSettingsOverrides | Application settings overrides for cloned web app. If specified these settings will override the settings cloned from source web app. If not specified, application settings from source web app are retained. |
CloningInfoAppSettingsOverrides |
cloneCustomHostNames | If true, clone custom hostnames from source web app | bool |
cloneSourceControl | Clone source control from source web app | bool |
configureLoadBalancing | If specified configure load balancing for source and clone site | bool |
correlationId | Correlation Id of cloning operation. This id ties multiple cloning operations together to use the same snapshot |
string |
hostingEnvironment | Hosting environment | string |
overwrite | Overwrite destination web app | bool |
sourceWebAppId | ARM resource id of the source web app. Web app resource id is of the form /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} for production slots and /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} for other slots |
string |
trafficManagerProfileId | ARM resource id of the traffic manager profile to use if it exists. Traffic manager resource id is of the form /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName} |
string |
trafficManagerProfileName | Name of traffic manager profile to create. This is only needed if traffic manager profile does not already exist | string |
CloningInfoAppSettingsOverrides
Name | Description | Value |
---|
ConnStringInfo
Name | Description | Value |
---|---|---|
connectionString | Connection string value | string |
name | Name of connection string | string |
type | Type of database | 'Custom' 'MySql' 'SQLAzure' 'SQLServer' (required) |
CorsSettings
Name | Description | Value |
---|---|---|
allowedOrigins | Gets or sets the list of origins that should be allowed to make cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. |
string[] |
Experiments
Name | Description | Value |
---|---|---|
rampUpRules | List of {Microsoft.Web.Hosting.Administration.RampUpRule} objects. | RampUpRule[] |
HandlerMapping
Name | Description | Value |
---|---|---|
arguments | Command-line arguments to be passed to the script processor. | string |
extension | Requests with this extension will be handled using the specified FastCGI application. | string |
scriptProcessor | The absolute path to the FastCGI application. | string |
HostingEnvironmentProfile
Name | Description | Value |
---|---|---|
id | Resource id of the hostingEnvironment (App Service Environment) | string |
name | Name of the hostingEnvironment (App Service Environment) (read only) | string |
type | Resource type of the hostingEnvironment (App Service Environment) (read only) | string |
HostNameSslState
Name | Description | Value |
---|---|---|
name | Host name | string |
sslState | SSL type | 'Disabled' 'IpBasedEnabled' 'SniEnabled' (required) |
thumbprint | SSL cert thumbprint | string |
toUpdate | Set this flag to update existing host name | bool |
virtualIP | Virtual IP address assigned to the host name if IP based SSL is enabled | string |
IpSecurityRestriction
Name | Description | Value |
---|---|---|
ipAddress | IP address the security restriction is valid for | string |
subnetMask | Subnet mask for the range of IP addresses the restriction is valid for | string |
Microsoft.Web/sites/slots
Name | Description | Value |
---|---|---|
apiVersion | The api version | '2015-08-01' |
kind | Kind of resource | string |
location | Resource Location | string (required) |
name | The resource name | string (required) |
properties | SiteProperties | |
tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
type | The resource type | 'Microsoft.Web/sites/slots' |
NameValuePair
Name | Description | Value |
---|---|---|
name | Pair name | string |
value | Pair value | string |
RampUpRule
Name | Description | Value |
---|---|---|
actionHostName | Hostname of a slot to which the traffic will be redirected if decided to. E.g. mysite-stage.azurewebsites.net | string |
changeDecisionCallbackUrl | 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/ |
string |
changeIntervalInMinutes | [Optional] Specifies interval in minutes to reevaluate ReroutePercentage | int |
changeStep | [Optional] In auto ramp up scenario this is the step to add/remove from {Microsoft.Web.Hosting.Administration.RampUpRule.ReroutePercentage} until it reaches {Microsoft.Web.Hosting.Administration.RampUpRule.MinReroutePercentage} or {Microsoft.Web.Hosting.Administration.RampUpRule.MaxReroutePercentage}. Site metrics are checked every N minutes specified in {Microsoft.Web.Hosting.Administration.RampUpRule.ChangeIntervalInMinutes}. Custom decision algorithm can be provided in TiPCallback site extension which Url can be specified in {Microsoft.Web.Hosting.Administration.RampUpRule.ChangeDecisionCallbackUrl} |
int |
maxReroutePercentage | [Optional] Specifies upper boundary below which ReroutePercentage will stay. | int |
minReroutePercentage | [Optional] Specifies lower boundary above which ReroutePercentage will stay. | int |
name | Name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment. | string |
reroutePercentage | Percentage of the traffic which will be redirected to {Microsoft.Web.Hosting.Administration.RampUpRule.ActionHostName} | int |
RequestsBasedTrigger
Name | Description | Value |
---|---|---|
count | Count | int |
timeInterval | TimeInterval | string |
ResourceTags
Name | Description | Value |
---|
ResourceTags
Name | Description | Value |
---|
SiteConfig
Name | Description | Value |
---|---|---|
id | Resource Id | string |
kind | Kind of resource | string |
location | Resource Location | string (required) |
name | Resource Name | string |
properties | SiteConfigProperties | |
tags | Resource tags | ResourceTags |
type | Resource type | string |
SiteConfigProperties
Name | Description | Value |
---|---|---|
alwaysOn | Always On | bool |
apiDefinition | Information about the formal API definition for the web app. | ApiDefinitionInfo |
appCommandLine | App Command Line to launch | string |
appSettings | Application Settings | NameValuePair[] |
autoHealEnabled | Auto heal enabled | bool |
autoHealRules | Auto heal rules | AutoHealRules |
autoSwapSlotName | Auto swap slot name | string |
connectionStrings | Connection strings | ConnStringInfo[] |
cors | Cross-Origin Resource Sharing (CORS) settings. | CorsSettings |
defaultDocuments | Default documents | string[] |
detailedErrorLoggingEnabled | Detailed error logging enabled | bool |
documentRoot | Document root | string |
experiments | This is work around for polymorphic types | Experiments |
handlerMappings | Handler mappings | HandlerMapping[] |
httpLoggingEnabled | HTTP logging Enabled | bool |
ipSecurityRestrictions | Ip Security restrictions | IpSecurityRestriction[] |
javaContainer | Java container | string |
javaContainerVersion | Java container version | string |
javaVersion | Java version | string |
limits | Site limits | SiteLimits |
loadBalancing | Site load balancing | 'LeastRequests' 'LeastResponseTime' 'RequestHash' 'WeightedRoundRobin' 'WeightedTotalTraffic' |
localMySqlEnabled | Local mysql enabled | bool |
logsDirectorySizeLimit | HTTP Logs Directory size limit | int |
managedPipelineMode | Managed pipeline mode | 'Classic' 'Integrated' |
metadata | Site Metadata | NameValuePair[] |
netFrameworkVersion | Net Framework Version | string |
nodeVersion | Version of Node | string |
numberOfWorkers | Number of workers | int |
phpVersion | Version of PHP | string |
publishingPassword | Publishing password | string |
publishingUsername | Publishing user name | string |
pythonVersion | Version of Python | string |
remoteDebuggingEnabled | Remote Debugging Enabled | bool |
remoteDebuggingVersion | Remote Debugging Version | string |
requestTracingEnabled | Enable request tracing | bool |
requestTracingExpirationTime | Request tracing expiration time | string |
scmType | SCM type | string |
tracingOptions | Tracing options | string |
use32BitWorkerProcess | Use 32 bit worker process | bool |
virtualApplications | Virtual applications | VirtualApplication[] |
vnetName | Vnet name | string |
webSocketsEnabled | Web socket enabled. | bool |
SiteLimits
Name | Description | Value |
---|---|---|
maxDiskSizeInMb | Maximum allowed disk size usage in MB | int |
maxMemoryInMb | Maximum allowed memory usage in MB | int |
maxPercentageCpu | Maximum allowed CPU usage percentage | int |
SiteProperties
Name | Description | Value |
---|---|---|
clientAffinityEnabled | Specifies if the client affinity is enabled when load balancing http request for multiple instances of the web app | bool |
clientCertEnabled | Specifies if the client certificate is enabled for the web app | bool |
cloningInfo | This is only valid for web app creation. If specified, web app is cloned from a source web app |
CloningInfo |
containerSize | Size of a function container | int |
enabled | True if the site is enabled; otherwise, false. Setting this value to false disables the site (takes the site off line). | bool |
gatewaySiteName | Name of gateway app associated with web app | string |
hostingEnvironmentProfile | Specification for the hosting environment (App Service Environment) to use for the web app | HostingEnvironmentProfile |
hostNamesDisabled | Specifies if the public hostnames are disabled the web app. If set to true the app is only accessible via API Management process |
bool |
hostNameSslStates | Hostname SSL states are used to manage the SSL bindings for site's hostnames. | HostNameSslState[] |
maxNumberOfWorkers | Maximum number of workers This only applies to function container |
int |
microService | string | |
name | Name of web app | string |
scmSiteAlsoStopped | If set indicates whether to stop SCM (KUDU) site when the web app is stopped. Default is false. | bool |
serverFarmId | string | |
siteConfig | Configuration of web app | SiteConfig |
SlowRequestsBasedTrigger
Name | Description | Value |
---|---|---|
count | Count | int |
timeInterval | TimeInterval | string |
timeTaken | TimeTaken | string |
StatusCodesBasedTrigger
Name | Description | Value |
---|---|---|
count | Count | int |
status | HTTP status code | int |
subStatus | SubStatus | int |
timeInterval | TimeInterval | string |
win32Status | Win32 error code | int |
VirtualApplication
Name | Description | Value |
---|---|---|
physicalPath | string | |
preloadEnabled | bool | |
virtualDirectories | VirtualDirectory[] | |
virtualPath | string |
VirtualDirectory
Name | Description | Value |
---|---|---|
physicalPath | string | |
virtualPath | string |
Quickstart templates
The following quickstart templates deploy this resource type.
Template | Description |
---|---|
Azure Function App with a Deployment Slot |
This template provisions a function app on a Premium plan with production slot and an additional deployment slot. |
Highly Available Multi-region Web App |
This template allows you to create a secure, highly available, multi-region end to end solution with two web apps in different regions behind Azure Front Door |
Provision Consumption plan function with a Deployment Slot |
This template provisions a function app on a Consumption plan, which is a dynamic hosting plan. The app runs on demand and you're billed per execution, with no standing resource committment. There are other templates available for provisioning on a dedicated hosting plan. |
Secure N-tier Web App |
This template allows you to create a secure end to end solution with two web apps with staging slots, front end and back end, front end will consume securely the back through VNet injection and Private Endpoint |
Web App with custom Deployment slots |
This template provides an easy way to deploy a web app with custom deployment slots on Azure Web Apps. |
Terraform (AzAPI provider) resource definition
The sites/slots 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.Web/sites/slots resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Web/sites/slots@2015-08-01"
name = "string"
kind = "string"
location = "string"
body = jsonencode({
properties = {
clientAffinityEnabled = bool
clientCertEnabled = bool
cloningInfo = {
appSettingsOverrides = {
{customized property} = "string"
}
cloneCustomHostNames = bool
cloneSourceControl = bool
configureLoadBalancing = bool
correlationId = "string"
hostingEnvironment = "string"
overwrite = bool
sourceWebAppId = "string"
trafficManagerProfileId = "string"
trafficManagerProfileName = "string"
}
containerSize = int
enabled = bool
gatewaySiteName = "string"
hostingEnvironmentProfile = {
id = "string"
name = "string"
type = "string"
}
hostNamesDisabled = bool
hostNameSslStates = [
{
name = "string"
sslState = "string"
thumbprint = "string"
toUpdate = bool
virtualIP = "string"
}
]
maxNumberOfWorkers = int
microService = "string"
name = "string"
scmSiteAlsoStopped = bool
serverFarmId = "string"
siteConfig = {
id = "string"
kind = "string"
location = "string"
name = "string"
properties = {
alwaysOn = bool
apiDefinition = {
url = "string"
}
appCommandLine = "string"
appSettings = [
{
name = "string"
value = "string"
}
]
autoHealEnabled = bool
autoHealRules = {
actions = {
actionType = "string"
customAction = {
exe = "string"
parameters = "string"
}
minProcessExecutionTime = "string"
}
triggers = {
privateBytesInKB = int
requests = {
count = int
timeInterval = "string"
}
slowRequests = {
count = int
timeInterval = "string"
timeTaken = "string"
}
statusCodes = [
{
count = int
status = int
subStatus = int
timeInterval = "string"
win32Status = int
}
]
}
}
autoSwapSlotName = "string"
connectionStrings = [
{
connectionString = "string"
name = "string"
type = "string"
}
]
cors = {
allowedOrigins = [
"string"
]
}
defaultDocuments = [
"string"
]
detailedErrorLoggingEnabled = bool
documentRoot = "string"
experiments = {
rampUpRules = [
{
actionHostName = "string"
changeDecisionCallbackUrl = "string"
changeIntervalInMinutes = int
changeStep = int
maxReroutePercentage = int
minReroutePercentage = int
name = "string"
reroutePercentage = int
}
]
}
handlerMappings = [
{
arguments = "string"
extension = "string"
scriptProcessor = "string"
}
]
httpLoggingEnabled = bool
ipSecurityRestrictions = [
{
ipAddress = "string"
subnetMask = "string"
}
]
javaContainer = "string"
javaContainerVersion = "string"
javaVersion = "string"
limits = {
maxDiskSizeInMb = int
maxMemoryInMb = int
maxPercentageCpu = int
}
loadBalancing = "string"
localMySqlEnabled = bool
logsDirectorySizeLimit = int
managedPipelineMode = "string"
metadata = [
{
name = "string"
value = "string"
}
]
netFrameworkVersion = "string"
nodeVersion = "string"
numberOfWorkers = int
phpVersion = "string"
publishingPassword = "string"
publishingUsername = "string"
pythonVersion = "string"
remoteDebuggingEnabled = bool
remoteDebuggingVersion = "string"
requestTracingEnabled = bool
requestTracingExpirationTime = "string"
scmType = "string"
tracingOptions = "string"
use32BitWorkerProcess = bool
virtualApplications = [
{
physicalPath = "string"
preloadEnabled = bool
virtualDirectories = [
{
physicalPath = "string"
virtualPath = "string"
}
]
virtualPath = "string"
}
]
vnetName = "string"
webSocketsEnabled = bool
}
tags = {
{customized property} = "string"
}
type = "string"
}
}
})
tags = {
{customized property} = "string"
}
}
Property values
ApiDefinitionInfo
Name | Description | Value |
---|---|---|
url | The URL of the API definition. | string |
AutoHealActions
Name | Description | Value |
---|---|---|
actionType | ActionType - predefined action to be taken | 'CustomAction' 'LogEvent' 'Recycle' (required) |
customAction | CustomAction - custom action to be taken | AutoHealCustomAction |
minProcessExecutionTime | MinProcessExecutionTime - minimum time the process must execute before taking the action |
string |
AutoHealCustomAction
Name | Description | Value |
---|---|---|
exe | Executable to be run | string |
parameters | Parameters for the executable | string |
AutoHealRules
Name | Description | Value |
---|---|---|
actions | Actions - Actions to be executed when a rule is triggered | AutoHealActions |
triggers | Triggers - Conditions that describe when to execute the auto-heal actions | AutoHealTriggers |
AutoHealTriggers
Name | Description | Value |
---|---|---|
privateBytesInKB | PrivateBytesInKB - Defines a rule based on private bytes | int |
requests | Requests - Defines a rule based on total requests | RequestsBasedTrigger |
slowRequests | SlowRequests - Defines a rule based on request execution time | SlowRequestsBasedTrigger |
statusCodes | StatusCodes - Defines a rule based on status codes | StatusCodesBasedTrigger[] |
CloningInfo
Name | Description | Value |
---|---|---|
appSettingsOverrides | Application settings overrides for cloned web app. If specified these settings will override the settings cloned from source web app. If not specified, application settings from source web app are retained. |
CloningInfoAppSettingsOverrides |
cloneCustomHostNames | If true, clone custom hostnames from source web app | bool |
cloneSourceControl | Clone source control from source web app | bool |
configureLoadBalancing | If specified configure load balancing for source and clone site | bool |
correlationId | Correlation Id of cloning operation. This id ties multiple cloning operations together to use the same snapshot |
string |
hostingEnvironment | Hosting environment | string |
overwrite | Overwrite destination web app | bool |
sourceWebAppId | ARM resource id of the source web app. Web app resource id is of the form /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} for production slots and /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} for other slots |
string |
trafficManagerProfileId | ARM resource id of the traffic manager profile to use if it exists. Traffic manager resource id is of the form /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName} |
string |
trafficManagerProfileName | Name of traffic manager profile to create. This is only needed if traffic manager profile does not already exist | string |
CloningInfoAppSettingsOverrides
Name | Description | Value |
---|
ConnStringInfo
Name | Description | Value |
---|---|---|
connectionString | Connection string value | string |
name | Name of connection string | string |
type | Type of database | 'Custom' 'MySql' 'SQLAzure' 'SQLServer' (required) |
CorsSettings
Name | Description | Value |
---|---|---|
allowedOrigins | Gets or sets the list of origins that should be allowed to make cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. |
string[] |
Experiments
Name | Description | Value |
---|---|---|
rampUpRules | List of {Microsoft.Web.Hosting.Administration.RampUpRule} objects. | RampUpRule[] |
HandlerMapping
Name | Description | Value |
---|---|---|
arguments | Command-line arguments to be passed to the script processor. | string |
extension | Requests with this extension will be handled using the specified FastCGI application. | string |
scriptProcessor | The absolute path to the FastCGI application. | string |
HostingEnvironmentProfile
Name | Description | Value |
---|---|---|
id | Resource id of the hostingEnvironment (App Service Environment) | string |
name | Name of the hostingEnvironment (App Service Environment) (read only) | string |
type | Resource type of the hostingEnvironment (App Service Environment) (read only) | string |
HostNameSslState
Name | Description | Value |
---|---|---|
name | Host name | string |
sslState | SSL type | 'Disabled' 'IpBasedEnabled' 'SniEnabled' (required) |
thumbprint | SSL cert thumbprint | string |
toUpdate | Set this flag to update existing host name | bool |
virtualIP | Virtual IP address assigned to the host name if IP based SSL is enabled | string |
IpSecurityRestriction
Name | Description | Value |
---|---|---|
ipAddress | IP address the security restriction is valid for | string |
subnetMask | Subnet mask for the range of IP addresses the restriction is valid for | string |
Microsoft.Web/sites/slots
Name | Description | Value |
---|---|---|
kind | Kind of resource | string |
location | Resource Location | string (required) |
name | The resource name | string (required) |
parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: sites |
properties | SiteProperties | |
tags | Resource tags | Dictionary of tag names and values. |
type | The resource type | "Microsoft.Web/sites/slots@2015-08-01" |
NameValuePair
Name | Description | Value |
---|---|---|
name | Pair name | string |
value | Pair value | string |
RampUpRule
Name | Description | Value |
---|---|---|
actionHostName | Hostname of a slot to which the traffic will be redirected if decided to. E.g. mysite-stage.azurewebsites.net | string |
changeDecisionCallbackUrl | 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/ |
string |
changeIntervalInMinutes | [Optional] Specifies interval in minutes to reevaluate ReroutePercentage | int |
changeStep | [Optional] In auto ramp up scenario this is the step to add/remove from {Microsoft.Web.Hosting.Administration.RampUpRule.ReroutePercentage} until it reaches {Microsoft.Web.Hosting.Administration.RampUpRule.MinReroutePercentage} or {Microsoft.Web.Hosting.Administration.RampUpRule.MaxReroutePercentage}. Site metrics are checked every N minutes specified in {Microsoft.Web.Hosting.Administration.RampUpRule.ChangeIntervalInMinutes}. Custom decision algorithm can be provided in TiPCallback site extension which Url can be specified in {Microsoft.Web.Hosting.Administration.RampUpRule.ChangeDecisionCallbackUrl} |
int |
maxReroutePercentage | [Optional] Specifies upper boundary below which ReroutePercentage will stay. | int |
minReroutePercentage | [Optional] Specifies lower boundary above which ReroutePercentage will stay. | int |
name | Name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment. | string |
reroutePercentage | Percentage of the traffic which will be redirected to {Microsoft.Web.Hosting.Administration.RampUpRule.ActionHostName} | int |
RequestsBasedTrigger
Name | Description | Value |
---|---|---|
count | Count | int |
timeInterval | TimeInterval | string |
ResourceTags
Name | Description | Value |
---|
ResourceTags
Name | Description | Value |
---|
SiteConfig
Name | Description | Value |
---|---|---|
id | Resource Id | string |
kind | Kind of resource | string |
location | Resource Location | string (required) |
name | Resource Name | string |
properties | SiteConfigProperties | |
tags | Resource tags | ResourceTags |
type | Resource type | string |
SiteConfigProperties
Name | Description | Value |
---|---|---|
alwaysOn | Always On | bool |
apiDefinition | Information about the formal API definition for the web app. | ApiDefinitionInfo |
appCommandLine | App Command Line to launch | string |
appSettings | Application Settings | NameValuePair[] |
autoHealEnabled | Auto heal enabled | bool |
autoHealRules | Auto heal rules | AutoHealRules |
autoSwapSlotName | Auto swap slot name | string |
connectionStrings | Connection strings | ConnStringInfo[] |
cors | Cross-Origin Resource Sharing (CORS) settings. | CorsSettings |
defaultDocuments | Default documents | string[] |
detailedErrorLoggingEnabled | Detailed error logging enabled | bool |
documentRoot | Document root | string |
experiments | This is work around for polymorphic types | Experiments |
handlerMappings | Handler mappings | HandlerMapping[] |
httpLoggingEnabled | HTTP logging Enabled | bool |
ipSecurityRestrictions | Ip Security restrictions | IpSecurityRestriction[] |
javaContainer | Java container | string |
javaContainerVersion | Java container version | string |
javaVersion | Java version | string |
limits | Site limits | SiteLimits |
loadBalancing | Site load balancing | 'LeastRequests' 'LeastResponseTime' 'RequestHash' 'WeightedRoundRobin' 'WeightedTotalTraffic' |
localMySqlEnabled | Local mysql enabled | bool |
logsDirectorySizeLimit | HTTP Logs Directory size limit | int |
managedPipelineMode | Managed pipeline mode | 'Classic' 'Integrated' |
metadata | Site Metadata | NameValuePair[] |
netFrameworkVersion | Net Framework Version | string |
nodeVersion | Version of Node | string |
numberOfWorkers | Number of workers | int |
phpVersion | Version of PHP | string |
publishingPassword | Publishing password | string |
publishingUsername | Publishing user name | string |
pythonVersion | Version of Python | string |
remoteDebuggingEnabled | Remote Debugging Enabled | bool |
remoteDebuggingVersion | Remote Debugging Version | string |
requestTracingEnabled | Enable request tracing | bool |
requestTracingExpirationTime | Request tracing expiration time | string |
scmType | SCM type | string |
tracingOptions | Tracing options | string |
use32BitWorkerProcess | Use 32 bit worker process | bool |
virtualApplications | Virtual applications | VirtualApplication[] |
vnetName | Vnet name | string |
webSocketsEnabled | Web socket enabled. | bool |
SiteLimits
Name | Description | Value |
---|---|---|
maxDiskSizeInMb | Maximum allowed disk size usage in MB | int |
maxMemoryInMb | Maximum allowed memory usage in MB | int |
maxPercentageCpu | Maximum allowed CPU usage percentage | int |
SiteProperties
Name | Description | Value |
---|---|---|
clientAffinityEnabled | Specifies if the client affinity is enabled when load balancing http request for multiple instances of the web app | bool |
clientCertEnabled | Specifies if the client certificate is enabled for the web app | bool |
cloningInfo | This is only valid for web app creation. If specified, web app is cloned from a source web app |
CloningInfo |
containerSize | Size of a function container | int |
enabled | True if the site is enabled; otherwise, false. Setting this value to false disables the site (takes the site off line). | bool |
gatewaySiteName | Name of gateway app associated with web app | string |
hostingEnvironmentProfile | Specification for the hosting environment (App Service Environment) to use for the web app | HostingEnvironmentProfile |
hostNamesDisabled | Specifies if the public hostnames are disabled the web app. If set to true the app is only accessible via API Management process |
bool |
hostNameSslStates | Hostname SSL states are used to manage the SSL bindings for site's hostnames. | HostNameSslState[] |
maxNumberOfWorkers | Maximum number of workers This only applies to function container |
int |
microService | string | |
name | Name of web app | string |
scmSiteAlsoStopped | If set indicates whether to stop SCM (KUDU) site when the web app is stopped. Default is false. | bool |
serverFarmId | string | |
siteConfig | Configuration of web app | SiteConfig |
SlowRequestsBasedTrigger
Name | Description | Value |
---|---|---|
count | Count | int |
timeInterval | TimeInterval | string |
timeTaken | TimeTaken | string |
StatusCodesBasedTrigger
Name | Description | Value |
---|---|---|
count | Count | int |
status | HTTP status code | int |
subStatus | SubStatus | int |
timeInterval | TimeInterval | string |
win32Status | Win32 error code | int |
VirtualApplication
Name | Description | Value |
---|---|---|
physicalPath | string | |
preloadEnabled | bool | |
virtualDirectories | VirtualDirectory[] | |
virtualPath | string |
VirtualDirectory
Name | Description | Value |
---|---|---|
physicalPath | string | |
virtualPath | string |