Microsoft.Insights webtests

Template format

To create a Microsoft.Insights/webtests resource, add the following JSON to the resources section of your template.

  "name": "string",
  "type": "Microsoft.Insights/webtests",
  "apiVersion": "2020-10-05-preview",
  "location": "string",
  "tags": {},
  "kind": "string",
  "properties": {
    "SyntheticMonitorId": "string",
    "Name": "string",
    "Description": "string",
    "Enabled": "boolean",
    "Frequency": "integer",
    "Timeout": "integer",
    "Kind": "string",
    "RetryEnabled": "boolean",
    "Locations": [
        "Id": "string"
    "Configuration": {
      "WebTest": "string"
    "Request": {
      "RequestUrl": "string",
      "Headers": [
          "key": "string",
          "value": "string"
      "HttpVerb": "string",
      "RequestBody": "string",
      "ParseDependentRequests": "boolean",
      "FollowRedirects": "boolean"
    "ContentValidation": {
      "ContentMatch": "string",
      "IgnoreCase": "boolean",
      "PassIfTextFound": "boolean"
    "SSLCheck": "boolean",
    "SSLCertRemainingLifetimeCheck": "integer",
    "ExpectedHttpStatusCode": "integer",
    "IgnoreHttpsStatusCode": "boolean"

Property values

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

Microsoft.Insights/webtests object


In Bicep, type and apiVersion are specified in the first line of the resource declaration. Use the format <type>@<apiVersion>. Don't set those properties in the resource body.

Name Type Required Value
name string Yes The name of the Application Insights WebTest resource.
type enum Yes For JSON - Microsoft.Insights/webtests
apiVersion enum Yes For JSON - 2020-10-05-preview
location string Yes Resource location
tags object No Resource tags
kind enum No The kind of WebTest that this web test watches. Choices are ping and multistep. - ping or multistep
properties object Yes Metadata describing a web test for an Azure resource. - WebTestProperties object

WebTestProperties object

Name Type Required Value
SyntheticMonitorId string Yes Unique ID of this WebTest. This is typically the same value as the Name field.
Name string Yes User defined name if this WebTest.
Description string No User defined description for this WebTest.
Enabled boolean No Is the test actively being monitored.
Frequency integer No Interval in seconds between test runs for this WebTest. Default value is 300.
Timeout integer No Seconds until this WebTest will timeout and fail. Default value is 30.
Kind enum Yes The kind of web test this is, valid choices are ping, multistep, basic, and standard. - ping, multistep, basic, standard
RetryEnabled boolean No Allow for retries should this WebTest fail.
Locations array Yes A list of where to physically run the tests from to give global coverage for accessibility of your application. - WebTestGeolocation object
Configuration object No An XML configuration specification for a WebTest. - WebTestPropertiesConfiguration object
Request object No The collection of request properties - WebTestPropertiesRequest object
ContentValidation object No The collection of content validation properties - WebTestPropertiesContentValidation object
SSLCheck boolean No Checks to see if the SSL cert is still valid.
SSLCertRemainingLifetimeCheck integer No A number of days to check still remain before the the existing SSL cert expires.
ExpectedHttpStatusCode integer No Validate that the WebTest returns the http status code provided.
IgnoreHttpsStatusCode boolean No When set, validation will ignore the status code.

WebTestGeolocation object

Name Type Required Value
Id string No Location ID for the WebTest to run from.

WebTestPropertiesConfiguration object

Name Type Required Value
WebTest string No The XML specification of a WebTest to run against an application.

WebTestPropertiesRequest object

Name Type Required Value
RequestUrl string No Url location to test.
Headers array No List of headers and their values to add to the WebTest call. - HeaderField object
HttpVerb string No Http verb to use for this web test.
RequestBody string No Base64 encoded string body to send with this web test.
ParseDependentRequests boolean No Parse Dependent request for this WebTest.
FollowRedirects boolean No Follow redirects for this web test.

WebTestPropertiesContentValidation object

Name Type Required Value
ContentMatch string No Content to look for in the return of the WebTest.
IgnoreCase boolean No When set, this value makes the ContentMatch validation case insensitive.
PassIfTextFound boolean No When true, validation will pass if there is a match for the ContentMatch string. If false, validation will fail if there is a match

HeaderField object

Name Type Required Value
key string No The name of the header.
value string No The value of the header.

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Dynamic Web Test Creation

Deploy to Azure
Create any number of App Insights web (ping) tests.
Metric alert rule for an availability test

Deploy to Azure
This template creates an Application Insights availability test along with a metric alert rule that monitors it.