1. Packages
  2. Azure Native
  3. API Docs
  4. applicationinsights
  5. WebTest
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

azure-native.applicationinsights.WebTest

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

An Application Insights WebTest definition.

Uses Azure REST API version 2022-06-15.

Other available API versions: 2015-05-01, 2018-05-01-preview, 2020-10-05-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native applicationinsights [ApiVersion]. See the version guide for details.

Example Usage

webTestCreate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var webTest = new AzureNative.ApplicationInsights.WebTest("webTest", new()
    {
        Configuration = new AzureNative.ApplicationInsights.Inputs.WebTestPropertiesConfigurationArgs
        {
            WebTest = "<WebTest Name=\"my-webtest\" Id=\"678ddf96-1ab8-44c8-9274-123456789abc\" Enabled=\"True\" CssProjectStructure=\"\" CssIteration=\"\" Timeout=\"120\" WorkItemIds=\"\" xmlns=\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\" Description=\"\" CredentialUserName=\"\" CredentialPassword=\"\" PreAuthenticate=\"True\" Proxy=\"default\" StopOnError=\"False\" RecordedResultFile=\"\" ResultsLocale=\"\" ><Items><Request Method=\"GET\" Guid=\"a4162485-9114-fcfc-e086-123456789abc\" Version=\"1.1\" Url=\"http://my-component.azurewebsites.net\" ThinkTime=\"0\" Timeout=\"120\" ParseDependentRequests=\"True\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /></Items></WebTest>",
        },
        Description = "Ping web test alert for mytestwebapp",
        Enabled = true,
        Frequency = 900,
        Kind = AzureNative.ApplicationInsights.WebTestKind.Ping,
        Location = "South Central US",
        Locations = new[]
        {
            new AzureNative.ApplicationInsights.Inputs.WebTestGeolocationArgs
            {
                Location = "us-fl-mia-edge",
            },
        },
        ResourceGroupName = "my-resource-group",
        RetryEnabled = true,
        SyntheticMonitorId = "my-webtest-my-component",
        Timeout = 120,
        WebTestKind = AzureNative.ApplicationInsights.WebTestKind.Ping,
        WebTestName = "my-webtest-my-component",
    });

});
Copy
package main

