WebTestArgs

data class WebTestArgs(val configuration: Output<WebTestPropertiesConfigurationArgs>? = null, val description: Output<String>? = null, val enabled: Output<Boolean>? = null, val frequency: Output<Int>? = null, val kind: Output<WebTestKind>? = null, val location: Output<String>? = null, val locations: Output<List<WebTestGeolocationArgs>>? = null, val resourceGroupName: Output<String>? = null, val retryEnabled: Output<Boolean>? = null, val syntheticMonitorId: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val timeout: Output<Int>? = null, val webTestKind: Output<WebTestKind>? = null, val webTestName: Output<String>? = null) : ConvertibleToJava<WebTestArgs>

An Application Insights web test definition. API Version: 2015-05-01.

Example Usage

webTestCreate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var webTest = new AzureNative.Insights.WebTest("webTest", new()
{
Configuration = new AzureNative.Insights.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.Insights.WebTestKind.Ping,
Location = "South Central US",
Locations = new[]
{
new AzureNative.Insights.Inputs.WebTestGeolocationArgs
{
Location = "us-fl-mia-edge",
},
},
ResourceGroupName = "my-resource-group",
RetryEnabled = true,
SyntheticMonitorId = "my-webtest-my-component",
Timeout = 120,
WebTestKind = AzureNative.Insights.WebTestKind.Ping,
WebTestName = "my-webtest-my-component",
});
});
package main
import (
insights "github.com/pulumi/pulumi-azure-native-sdk/insights"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := insights.NewWebTest(ctx, "webTest", &insights.WebTestArgs{
Configuration: &insights.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: insights.WebTestKindPing,
Location: pulumi.String("South Central US"),
Locations: []insights.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: insights.WebTestKindPing,
WebTestName: pulumi.String("my-webtest-my-component"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.insights.WebTest;
import com.pulumi.azurenative.insights.WebTestArgs;
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(Map.of("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(Map.of("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")
.build());
}
}

webTestUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var webTest = new AzureNative.Insights.WebTest("webTest", new()
{
Configuration = new AzureNative.Insights.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.Insights.WebTestKind.Ping,
Location = "South Central US",
Locations = new[]
{
new AzureNative.Insights.Inputs.WebTestGeolocationArgs
{
Location = "us-fl-mia-edge",
},
new AzureNative.Insights.Inputs.WebTestGeolocationArgs
{
Location = "apac-hk-hkn-azr",
},
},
ResourceGroupName = "my-resource-group",
SyntheticMonitorId = "my-webtest-my-component",
Timeout = 30,
WebTestKind = AzureNative.Insights.WebTestKind.Ping,
WebTestName = "my-webtest-my-component",
});
});
package main
import (
insights "github.com/pulumi/pulumi-azure-native-sdk/insights"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := insights.NewWebTest(ctx, "webTest", &insights.WebTestArgs{
Configuration: &insights.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: insights.WebTestKindPing,
Location: pulumi.String("South Central US"),
Locations: []insights.WebTestGeolocationArgs{
{
Location: pulumi.String("us-fl-mia-edge"),
},
{
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: insights.WebTestKindPing,
WebTestName: pulumi.String("my-webtest-my-component"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.insights.WebTest;
import com.pulumi.azurenative.insights.WebTestArgs;
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(Map.of("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(
Map.of("location", "us-fl-mia-edge"),
Map.of("location", "apac-hk-hkn-azr"))
.resourceGroupName("my-resource-group")
.syntheticMonitorId("my-webtest-my-component")
.timeout(30)
.webTestKind("ping")
.webTestName("my-webtest-my-component")
.build());
}
}

Import

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

$ pulumi import azure-native:insights:WebTest my-webtest-my-component /subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-component

Constructors

Link copied to clipboard
constructor(configuration: Output<WebTestPropertiesConfigurationArgs>? = null, description: Output<String>? = null, enabled: Output<Boolean>? = null, frequency: Output<Int>? = null, kind: Output<WebTestKind>? = null, location: Output<String>? = null, locations: Output<List<WebTestGeolocationArgs>>? = null, resourceGroupName: Output<String>? = null, retryEnabled: Output<Boolean>? = null, syntheticMonitorId: Output<String>? = null, tags: Output<Map<String, String>>? = null, timeout: Output<Int>? = null, webTestKind: Output<WebTestKind>? = null, webTestName: Output<String>? = null)

Properties

Link copied to clipboard

An XML configuration specification for a WebTest.

Link copied to clipboard
val description: Output<String>? = null

Purpose/user defined descriptive test for this WebTest.

Link copied to clipboard
val enabled: Output<Boolean>? = null

Is the test actively being monitored.

Link copied to clipboard
val frequency: Output<Int>? = null

Interval in seconds between test runs for this WebTest. Default value is 300.

Link copied to clipboard
val kind: Output<WebTestKind>? = null

The kind of web test that this web test watches. Choices are ping and multistep.

Link copied to clipboard
val location: Output<String>? = null

Resource location

Link copied to clipboard
val locations: Output<List<WebTestGeolocationArgs>>? = null

A list of where to physically run the tests from to give global coverage for accessibility of your application.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val retryEnabled: Output<Boolean>? = null

Allow for retries should this WebTest fail.

Link copied to clipboard
val syntheticMonitorId: Output<String>? = null

Unique ID of this WebTest. This is typically the same value as the Name field.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags

Link copied to clipboard
val timeout: Output<Int>? = null

Seconds until this WebTest will timeout and fail. Default value is 30.

Link copied to clipboard
val webTestKind: Output<WebTestKind>? = null

The kind of web test this is, valid choices are ping and multistep.

Link copied to clipboard
val webTestName: Output<String>? = null

User defined name if this WebTest.

Functions

Link copied to clipboard
open override fun toJava(): WebTestArgs