StandardWebTest

class StandardWebTest : KotlinCustomResource

Manages a Application Insights Standard WebTest.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "rg-example",
location: "West Europe",
});
const exampleInsights = new azure.appinsights.Insights("example", {
name: "example",
location: example.location,
resourceGroupName: example.name,
applicationType: "web",
});
const exampleStandardWebTest = new azure.appinsights.StandardWebTest("example", {
name: "example-test",
resourceGroupName: example.name,
location: "West Europe",
applicationInsightsId: exampleInsights.id,
geoLocations: ["example"],
request: {
url: "http://www.example.com",
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="rg-example",
location="West Europe")
example_insights = azure.appinsights.Insights("example",
name="example",
location=example.location,
resource_group_name=example.name,
application_type="web")
example_standard_web_test = azure.appinsights.StandardWebTest("example",
name="example-test",
resource_group_name=example.name,
location="West Europe",
application_insights_id=example_insights.id,
geo_locations=["example"],
request={
"url": "http://www.example.com",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "rg-example",
Location = "West Europe",
});
var exampleInsights = new Azure.AppInsights.Insights("example", new()
{
Name = "example",
Location = example.Location,
ResourceGroupName = example.Name,
ApplicationType = "web",
});
var exampleStandardWebTest = new Azure.AppInsights.StandardWebTest("example", new()
{
Name = "example-test",
ResourceGroupName = example.Name,
Location = "West Europe",
ApplicationInsightsId = exampleInsights.Id,
GeoLocations = new[]
{
"example",
},
Request = new Azure.AppInsights.Inputs.StandardWebTestRequestArgs
{
Url = "http://www.example.com",
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("rg-example"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
Name: pulumi.String("example"),
Location: example.Location,
ResourceGroupName: example.Name,
ApplicationType: pulumi.String("web"),
})
if err != nil {
return err
}
_, err = appinsights.NewStandardWebTest(ctx, "example", &appinsights.StandardWebTestArgs{
Name: pulumi.String("example-test"),
ResourceGroupName: example.Name,
Location: pulumi.String("West Europe"),
ApplicationInsightsId: exampleInsights.ID(),
GeoLocations: pulumi.StringArray{
pulumi.String("example"),
},
Request: &appinsights.StandardWebTestRequestArgs{
Url: pulumi.String("http://www.example.com"),
},
})
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.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.appinsights.Insights;
import com.pulumi.azure.appinsights.InsightsArgs;
import com.pulumi.azure.appinsights.StandardWebTest;
import com.pulumi.azure.appinsights.StandardWebTestArgs;
import com.pulumi.azure.appinsights.inputs.StandardWebTestRequestArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("rg-example")
.location("West Europe")
.build());
var exampleInsights = new Insights("exampleInsights", InsightsArgs.builder()
.name("example")
.location(example.location())
.resourceGroupName(example.name())
.applicationType("web")
.build());
var exampleStandardWebTest = new StandardWebTest("exampleStandardWebTest", StandardWebTestArgs.builder()
.name("example-test")
.resourceGroupName(example.name())
.location("West Europe")
.applicationInsightsId(exampleInsights.id())
.geoLocations("example")
.request(StandardWebTestRequestArgs.builder()
.url("http://www.example.com")
.build())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: rg-example
location: West Europe
exampleInsights:
type: azure:appinsights:Insights
name: example
properties:
name: example
location: ${example.location}
resourceGroupName: ${example.name}
applicationType: web
exampleStandardWebTest:
type: azure:appinsights:StandardWebTest
name: example
properties:
name: example-test
resourceGroupName: ${example.name}
location: West Europe
applicationInsightsId: ${exampleInsights.id}
geoLocations:
- example
request:
url: http://www.example.com

API Providers

This resource uses the following Azure API Providers:

  • Microsoft.Insights: 2022-06-15

Import

Application Insights Standard WebTests can be imported using the resource id, e.g.

$ pulumi import azure:appinsights/standardWebTest:StandardWebTest example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Insights/webTests/appinsightswebtest

Properties

Link copied to clipboard

The ID of the Application Insights instance on which the WebTest operates. Changing this forces a new Application Insights Standard WebTest to be created.

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

Purpose/user defined descriptive test for this WebTest.

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

Should the WebTest be enabled?

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

Interval in seconds between test runs for this WebTest. Valid options are 300, 600 and 900. Defaults to 300.

Link copied to clipboard
val geoLocations: Output<List<String>>

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

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val location: Output<String>

The Azure Region where the Application Insights Standard WebTest should exist. Changing this forces a new Application Insights Standard WebTest to be created. It needs to correlate with location of the parent resource (azurerm_application_insights)

Link copied to clipboard
val name: Output<String>

The name which should be used for this Application Insights Standard WebTest. Changing this forces a new Application Insights Standard WebTest to be created.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A request block as defined below.

Link copied to clipboard

The name of the Resource Group where the Application Insights Standard WebTest should exist. Changing this forces a new Application Insights Standard WebTest to be created.

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

Should the retry on WebTest failure be enabled?

Link copied to clipboard

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>>?

A mapping of tags which should be assigned to the Application Insights Standard WebTest.

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

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

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

A validation_rules block as defined below.