import (
	applicationinsights "github.com/pulumi/pulumi-azure-native-sdk/applicationinsights/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := applicationinsights.NewWebTest(ctx, "webTest", &applicationinsights.WebTestArgs{
			Configuration: &applicationinsights.WebTestPropertiesConfigurationArgs{
				WebTest: pulumi.String("<WebTest Name=\"my-webtest\" Id=\"678ddf96-1ab8-44c8-9274-123456789abc\" Enabled=\"True\" CssProjectStructure=\"\" CssIteration=\"\" Timeout=\"120\" WorkItemIds=\"\" xmlns=\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\" Description=\"\" CredentialUserName=\"\" CredentialPassword=\"\" PreAuthenticate=\"True\" Proxy=\"default\" StopOnError=\"False\" RecordedResultFile=\"\" ResultsLocale=\"\" ><Items><Request Method=\"GET\" Guid=\"a4162485-9114-fcfc-e086-123456789abc\" Version=\"1.1\" Url=\"http://my-component.azurewebsites.net\" ThinkTime=\"0\" Timeout=\"120\" ParseDependentRequests=\"True\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /></Items></WebTest>"),
			},
			Description: pulumi.String("Ping web test alert for mytestwebapp"),
			Enabled:     pulumi.Bool(true),
			Frequency:   pulumi.Int(900),
			Kind:        applicationinsights.WebTestKindPing,
			Location:    pulumi.String("South Central US"),
			Locations: applicationinsights.WebTestGeolocationArray{
				&applicationinsights.WebTestGeolocationArgs{
					Location: pulumi.String("us-fl-mia-edge"),
				},
			},
			ResourceGroupName:  pulumi.String("my-resource-group"),
			RetryEnabled:       pulumi.Bool(true),
			SyntheticMonitorId: pulumi.String("my-webtest-my-component"),
			Timeout:            pulumi.Int(120),
			WebTestKind:        applicationinsights.WebTestKindPing,
			WebTestName:        pulumi.String("my-webtest-my-component"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.applicationinsights.WebTest;
import com.pulumi.azurenative.applicationinsights.WebTestArgs;
import com.pulumi.azurenative.applicationinsights.inputs.WebTestPropertiesConfigurationArgs;
import com.pulumi.azurenative.applicationinsights.inputs.WebTestGeolocationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var webTest = new WebTest("webTest", WebTestArgs.builder()
            .configuration(WebTestPropertiesConfigurationArgs.builder()
                .webTest("<WebTest Name=\"my-webtest\" Id=\"678ddf96-1ab8-44c8-9274-123456789abc\" Enabled=\"True\" CssProjectStructure=\"\" CssIteration=\"\" Timeout=\"120\" WorkItemIds=\"\" xmlns=\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\" Description=\"\" CredentialUserName=\"\" CredentialPassword=\"\" PreAuthenticate=\"True\" Proxy=\"default\" StopOnError=\"False\" RecordedResultFile=\"\" ResultsLocale=\"\" ><Items><Request Method=\"GET\" Guid=\"a4162485-9114-fcfc-e086-123456789abc\" Version=\"1.1\" Url=\"http://my-component.azurewebsites.net\" ThinkTime=\"0\" Timeout=\"120\" ParseDependentRequests=\"True\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /></Items></WebTest>")
                .build())
            .description("Ping web test alert for mytestwebapp")
            .enabled(true)
            .frequency(900)
            .kind("ping")
            .location("South Central US")
            .locations(WebTestGeolocationArgs.builder()
                .location("us-fl-mia-edge")
                .build())
            .resourceGroupName("my-resource-group")
            .retryEnabled(true)
            .syntheticMonitorId("my-webtest-my-component")
            .timeout(120)
            .webTestKind("ping")
            .webTestName("my-webtest-my-component")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const webTest = new azure_native.applicationinsights.WebTest("webTest", {
    configuration: {
        webTest: "<WebTest Name=\"my-webtest\" Id=\"678ddf96-1ab8-44c8-9274-123456789abc\" Enabled=\"True\" CssProjectStructure=\"\" CssIteration=\"\" Timeout=\"120\" WorkItemIds=\"\" xmlns=\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\" Description=\"\" CredentialUserName=\"\" CredentialPassword=\"\" PreAuthenticate=\"True\" Proxy=\"default\" StopOnError=\"False\" RecordedResultFile=\"\" ResultsLocale=\"\" ><Items><Request Method=\"GET\" Guid=\"a4162485-9114-fcfc-e086-123456789abc\" Version=\"1.1\" Url=\"http://my-component.azurewebsites.net\" ThinkTime=\"0\" Timeout=\"120\" ParseDependentRequests=\"True\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /></Items></WebTest>",
    },
    description: "Ping web test alert for mytestwebapp",
    enabled: true,
    frequency: 900,
    kind: azure_native.applicationinsights.WebTestKind.Ping,
    location: "South Central US",
    locations: [{
        location: "us-fl-mia-edge",
    }],
    resourceGroupName: "my-resource-group",
    retryEnabled: true,
    syntheticMonitorId: "my-webtest-my-component",
    timeout: 120,
    webTestKind: azure_native.applicationinsights.WebTestKind.Ping,
    webTestName: "my-webtest-my-component",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

web_test = azure_native.applicationinsights.WebTest("webTest",
    configuration={
        "web_test": "<WebTest Name=\"my-webtest\" Id=\"678ddf96-1ab8-44c8-9274-123456789abc\" Enabled=\"True\" CssProjectStructure=\"\" CssIteration=\"\" Timeout=\"120\" WorkItemIds=\"\" xmlns=\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\" Description=\"\" CredentialUserName=\"\" CredentialPassword=\"\" PreAuthenticate=\"True\" Proxy=\"default\" StopOnError=\"False\" RecordedResultFile=\"\" ResultsLocale=\"\" ><Items><Request Method=\"GET\" Guid=\"a4162485-9114-fcfc-e086-123456789abc\" Version=\"1.1\" Url=\"http://my-component.azurewebsites.net\" ThinkTime=\"0\" Timeout=\"120\" ParseDependentRequests=\"True\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /></Items></WebTest>",
    },
    description="Ping web test alert for mytestwebapp",
    enabled=True,
    frequency=900,
    kind=azure_native.applicationinsights.WebTestKind.PING,
    location="South Central US",
    locations=[{
        "location": "us-fl-mia-edge",
    }],
    resource_group_name="my-resource-group",
    retry_enabled=True,
    synthetic_monitor_id="my-webtest-my-component",
    timeout=120,
    web_test_kind=azure_native.applicationinsights.WebTestKind.PING,
    web_test_name="my-webtest-my-component")
Copy
resources:
  webTest:
    type: azure-native:applicationinsights:WebTest
    properties:
      configuration:
        webTest: <WebTest Name="my-webtest" Id="678ddf96-1ab8-44c8-9274-123456789abc" Enabled="True" CssProjectStructure="" CssIteration="" Timeout="120" WorkItemIds="" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010" Description="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="default" StopOnError="False" RecordedResultFile="" ResultsLocale="" ><Items><Request Method="GET" Guid="a4162485-9114-fcfc-e086-123456789abc" Version="1.1" Url="http://my-component.azurewebsites.net" ThinkTime="0" Timeout="120" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="200" ExpectedResponseUrl="" ReportingName="" IgnoreHttpStatusCode="False" /></Items></WebTest>
      description: Ping web test alert for mytestwebapp
      enabled: true
      frequency: 900
      kind: ping
      location: South Central US
      locations:
        - location: us-fl-mia-edge
      resourceGroupName: my-resource-group
      retryEnabled: true
      syntheticMonitorId: my-webtest-my-component
      timeout: 120
      webTestKind: ping
      webTestName: my-webtest-my-component
Copy

webTestCreateStandard

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var webTest = new AzureNative.ApplicationInsights.WebTest("webTest", new()
    {
        Description = "Ping web test alert for mytestwebapp",
        Enabled = true,
        Frequency = 900,
        Location = "South Central US",
        Locations = new[]
        {
            new AzureNative.ApplicationInsights.Inputs.WebTestGeolocationArgs
            {
                Location = "us-fl-mia-edge",
            },
        },
        Request = new AzureNative.ApplicationInsights.Inputs.WebTestPropertiesRequestArgs
        {
            Headers = new[]
            {
                new AzureNative.ApplicationInsights.Inputs.HeaderFieldArgs
                {
                    HeaderFieldName = "Content-Language",
                    HeaderFieldValue = "de-DE",
                },
                new AzureNative.ApplicationInsights.Inputs.HeaderFieldArgs
                {
                    HeaderFieldName = "Accept-Language",
                    HeaderFieldValue = "de-DE",
                },
            },
            HttpVerb = "POST",
            RequestBody = "SGVsbG8gd29ybGQ=",
            RequestUrl = "https://bing.com",
        },
        ResourceGroupName = "my-resource-group",
        RetryEnabled = true,
        SyntheticMonitorId = "my-webtest-my-component",
        Timeout = 120,
        ValidationRules = new AzureNative.ApplicationInsights.Inputs.WebTestPropertiesValidationRulesArgs
        {
            SSLCertRemainingLifetimeCheck = 100,
            SSLCheck = true,
        },
        WebTestKind = AzureNative.ApplicationInsights.WebTestKind.Standard,
        WebTestName = "my-webtest-my-component",
    });

});
Copy
package main

import (
	applicationinsights "github.com/pulumi/pulumi-azure-native-sdk/applicationinsights/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := applicationinsights.NewWebTest(ctx, "webTest", &applicationinsights.WebTestArgs{
			Description: pulumi.String("Ping web test alert for mytestwebapp"),
			Enabled:     pulumi.Bool(true),
			Frequency:   pulumi.Int(900),
			Location:    pulumi.String("South Central US"),
			Locations: applicationinsights.WebTestGeolocationArray{
				&applicationinsights.WebTestGeolocationArgs{
					Location: pulumi.String("us-fl-mia-edge"),
				},
			},
			Request: &applicationinsights.WebTestPropertiesRequestArgs{
				Headers: applicationinsights.HeaderFieldArray{
					&applicationinsights.HeaderFieldArgs{
						HeaderFieldName:  pulumi.String("Content-Language"),
						HeaderFieldValue: pulumi.String("de-DE"),
					},
					&applicationinsights.HeaderFieldArgs{
						HeaderFieldName:  pulumi.String("Accept-Language"),
						HeaderFieldValue: pulumi.String("de-DE"),
					},
				},
				HttpVerb:    pulumi.String("POST"),
				RequestBody: pulumi.String("SGVsbG8gd29ybGQ="),
				RequestUrl:  pulumi.String("https://bing.com"),
			},
			ResourceGroupName:  pulumi.String("my-resource-group"),
			RetryEnabled:       pulumi.Bool(true),
			SyntheticMonitorId: pulumi.String("my-webtest-my-component"),
			Timeout:            pulumi.Int(120),
			ValidationRules: &applicationinsights.WebTestPropertiesValidationRulesArgs{
				SSLCertRemainingLifetimeCheck: pulumi.Int(100),
				SSLCheck:                      pulumi.Bool(true),
			},
			WebTestKind: applicationinsights.WebTestKindStandard,
			WebTestName: pulumi.String("my-webtest-my-component"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.applicationinsights.WebTest;
import com.pulumi.azurenative.applicationinsights.WebTestArgs;
import com.pulumi.azurenative.applicationinsights.inputs.WebTestGeolocationArgs;
import com.pulumi.azurenative.applicationinsights.inputs.WebTestPropertiesRequestArgs;
import com.pulumi.azurenative.applicationinsights.inputs.WebTestPropertiesValidationRulesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var webTest = new WebTest("webTest", WebTestArgs.builder()
            .description("Ping web test alert for mytestwebapp")
            .enabled(true)
            .frequency(900)
            .location("South Central US")
            .locations(WebTestGeolocationArgs.builder()
                .location("us-fl-mia-edge")
                .build())
            .request(WebTestPropertiesRequestArgs.builder()
                .headers(                
                    HeaderFieldArgs.builder()
                        .headerFieldName("Content-Language")
                        .headerFieldValue("de-DE")
                        .build(),
                    HeaderFieldArgs.builder()
                        .headerFieldName("Accept-Language")
                        .headerFieldValue("de-DE")
                        .build())
                .httpVerb("POST")
                .requestBody("SGVsbG8gd29ybGQ=")
                .requestUrl("https://bing.com")
                .build())
            .resourceGroupName("my-resource-group")
            .retryEnabled(true)
            .syntheticMonitorId("my-webtest-my-component")
            .timeout(120)
            .validationRules(WebTestPropertiesValidationRulesArgs.builder()
                .sSLCertRemainingLifetimeCheck(100)
                .sSLCheck(true)
                .build())
            .webTestKind("standard")
            .webTestName("my-webtest-my-component")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const webTest = new azure_native.applicationinsights.WebTest("webTest", {
    description: "Ping web test alert for mytestwebapp",
    enabled: true,
    frequency: 900,
    location: "South Central US",
    locations: [{
        location: "us-fl-mia-edge",
    }],
    request: {
        headers: [
            {
                headerFieldName: "Content-Language",
                headerFieldValue: "de-DE",
            },
            {
                headerFieldName: "Accept-Language",
                headerFieldValue: "de-DE",
            },
        ],
        httpVerb: "POST",
        requestBody: "SGVsbG8gd29ybGQ=",
        requestUrl: "https://bing.com",
    },
    resourceGroupName: "my-resource-group",
    retryEnabled: true,
    syntheticMonitorId: "my-webtest-my-component",
    timeout: 120,
    validationRules: {
        sSLCertRemainingLifetimeCheck: 100,
        sSLCheck: true,
    },
    webTestKind: azure_native.applicationinsights.WebTestKind.Standard,
    webTestName: "my-webtest-my-component",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

web_test = azure_native.applicationinsights.WebTest("webTest",
    description="Ping web test alert for mytestwebapp",
    enabled=True,
    frequency=900,
    location="South Central US",
    locations=[{
        "location": "us-fl-mia-edge",
    }],
    request={
        "headers": [
            {
                "header_field_name": "Content-Language",
                "header_field_value": "de-DE",
            },
            {
                "header_field_name": "Accept-Language",
                "header_field_value": "de-DE",
            },
        ],
        "http_verb": "POST",
        "request_body": "SGVsbG8gd29ybGQ=",
        "request_url": "https://bing.com",
    },
    resource_group_name="my-resource-group",
    retry_enabled=True,
    synthetic_monitor_id="my-webtest-my-component",
    timeout=120,
    validation_rules={
        "s_sl_cert_remaining_lifetime_check": 100,
        "s_sl_check": True,
    },
    web_test_kind=azure_native.applicationinsights.WebTestKind.STANDARD,
    web_test_name="my-webtest-my-component")
Copy
resources:
  webTest:
    type: azure-native:applicationinsights:WebTest
    properties:
      description: Ping web test alert for mytestwebapp
      enabled: true
      frequency: 900
      location: South Central US
      locations:
        - location: us-fl-mia-edge
      request:
        headers:
          - headerFieldName: Content-Language
            headerFieldValue: de-DE
          - headerFieldName: Accept-Language
            headerFieldValue: de-DE
        httpVerb: POST
        requestBody: SGVsbG8gd29ybGQ=
        requestUrl: https://bing.com
      resourceGroupName: my-resource-group
      retryEnabled: true
      syntheticMonitorId: my-webtest-my-component
      timeout: 120
      validationRules:
        sSLCertRemainingLifetimeCheck: 100
        sSLCheck: true
      webTestKind: standard
      webTestName: my-webtest-my-component
Copy

webTestUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var webTest = new AzureNative.ApplicationInsights.WebTest("webTest", new()
    {
        Configuration = new AzureNative.ApplicationInsights.Inputs.WebTestPropertiesConfigurationArgs
        {
            WebTest = "<WebTest Name=\"my-webtest\" Id=\"678ddf96-1ab8-44c8-9274-123456789abc\" Enabled=\"True\" CssProjectStructure=\"\" CssIteration=\"\" Timeout=\"30\" WorkItemIds=\"\" xmlns=\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\" Description=\"\" CredentialUserName=\"\" CredentialPassword=\"\" PreAuthenticate=\"True\" Proxy=\"default\" StopOnError=\"False\" RecordedResultFile=\"\" ResultsLocale=\"\" ><Items><Request Method=\"GET\" Guid=\"a4162485-9114-fcfc-e086-123456789abc\" Version=\"1.1\" Url=\"http://my-component.azurewebsites.net\" ThinkTime=\"0\" Timeout=\"30\" ParseDependentRequests=\"True\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /></Items></WebTest>",
        },
        Frequency = 600,
        Kind = AzureNative.ApplicationInsights.WebTestKind.Ping,
        Location = "South Central US",
        Locations = new[]
        {
            new AzureNative.ApplicationInsights.Inputs.WebTestGeolocationArgs
            {
                Location = "us-fl-mia-edge",
            },
            new AzureNative.ApplicationInsights.Inputs.WebTestGeolocationArgs
            {
                Location = "apac-hk-hkn-azr",
            },
        },
        ResourceGroupName = "my-resource-group",
        SyntheticMonitorId = "my-webtest-my-component",
        Timeout = 30,
        WebTestKind = AzureNative.ApplicationInsights.WebTestKind.Ping,
        WebTestName = "my-webtest-my-component",
    });

});
Copy
package main

import (
	applicationinsights "github.com/pulumi/pulumi-azure-native-sdk/applicationinsights/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := applicationinsights.NewWebTest(ctx, "webTest", &applicationinsights.WebTestArgs{
			Configuration: &applicationinsights.WebTestPropertiesConfigurationArgs{
				WebTest: pulumi.String("<WebTest Name=\"my-webtest\" Id=\"678ddf96-1ab8-44c8-9274-123456789abc\" Enabled=\"True\" CssProjectStructure=\"\" CssIteration=\"\" Timeout=\"30\" WorkItemIds=\"\" xmlns=\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\" Description=\"\" CredentialUserName=\"\" CredentialPassword=\"\" PreAuthenticate=\"True\" Proxy=\"default\" StopOnError=\"False\" RecordedResultFile=\"\" ResultsLocale=\"\" ><Items><Request Method=\"GET\" Guid=\"a4162485-9114-fcfc-e086-123456789abc\" Version=\"1.1\" Url=\"http://my-component.azurewebsites.net\" ThinkTime=\"0\" Timeout=\"30\" ParseDependentRequests=\"True\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /></Items></WebTest>"),
			},
			Frequency: pulumi.Int(600),
			Kind:      applicationinsights.WebTestKindPing,
			Location:  pulumi.String("South Central US"),
			Locations: applicationinsights.WebTestGeolocationArray{
				&applicationinsights.WebTestGeolocationArgs{
					Location: pulumi.String("us-fl-mia-edge"),
				},
				&applicationinsights.WebTestGeolocationArgs{
					Location: pulumi.String("apac-hk-hkn-azr"),
				},
			},
			ResourceGroupName:  pulumi.String("my-resource-group"),
			SyntheticMonitorId: pulumi.String("my-webtest-my-component"),
			Timeout:            pulumi.Int(30),
			WebTestKind:        applicationinsights.WebTestKindPing,
			WebTestName:        pulumi.String("my-webtest-my-component"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.applicationinsights.WebTest;
import com.pulumi.azurenative.applicationinsights.WebTestArgs;
import com.pulumi.azurenative.applicationinsights.inputs.WebTestPropertiesConfigurationArgs;
import com.pulumi.azurenative.applicationinsights.inputs.WebTestGeolocationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var webTest = new WebTest("webTest", WebTestArgs.builder()
            .configuration(WebTestPropertiesConfigurationArgs.builder()
                .webTest("<WebTest Name=\"my-webtest\" Id=\"678ddf96-1ab8-44c8-9274-123456789abc\" Enabled=\"True\" CssProjectStructure=\"\" CssIteration=\"\" Timeout=\"30\" WorkItemIds=\"\" xmlns=\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\" Description=\"\" CredentialUserName=\"\" CredentialPassword=\"\" PreAuthenticate=\"True\" Proxy=\"default\" StopOnError=\"False\" RecordedResultFile=\"\" ResultsLocale=\"\" ><Items><Request Method=\"GET\" Guid=\"a4162485-9114-fcfc-e086-123456789abc\" Version=\"1.1\" Url=\"http://my-component.azurewebsites.net\" ThinkTime=\"0\" Timeout=\"30\" ParseDependentRequests=\"True\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /></Items></WebTest>")
                .build())
            .frequency(600)
            .kind("ping")
            .location("South Central US")
            .locations(            
                WebTestGeolocationArgs.builder()
                    .location("us-fl-mia-edge")
                    .build(),
                WebTestGeolocationArgs.builder()
                    .location("apac-hk-hkn-azr")
                    .build())
            .resourceGroupName("my-resource-group")
            .syntheticMonitorId("my-webtest-my-component")
            .timeout(30)
            .webTestKind("ping")
            .webTestName("my-webtest-my-component")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const webTest = new azure_native.applicationinsights.WebTest("webTest", {
    configuration: {
        webTest: "<WebTest Name=\"my-webtest\" Id=\"678ddf96-1ab8-44c8-9274-123456789abc\" Enabled=\"True\" CssProjectStructure=\"\" CssIteration=\"\" Timeout=\"30\" WorkItemIds=\"\" xmlns=\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\" Description=\"\" CredentialUserName=\"\" CredentialPassword=\"\" PreAuthenticate=\"True\" Proxy=\"default\" StopOnError=\"False\" RecordedResultFile=\"\" ResultsLocale=\"\" ><Items><Request Method=\"GET\" Guid=\"a4162485-9114-fcfc-e086-123456789abc\" Version=\"1.1\" Url=\"http://my-component.azurewebsites.net\" ThinkTime=\"0\" Timeout=\"30\" ParseDependentRequests=\"True\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /></Items></WebTest>",
    },
    frequency: 600,
    kind: azure_native.applicationinsights.WebTestKind.Ping,
    location: "South Central US",
    locations: [
        {
            location: "us-fl-mia-edge",
        },
        {
            location: "apac-hk-hkn-azr",
        },
    ],
    resourceGroupName: "my-resource-group",
    syntheticMonitorId: "my-webtest-my-component",
    timeout: 30,
    webTestKind: azure_native.applicationinsights.WebTestKind.Ping,
    webTestName: "my-webtest-my-component",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

web_test = azure_native.applicationinsights.WebTest("webTest",
    configuration={
        "web_test": "<WebTest Name=\"my-webtest\" Id=\"678ddf96-1ab8-44c8-9274-123456789abc\" Enabled=\"True\" CssProjectStructure=\"\" CssIteration=\"\" Timeout=\"30\" WorkItemIds=\"\" xmlns=\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\" Description=\"\" CredentialUserName=\"\" CredentialPassword=\"\" PreAuthenticate=\"True\" Proxy=\"default\" StopOnError=\"False\" RecordedResultFile=\"\" ResultsLocale=\"\" ><Items><Request Method=\"GET\" Guid=\"a4162485-9114-fcfc-e086-123456789abc\" Version=\"1.1\" Url=\"http://my-component.azurewebsites.net\" ThinkTime=\"0\" Timeout=\"30\" ParseDependentRequests=\"True\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /></Items></WebTest>",
    },
    frequency=600,
    kind=azure_native.applicationinsights.WebTestKind.PING,
    location="South Central US",
    locations=[
        {
            "location": "us-fl-mia-edge",
        },
        {
            "location": "apac-hk-hkn-azr",
        },
    ],
    resource_group_name="my-resource-group",
    synthetic_monitor_id="my-webtest-my-component",
    timeout=30,
    web_test_kind=azure_native.applicationinsights.WebTestKind.PING,
    web_test_name="my-webtest-my-component")
Copy
resources:
  webTest:
    type: azure-native:applicationinsights:WebTest
    properties:
      configuration:
        webTest: <WebTest Name="my-webtest" Id="678ddf96-1ab8-44c8-9274-123456789abc" Enabled="True" CssProjectStructure="" CssIteration="" Timeout="30" WorkItemIds="" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010" Description="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="default" StopOnError="False" RecordedResultFile="" ResultsLocale="" ><Items><Request Method="GET" Guid="a4162485-9114-fcfc-e086-123456789abc" Version="1.1" Url="http://my-component.azurewebsites.net" ThinkTime="0" Timeout="30" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="200" ExpectedResponseUrl="" ReportingName="" IgnoreHttpStatusCode="False" /></Items></WebTest>
      frequency: 600
      kind: ping
      location: South Central US
      locations:
        - location: us-fl-mia-edge
        - location: apac-hk-hkn-azr
      resourceGroupName: my-resource-group
      syntheticMonitorId: my-webtest-my-component
      timeout: 30
      webTestKind: ping
      webTestName: my-webtest-my-component
Copy

Create WebTest Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new WebTest(name: string, args: WebTestArgs, opts?: CustomResourceOptions);
@overload
def WebTest(resource_name: str,
            args: WebTestArgs,
            opts: Optional[ResourceOptions] = None)

@overload
def WebTest(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            locations: Optional[Sequence[WebTestGeolocationArgs]] = None,
            web_test_kind: Optional[WebTestKind] = None,
            synthetic_monitor_id: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            kind: Optional[WebTestKind] = None,
            location: Optional[str] = None,
            configuration: Optional[WebTestPropertiesConfigurationArgs] = None,
            request: Optional[WebTestPropertiesRequestArgs] = None,
            frequency: Optional[int] = None,
            retry_enabled: Optional[bool] = None,
            enabled: Optional[bool] = None,
            tags: Optional[Mapping[str, str]] = None,
            timeout: Optional[int] = None,
            validation_rules: Optional[WebTestPropertiesValidationRulesArgs] = None,
            description: Optional[str] = None,
            web_test_name: Optional[str] = None)
func NewWebTest(ctx *Context, name string, args WebTestArgs, opts ...ResourceOption) (*WebTest, error)
public WebTest(string name, WebTestArgs args, CustomResourceOptions? opts = null)
public WebTest(String name, WebTestArgs args)
public WebTest(String name, WebTestArgs args, CustomResourceOptions options)
type: azure-native:applicationinsights:WebTest
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. WebTestArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. WebTestArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. WebTestArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. WebTestArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. WebTestArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var webTestResource = new AzureNative.ApplicationInsights.WebTest("webTestResource", new()
{
    Locations = new[]
    {
        new AzureNative.ApplicationInsights.Inputs.WebTestGeolocationArgs
        {
            Location = "string",
        },
    },
    WebTestKind = AzureNative.ApplicationInsights.WebTestKind.Ping,
    SyntheticMonitorId = "string",
    ResourceGroupName = "string",
    Kind = AzureNative.ApplicationInsights.WebTestKind.Ping,
    Location = "string",
    Configuration = new AzureNative.ApplicationInsights.Inputs.WebTestPropertiesConfigurationArgs
    {
        WebTest = "string",
    },
    Request = new AzureNative.ApplicationInsights.Inputs.WebTestPropertiesRequestArgs
    {
        FollowRedirects = false,
        Headers = new[]
        {
            new AzureNative.ApplicationInsights.Inputs.HeaderFieldArgs
            {
                HeaderFieldName = "string",
                HeaderFieldValue = "string",
            },
        },
        HttpVerb = "string",
        ParseDependentRequests = false,
        RequestBody = "string",
        RequestUrl = "string",
    },
    Frequency = 0,
    RetryEnabled = false,
    Enabled = false,
    Tags = 
    {
        { "string", "string" },
    },
    Timeout = 0,
    ValidationRules = new AzureNative.ApplicationInsights.Inputs.WebTestPropertiesValidationRulesArgs
    {
        ContentValidation = new AzureNative.ApplicationInsights.Inputs.WebTestPropertiesContentValidationArgs
        {
            ContentMatch = "string",
            IgnoreCase = false,
            PassIfTextFound = false,
        },
        ExpectedHttpStatusCode = 0,
        IgnoreHttpStatusCode = false,
        SSLCertRemainingLifetimeCheck = 0,
        SSLCheck = false,
    },
    Description = "string",
    WebTestName = "string",
});
Copy
example, err := applicationinsights.NewWebTest(ctx, "webTestResource", &applicationinsights.WebTestArgs{
	Locations: applicationinsights.WebTestGeolocationArray{
		&applicationinsights.WebTestGeolocationArgs{
			Location: pulumi.String("string"),
		},
	},
	WebTestKind:        applicationinsights.WebTestKindPing,
	SyntheticMonitorId: pulumi.String("string"),
	ResourceGroupName:  pulumi.String("string"),
	Kind:               applicationinsights.WebTestKindPing,
	Location:           pulumi.String("string"),
	Configuration: &applicationinsights.WebTestPropertiesConfigurationArgs{
		WebTest: pulumi.String("string"),
	},
	Request: &applicationinsights.WebTestPropertiesRequestArgs{
		FollowRedirects: pulumi.Bool(false),
		Headers: applicationinsights.HeaderFieldArray{
			&applicationinsights.HeaderFieldArgs{
				HeaderFieldName:  pulumi.String("string"),
				HeaderFieldValue: pulumi.String("string"),
			},
		},
		HttpVerb:               pulumi.String("string"),
		ParseDependentRequests: pulumi.Bool(false),
		RequestBody:            pulumi.String("string"),
		RequestUrl:             pulumi.String("string"),
	},
	Frequency:    pulumi.Int(0),
	RetryEnabled: pulumi.Bool(false),
	Enabled:      pulumi.Bool(false),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Timeout: pulumi.Int(0),
	ValidationRules: &applicationinsights.WebTestPropertiesValidationRulesArgs{
		ContentValidation: &applicationinsights.WebTestPropertiesContentValidationArgs{
			ContentMatch:    pulumi.String("string"),
			IgnoreCase:      pulumi.Bool(false),
			PassIfTextFound: pulumi.Bool(false),
		},
		ExpectedHttpStatusCode:        pulumi.Int(0),
		IgnoreHttpStatusCode:          pulumi.Bool(false),
		SSLCertRemainingLifetimeCheck: pulumi.Int(0),
		SSLCheck:                      pulumi.Bool(false),
	},
	Description: pulumi.String("string"),
	WebTestName: pulumi.String("string"),
})
Copy
var webTestResource = new WebTest("webTestResource", WebTestArgs.builder()
    .locations(WebTestGeolocationArgs.builder()
        .location("string")
        .build())
    .webTestKind("ping")
    .syntheticMonitorId("string")
    .resourceGroupName("string")
    .kind("ping")
    .location("string")
    .configuration(WebTestPropertiesConfigurationArgs.builder()
        .webTest("string")
        .build())
    .request(WebTestPropertiesRequestArgs.builder()
        .followRedirects(false)
        .headers(HeaderFieldArgs.builder()
            .headerFieldName("string")
            .headerFieldValue("string")
            .build())
        .httpVerb("string")
        .parseDependentRequests(false)
        .requestBody("string")
        .requestUrl("string")
        .build())
    .frequency(0)
    .retryEnabled(false)
    .enabled(false)
    .tags(Map.of("string", "string"))
    .timeout(0)
    .validationRules(WebTestPropertiesValidationRulesArgs.builder()
        .contentValidation(WebTestPropertiesContentValidationArgs.builder()
            .contentMatch("string")
            .ignoreCase(false)
            .passIfTextFound(false)
            .build())
        .expectedHttpStatusCode(0)
        .ignoreHttpStatusCode(false)
        .sSLCertRemainingLifetimeCheck(0)
        .sSLCheck(false)
        .build())
    .description("string")
    .webTestName("string")
    .build());
Copy
web_test_resource = azure_native.applicationinsights.WebTest("webTestResource",
    locations=[{
        "location": "string",
    }],
    web_test_kind=azure_native.applicationinsights.WebTestKind.PING,
    synthetic_monitor_id="string",
    resource_group_name="string",
    kind=azure_native.applicationinsights.WebTestKind.PING,
    location="string",
    configuration={
        "web_test": "string",
    },
    request={
        "follow_redirects": False,
        "headers": [{
            "header_field_name": "string",
            "header_field_value": "string",
        }],
        "http_verb": "string",
        "parse_dependent_requests": False,
        "request_body": "string",
        "request_url": "string",
    },
    frequency=0,
    retry_enabled=False,
    enabled=False,
    tags={
        "string": "string",
    },
    timeout=0,
    validation_rules={
        "content_validation": {
            "content_match": "string",
            "ignore_case": False,
            "pass_if_text_found": False,
        },
        "expected_http_status_code": 0,
        "ignore_http_status_code": False,
        "s_sl_cert_remaining_lifetime_check": 0,
        "s_sl_check": False,
    },
    description="string",
    web_test_name="string")
Copy
const webTestResource = new azure_native.applicationinsights.WebTest("webTestResource", {
    locations: [{
        location: "string",
    }],
    webTestKind: azure_native.applicationinsights.WebTestKind.Ping,
    syntheticMonitorId: "string",
    resourceGroupName: "string",
    kind: azure_native.applicationinsights.WebTestKind.Ping,
    location: "string",
    configuration: {
        webTest: "string",
    },
    request: {
        followRedirects: false,
        headers: [{
            headerFieldName: "string",
            headerFieldValue: "string",
        }],
        httpVerb: "string",
        parseDependentRequests: false,
        requestBody: "string",
        requestUrl: "string",
    },
    frequency: 0,
    retryEnabled: false,
    enabled: false,
    tags: {
        string: "string",
    },
    timeout: 0,
    validationRules: {
        contentValidation: {
            contentMatch: "string",
            ignoreCase: false,
            passIfTextFound: false,
        },
        expectedHttpStatusCode: 0,
        ignoreHttpStatusCode: false,
        sSLCertRemainingLifetimeCheck: 0,
        sSLCheck: false,
    },
    description: "string",
    webTestName: "string",
});
Copy
type: azure-native:applicationinsights:WebTest
properties:
    configuration:
        webTest: string
    description: string
    enabled: false
    frequency: 0
    kind: ping
    location: string
    locations:
        - location: string
    request:
        followRedirects: false
        headers:
            - headerFieldName: string
              headerFieldValue: string
        httpVerb: string
        parseDependentRequests: false
        requestBody: string
        requestUrl: string
    resourceGroupName: string
    retryEnabled: false
    syntheticMonitorId: string
    tags:
        string: string
    timeout: 0
    validationRules:
        contentValidation:
            contentMatch: string
            ignoreCase: false
            passIfTextFound: false
        expectedHttpStatusCode: 0
        ignoreHttpStatusCode: false
        sSLCertRemainingLifetimeCheck: 0
        sSLCheck: false
    webTestKind: ping
    webTestName: string
Copy

WebTest Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The WebTest resource accepts the following input properties:

Locations This property is required. List<Pulumi.AzureNative.ApplicationInsights.Inputs.WebTestGeolocation>
A list of where to physically run the tests from to give global coverage for accessibility of your application.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
SyntheticMonitorId This property is required. string
Unique ID of this WebTest. This is typically the same value as the Name field.
WebTestKind This property is required. Pulumi.AzureNative.ApplicationInsights.WebTestKind
The kind of web test this is, valid choices are ping, multistep and standard.
Configuration Pulumi.AzureNative.ApplicationInsights.Inputs.WebTestPropertiesConfiguration
An XML configuration specification for a WebTest.
Description string
User defined description for this WebTest.
Enabled bool
Is the test actively being monitored.
Frequency int
Interval in seconds between test runs for this WebTest. Default value is 300.
Kind Pulumi.AzureNative.ApplicationInsights.WebTestKind
The kind of WebTest that this web test watches. Choices are ping, multistep and standard.
Location Changes to this property will trigger replacement. string
Resource location
Request Pulumi.AzureNative.ApplicationInsights.Inputs.WebTestPropertiesRequest
The collection of request properties
RetryEnabled bool
Allow for retries should this WebTest fail.
Tags Dictionary<string, string>
Resource tags
Timeout int
Seconds until this WebTest will timeout and fail. Default value is 30.
ValidationRules Pulumi.AzureNative.ApplicationInsights.Inputs.WebTestPropertiesValidationRules
The collection of validation rule properties
WebTestName string
User defined name if this WebTest.
Locations This property is required. []WebTestGeolocationArgs
A list of where to physically run the tests from to give global coverage for accessibility of your application.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
SyntheticMonitorId This property is required. string
Unique ID of this WebTest. This is typically the same value as the Name field.
WebTestKind This property is required. WebTestKind
The kind of web test this is, valid choices are ping, multistep and standard.
Configuration WebTestPropertiesConfigurationArgs
An XML configuration specification for a WebTest.
Description string
User defined description for this WebTest.
Enabled bool
Is the test actively being monitored.
Frequency int
Interval in seconds between test runs for this WebTest. Default value is 300.
Kind WebTestKind
The kind of WebTest that this web test watches. Choices are ping, multistep and standard.
Location Changes to this property will trigger replacement. string
Resource location
Request WebTestPropertiesRequestArgs
The collection of request properties
RetryEnabled bool
Allow for retries should this WebTest fail.
Tags map[string]string
Resource tags
Timeout int
Seconds until this WebTest will timeout and fail. Default value is 30.
ValidationRules WebTestPropertiesValidationRulesArgs
The collection of validation rule properties
WebTestName string
User defined name if this WebTest.
locations This property is required. List<WebTestGeolocation>
A list of where to physically run the tests from to give global coverage for accessibility of your application.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
syntheticMonitorId This property is required. String
Unique ID of this WebTest. This is typically the same value as the Name field.
webTestKind This property is required. WebTestKind
The kind of web test this is, valid choices are ping, multistep and standard.
configuration WebTestPropertiesConfiguration
An XML configuration specification for a WebTest.
description String
User defined description for this WebTest.
enabled Boolean
Is the test actively being monitored.
frequency Integer
Interval in seconds between test runs for this WebTest. Default value is 300.
kind WebTestKind
The kind of WebTest that this web test watches. Choices are ping, multistep and standard.
location Changes to this property will trigger replacement. String
Resource location
request WebTestPropertiesRequest
The collection of request properties
retryEnabled Boolean
Allow for retries should this WebTest fail.
tags Map<String,String>
Resource tags
timeout Integer
Seconds until this WebTest will timeout and fail. Default value is 30.
validationRules WebTestPropertiesValidationRules
The collection of validation rule properties
webTestName String
User defined name if this WebTest.
locations This property is required. WebTestGeolocation[]
A list of where to physically run the tests from to give global coverage for accessibility of your application.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
syntheticMonitorId This property is required. string
Unique ID of this WebTest. This is typically the same value as the Name field.
webTestKind This property is required. WebTestKind
The kind of web test this is, valid choices are ping, multistep and standard.
configuration WebTestPropertiesConfiguration
An XML configuration specification for a WebTest.
description string
User defined description for this WebTest.
enabled boolean
Is the test actively being monitored.
frequency number
Interval in seconds between test runs for this WebTest. Default value is 300.
kind WebTestKind
The kind of WebTest that this web test watches. Choices are ping, multistep and standard.
location Changes to this property will trigger replacement. string
Resource location
request WebTestPropertiesRequest
The collection of request properties
retryEnabled boolean
Allow for retries should this WebTest fail.
tags {[key: string]: string}
Resource tags
timeout number
Seconds until this WebTest will timeout and fail. Default value is 30.
validationRules WebTestPropertiesValidationRules
The collection of validation rule properties
webTestName string
User defined name if this WebTest.
locations This property is required. Sequence[WebTestGeolocationArgs]
A list of where to physically run the tests from to give global coverage for accessibility of your application.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group. The name is case insensitive.
synthetic_monitor_id This property is required. str
Unique ID of this WebTest. This is typically the same value as the Name field.
web_test_kind This property is required. WebTestKind
The kind of web test this is, valid choices are ping, multistep and standard.
configuration WebTestPropertiesConfigurationArgs
An XML configuration specification for a WebTest.
description str
User defined description for this WebTest.
enabled bool
Is the test actively being monitored.
frequency int
Interval in seconds between test runs for this WebTest. Default value is 300.
kind WebTestKind
The kind of WebTest that this web test watches. Choices are ping, multistep and standard.
location Changes to this property will trigger replacement. str
Resource location
request WebTestPropertiesRequestArgs
The collection of request properties
retry_enabled bool
Allow for retries should this WebTest fail.
tags Mapping[str, str]
Resource tags
timeout int
Seconds until this WebTest will timeout and fail. Default value is 30.
validation_rules WebTestPropertiesValidationRulesArgs
The collection of validation rule properties
web_test_name str
User defined name if this WebTest.
locations This property is required. List<Property Map>
A list of where to physically run the tests from to give global coverage for accessibility of your application.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
syntheticMonitorId This property is required. String
Unique ID of this WebTest. This is typically the same value as the Name field.
webTestKind This property is required. "ping" | "multistep" | "standard"
The kind of web test this is, valid choices are ping, multistep and standard.
configuration Property Map
An XML configuration specification for a WebTest.
description String
User defined description for this WebTest.
enabled Boolean
Is the test actively being monitored.
frequency Number
Interval in seconds between test runs for this WebTest. Default value is 300.
kind "ping" | "multistep" | "standard"
The kind of WebTest that this web test watches. Choices are ping, multistep and standard.
location Changes to this property will trigger replacement. String
Resource location
request Property Map
The collection of request properties
retryEnabled Boolean
Allow for retries should this WebTest fail.
tags Map<String>
Resource tags
timeout Number
Seconds until this WebTest will timeout and fail. Default value is 30.
validationRules Property Map
The collection of validation rule properties
webTestName String
User defined name if this WebTest.

Outputs

All input properties are implicitly available as output properties. Additionally, the WebTest resource produces the following output properties:

AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Azure resource name
ProvisioningState string
Current state of this component, whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, Canceled, and Failed.
Type string
Azure resource type
AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Azure resource name
ProvisioningState string
Current state of this component, whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, Canceled, and Failed.
Type string
Azure resource type
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
Azure resource name
provisioningState String
Current state of this component, whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, Canceled, and Failed.
type String
Azure resource type
azureApiVersion string
The Azure API version of the resource.
id string
The provider-assigned unique ID for this managed resource.
name string
Azure resource name
provisioningState string
Current state of this component, whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, Canceled, and Failed.
type string
Azure resource type
azure_api_version str
The Azure API version of the resource.
id str
The provider-assigned unique ID for this managed resource.
name str
Azure resource name
provisioning_state str
Current state of this component, whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, Canceled, and Failed.
type str
Azure resource type
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
Azure resource name
provisioningState String
Current state of this component, whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, Canceled, and Failed.
type String
Azure resource type

Supporting Types

HeaderField
, HeaderFieldArgs

HeaderFieldName string
The name of the header.
HeaderFieldValue string
The value of the header.
HeaderFieldName string
The name of the header.
HeaderFieldValue string
The value of the header.
headerFieldName String
The name of the header.
headerFieldValue String
The value of the header.
headerFieldName string
The name of the header.
headerFieldValue string
The value of the header.
header_field_name str
The name of the header.
header_field_value str
The value of the header.
headerFieldName String
The name of the header.
headerFieldValue String
The value of the header.

HeaderFieldResponse
, HeaderFieldResponseArgs

HeaderFieldName string
The name of the header.
HeaderFieldValue string
The value of the header.
HeaderFieldName string
The name of the header.
HeaderFieldValue string
The value of the header.
headerFieldName String
The name of the header.
headerFieldValue String
The value of the header.
headerFieldName string
The name of the header.
headerFieldValue string
The value of the header.
header_field_name str
The name of the header.
header_field_value str
The value of the header.
headerFieldName String
The name of the header.
headerFieldValue String
The value of the header.

WebTestGeolocation
, WebTestGeolocationArgs

Location string
Location ID for the WebTest to run from.
Location string
Location ID for the WebTest to run from.
location String
Location ID for the WebTest to run from.
location string
Location ID for the WebTest to run from.
location str
Location ID for the WebTest to run from.
location String
Location ID for the WebTest to run from.

WebTestGeolocationResponse
, WebTestGeolocationResponseArgs

Location string
Location ID for the WebTest to run from.
Location string
Location ID for the WebTest to run from.
location String
Location ID for the WebTest to run from.
location string
Location ID for the WebTest to run from.
location str
Location ID for the WebTest to run from.
location String
Location ID for the WebTest to run from.

WebTestKind
, WebTestKindArgs

Ping
ping
Multistep
multistep
Standard
standard
WebTestKindPing
ping
WebTestKindMultistep
multistep
WebTestKindStandard
standard
Ping
ping
Multistep
multistep
Standard
standard
Ping
ping
Multistep
multistep
Standard
standard
PING
ping
MULTISTEP
multistep
STANDARD
standard
"ping"
ping
"multistep"
multistep
"standard"
standard

WebTestPropertiesConfiguration
, WebTestPropertiesConfigurationArgs

WebTest string
The XML specification of a WebTest to run against an application.
WebTest string
The XML specification of a WebTest to run against an application.
webTest String
The XML specification of a WebTest to run against an application.
webTest string
The XML specification of a WebTest to run against an application.
web_test str
The XML specification of a WebTest to run against an application.
webTest String
The XML specification of a WebTest to run against an application.

WebTestPropertiesContentValidation
, WebTestPropertiesContentValidationArgs

ContentMatch string
Content to look for in the return of the WebTest. Must not be null or empty.
IgnoreCase bool
When set, this value makes the ContentMatch validation case insensitive.
PassIfTextFound bool
When true, validation will pass if there is a match for the ContentMatch string. If false, validation will fail if there is a match
ContentMatch string
Content to look for in the return of the WebTest. Must not be null or empty.
IgnoreCase bool
When set, this value makes the ContentMatch validation case insensitive.
PassIfTextFound bool
When true, validation will pass if there is a match for the ContentMatch string. If false, validation will fail if there is a match
contentMatch String
Content to look for in the return of the WebTest. Must not be null or empty.
ignoreCase Boolean
When set, this value makes the ContentMatch validation case insensitive.
passIfTextFound Boolean
When true, validation will pass if there is a match for the ContentMatch string. If false, validation will fail if there is a match
contentMatch string
Content to look for in the return of the WebTest. Must not be null or empty.
ignoreCase boolean
When set, this value makes the ContentMatch validation case insensitive.
passIfTextFound boolean
When true, validation will pass if there is a match for the ContentMatch string. If false, validation will fail if there is a match
content_match str
Content to look for in the return of the WebTest. Must not be null or empty.
ignore_case bool
When set, this value makes the ContentMatch validation case insensitive.
pass_if_text_found bool
When true, validation will pass if there is a match for the ContentMatch string. If false, validation will fail if there is a match
contentMatch String
Content to look for in the return of the WebTest. Must not be null or empty.
ignoreCase Boolean
When set, this value makes the ContentMatch validation case insensitive.
passIfTextFound Boolean
When true, validation will pass if there is a match for the ContentMatch string. If false, validation will fail if there is a match

WebTestPropertiesRequest
, WebTestPropertiesRequestArgs

FollowRedirects bool
Follow redirects for this web test.
Headers List<Pulumi.AzureNative.ApplicationInsights.Inputs.HeaderField>
List of headers and their values to add to the WebTest call.
HttpVerb string
Http verb to use for this web test.
ParseDependentRequests bool
Parse Dependent request for this WebTest.
RequestBody string
Base64 encoded string body to send with this web test.
RequestUrl string
Url location to test.
FollowRedirects bool
Follow redirects for this web test.
Headers []HeaderField
List of headers and their values to add to the WebTest call.
HttpVerb string
Http verb to use for this web test.
ParseDependentRequests bool
Parse Dependent request for this WebTest.
RequestBody string
Base64 encoded string body to send with this web test.
RequestUrl string
Url location to test.
followRedirects Boolean
Follow redirects for this web test.
headers List<HeaderField>
List of headers and their values to add to the WebTest call.
httpVerb String
Http verb to use for this web test.
parseDependentRequests Boolean
Parse Dependent request for this WebTest.
requestBody String
Base64 encoded string body to send with this web test.
requestUrl String
Url location to test.
followRedirects boolean
Follow redirects for this web test.
headers HeaderField[]
List of headers and their values to add to the WebTest call.
httpVerb string
Http verb to use for this web test.
parseDependentRequests boolean
Parse Dependent request for this WebTest.
requestBody string
Base64 encoded string body to send with this web test.
requestUrl string
Url location to test.
follow_redirects bool
Follow redirects for this web test.
headers Sequence[HeaderField]
List of headers and their values to add to the WebTest call.
http_verb str
Http verb to use for this web test.
parse_dependent_requests bool
Parse Dependent request for this WebTest.
request_body str
Base64 encoded string body to send with this web test.
request_url str
Url location to test.
followRedirects Boolean
Follow redirects for this web test.
headers List<Property Map>
List of headers and their values to add to the WebTest call.
httpVerb String
Http verb to use for this web test.
parseDependentRequests Boolean
Parse Dependent request for this WebTest.
requestBody String
Base64 encoded string body to send with this web test.
requestUrl String
Url location to test.

WebTestPropertiesResponseConfiguration
, WebTestPropertiesResponseConfigurationArgs

WebTest string
The XML specification of a WebTest to run against an application.
WebTest string
The XML specification of a WebTest to run against an application.
webTest String
The XML specification of a WebTest to run against an application.
webTest string
The XML specification of a WebTest to run against an application.
web_test str
The XML specification of a WebTest to run against an application.
webTest String
The XML specification of a WebTest to run against an application.

WebTestPropertiesResponseContentValidation
, WebTestPropertiesResponseContentValidationArgs

ContentMatch string
Content to look for in the return of the WebTest. Must not be null or empty.
IgnoreCase bool
When set, this value makes the ContentMatch validation case insensitive.
PassIfTextFound bool
When true, validation will pass if there is a match for the ContentMatch string. If false, validation will fail if there is a match
ContentMatch string
Content to look for in the return of the WebTest. Must not be null or empty.
IgnoreCase bool
When set, this value makes the ContentMatch validation case insensitive.
PassIfTextFound bool
When true, validation will pass if there is a match for the ContentMatch string. If false, validation will fail if there is a match
contentMatch String
Content to look for in the return of the WebTest. Must not be null or empty.
ignoreCase Boolean
When set, this value makes the ContentMatch validation case insensitive.
passIfTextFound Boolean
When true, validation will pass if there is a match for the ContentMatch string. If false, validation will fail if there is a match
contentMatch string
Content to look for in the return of the WebTest. Must not be null or empty.
ignoreCase boolean
When set, this value makes the ContentMatch validation case insensitive.
passIfTextFound boolean
When true, validation will pass if there is a match for the ContentMatch string. If false, validation will fail if there is a match
content_match str
Content to look for in the return of the WebTest. Must not be null or empty.
ignore_case bool
When set, this value makes the ContentMatch validation case insensitive.
pass_if_text_found bool
When true, validation will pass if there is a match for the ContentMatch string. If false, validation will fail if there is a match
contentMatch String
Content to look for in the return of the WebTest. Must not be null or empty.
ignoreCase Boolean
When set, this value makes the ContentMatch validation case insensitive.
passIfTextFound Boolean
When true, validation will pass if there is a match for the ContentMatch string. If false, validation will fail if there is a match

WebTestPropertiesResponseRequest
, WebTestPropertiesResponseRequestArgs

FollowRedirects bool
Follow redirects for this web test.
Headers List<Pulumi.AzureNative.ApplicationInsights.Inputs.HeaderFieldResponse>
List of headers and their values to add to the WebTest call.
HttpVerb string
Http verb to use for this web test.
ParseDependentRequests bool
Parse Dependent request for this WebTest.
RequestBody string
Base64 encoded string body to send with this web test.
RequestUrl string
Url location to test.
FollowRedirects bool
Follow redirects for this web test.
Headers []HeaderFieldResponse
List of headers and their values to add to the WebTest call.
HttpVerb string
Http verb to use for this web test.
ParseDependentRequests bool
Parse Dependent request for this WebTest.
RequestBody string
Base64 encoded string body to send with this web test.
RequestUrl string
Url location to test.
followRedirects Boolean
Follow redirects for this web test.
headers List<HeaderFieldResponse>
List of headers and their values to add to the WebTest call.
httpVerb String
Http verb to use for this web test.
parseDependentRequests Boolean
Parse Dependent request for this WebTest.
requestBody String
Base64 encoded string body to send with this web test.
requestUrl String
Url location to test.
followRedirects boolean
Follow redirects for this web test.
headers HeaderFieldResponse[]
List of headers and their values to add to the WebTest call.
httpVerb string
Http verb to use for this web test.
parseDependentRequests boolean
Parse Dependent request for this WebTest.
requestBody string
Base64 encoded string body to send with this web test.
requestUrl string
Url location to test.
follow_redirects bool
Follow redirects for this web test.
headers Sequence[HeaderFieldResponse]
List of headers and their values to add to the WebTest call.
http_verb str
Http verb to use for this web test.
parse_dependent_requests bool
Parse Dependent request for this WebTest.
request_body str
Base64 encoded string body to send with this web test.
request_url str
Url location to test.
followRedirects Boolean
Follow redirects for this web test.
headers List<Property Map>
List of headers and their values to add to the WebTest call.
httpVerb String
Http verb to use for this web test.
parseDependentRequests Boolean
Parse Dependent request for this WebTest.
requestBody String
Base64 encoded string body to send with this web test.
requestUrl String
Url location to test.

WebTestPropertiesResponseValidationRules
, WebTestPropertiesResponseValidationRulesArgs

ContentValidation Pulumi.AzureNative.ApplicationInsights.Inputs.WebTestPropertiesResponseContentValidation
The collection of content validation properties
ExpectedHttpStatusCode int
Validate that the WebTest returns the http status code provided.
IgnoreHttpStatusCode bool
When set, validation will ignore the status code.
SSLCertRemainingLifetimeCheck int
A number of days to check still remain before the the existing SSL cert expires. Value must be positive and the SSLCheck must be set to true.
SSLCheck bool
Checks to see if the SSL cert is still valid.
ContentValidation WebTestPropertiesResponseContentValidation
The collection of content validation properties
ExpectedHttpStatusCode int
Validate that the WebTest returns the http status code provided.
IgnoreHttpStatusCode bool
When set, validation will ignore the status code.
SSLCertRemainingLifetimeCheck int
A number of days to check still remain before the the existing SSL cert expires. Value must be positive and the SSLCheck must be set to true.
SSLCheck bool
Checks to see if the SSL cert is still valid.
contentValidation WebTestPropertiesResponseContentValidation
The collection of content validation properties
expectedHttpStatusCode Integer
Validate that the WebTest returns the http status code provided.
ignoreHttpStatusCode Boolean
When set, validation will ignore the status code.
sSLCertRemainingLifetimeCheck Integer
A number of days to check still remain before the the existing SSL cert expires. Value must be positive and the SSLCheck must be set to true.
sSLCheck Boolean
Checks to see if the SSL cert is still valid.
contentValidation WebTestPropertiesResponseContentValidation
The collection of content validation properties
expectedHttpStatusCode number
Validate that the WebTest returns the http status code provided.
ignoreHttpStatusCode boolean
When set, validation will ignore the status code.
sSLCertRemainingLifetimeCheck number
A number of days to check still remain before the the existing SSL cert expires. Value must be positive and the SSLCheck must be set to true.
sSLCheck boolean
Checks to see if the SSL cert is still valid.
content_validation WebTestPropertiesResponseContentValidation
The collection of content validation properties
expected_http_status_code int
Validate that the WebTest returns the http status code provided.
ignore_http_status_code bool
When set, validation will ignore the status code.
s_sl_cert_remaining_lifetime_check int
A number of days to check still remain before the the existing SSL cert expires. Value must be positive and the SSLCheck must be set to true.
s_sl_check bool
Checks to see if the SSL cert is still valid.
contentValidation Property Map
The collection of content validation properties
expectedHttpStatusCode Number
Validate that the WebTest returns the http status code provided.
ignoreHttpStatusCode Boolean
When set, validation will ignore the status code.
sSLCertRemainingLifetimeCheck Number
A number of days to check still remain before the the existing SSL cert expires. Value must be positive and the SSLCheck must be set to true.
sSLCheck Boolean
Checks to see if the SSL cert is still valid.

WebTestPropertiesValidationRules
, WebTestPropertiesValidationRulesArgs

ContentValidation Pulumi.AzureNative.ApplicationInsights.Inputs.WebTestPropertiesContentValidation
The collection of content validation properties
ExpectedHttpStatusCode int
Validate that the WebTest returns the http status code provided.
IgnoreHttpStatusCode bool
When set, validation will ignore the status code.
SSLCertRemainingLifetimeCheck int
A number of days to check still remain before the the existing SSL cert expires. Value must be positive and the SSLCheck must be set to true.
SSLCheck bool
Checks to see if the SSL cert is still valid.
ContentValidation WebTestPropertiesContentValidation
The collection of content validation properties
ExpectedHttpStatusCode int
Validate that the WebTest returns the http status code provided.
IgnoreHttpStatusCode bool
When set, validation will ignore the status code.
SSLCertRemainingLifetimeCheck int
A number of days to check still remain before the the existing SSL cert expires. Value must be positive and the SSLCheck must be set to true.
SSLCheck bool
Checks to see if the SSL cert is still valid.
contentValidation WebTestPropertiesContentValidation
The collection of content validation properties
expectedHttpStatusCode Integer
Validate that the WebTest returns the http status code provided.
ignoreHttpStatusCode Boolean
When set, validation will ignore the status code.
sSLCertRemainingLifetimeCheck Integer
A number of days to check still remain before the the existing SSL cert expires. Value must be positive and the SSLCheck must be set to true.
sSLCheck Boolean
Checks to see if the SSL cert is still valid.
contentValidation WebTestPropertiesContentValidation
The collection of content validation properties
expectedHttpStatusCode number
Validate that the WebTest returns the http status code provided.
ignoreHttpStatusCode boolean
When set, validation will ignore the status code.
sSLCertRemainingLifetimeCheck number
A number of days to check still remain before the the existing SSL cert expires. Value must be positive and the SSLCheck must be set to true.
sSLCheck boolean
Checks to see if the SSL cert is still valid.
content_validation WebTestPropertiesContentValidation
The collection of content validation properties
expected_http_status_code int
Validate that the WebTest returns the http status code provided.
ignore_http_status_code bool
When set, validation will ignore the status code.
s_sl_cert_remaining_lifetime_check int
A number of days to check still remain before the the existing SSL cert expires. Value must be positive and the SSLCheck must be set to true.
s_sl_check bool
Checks to see if the SSL cert is still valid.
contentValidation Property Map
The collection of content validation properties
expectedHttpStatusCode Number
Validate that the WebTest returns the http status code provided.
ignoreHttpStatusCode Boolean
When set, validation will ignore the status code.
sSLCertRemainingLifetimeCheck Number
A number of days to check still remain before the the existing SSL cert expires. Value must be positive and the SSLCheck must be set to true.
sSLCheck Boolean
Checks to see if the SSL cert is still valid.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:applicationinsights:WebTest my-webtest-my-component /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi