InsightsArgs

data class InsightsArgs(val applicationType: Output<String>? = null, val dailyDataCapInGb: Output<Double>? = null, val dailyDataCapNotificationsDisabled: Output<Boolean>? = null, val disableIpMasking: Output<Boolean>? = null, val forceCustomerStorageForProfiler: Output<Boolean>? = null, val internetIngestionEnabled: Output<Boolean>? = null, val internetQueryEnabled: Output<Boolean>? = null, val localAuthenticationDisabled: Output<Boolean>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val retentionInDays: Output<Int>? = null, val samplingPercentage: Output<Double>? = null, val tags: Output<Map<String, String>>? = null, val workspaceId: Output<String>? = null) : ConvertibleToJava<InsightsArgs>

Manages an Application Insights component.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "tf-test",
location: "West Europe",
});
const exampleInsights = new azure.appinsights.Insights("example", {
name: "tf-test-appinsights",
location: example.location,
resourceGroupName: example.name,
applicationType: "web",
});
export const instrumentationKey = exampleInsights.instrumentationKey;
export const appId = exampleInsights.appId;
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="tf-test",
location="West Europe")
example_insights = azure.appinsights.Insights("example",
name="tf-test-appinsights",
location=example.location,
resource_group_name=example.name,
application_type="web")
pulumi.export("instrumentationKey", example_insights.instrumentation_key)
pulumi.export("appId", example_insights.app_id)
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 = "tf-test",
Location = "West Europe",
});
var exampleInsights = new Azure.AppInsights.Insights("example", new()
{
Name = "tf-test-appinsights",
Location = example.Location,
ResourceGroupName = example.Name,
ApplicationType = "web",
});
return new Dictionary<string, object?>
{
["instrumentationKey"] = exampleInsights.InstrumentationKey,
["appId"] = exampleInsights.AppId,
};
});
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("tf-test"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
Name: pulumi.String("tf-test-appinsights"),
Location: example.Location,
ResourceGroupName: example.Name,
ApplicationType: pulumi.String("web"),
})
if err != nil {
return err
}
ctx.Export("instrumentationKey", exampleInsights.InstrumentationKey)
ctx.Export("appId", exampleInsights.AppId)
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 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("tf-test")
.location("West Europe")
.build());
var exampleInsights = new Insights("exampleInsights", InsightsArgs.builder()
.name("tf-test-appinsights")
.location(example.location())
.resourceGroupName(example.name())
.applicationType("web")
.build());
ctx.export("instrumentationKey", exampleInsights.instrumentationKey());
ctx.export("appId", exampleInsights.appId());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: tf-test
location: West Europe
exampleInsights:
type: azure:appinsights:Insights
name: example
properties:
name: tf-test-appinsights
location: ${example.location}
resourceGroupName: ${example.name}
applicationType: web
outputs:
instrumentationKey: ${exampleInsights.instrumentationKey}
appId: ${exampleInsights.appId}

Workspace Mode

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "tf-test",
location: "West Europe",
});
const exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("example", {
name: "workspace-test",
location: example.location,
resourceGroupName: example.name,
sku: "PerGB2018",
retentionInDays: 30,
});
const exampleInsights = new azure.appinsights.Insights("example", {
name: "tf-test-appinsights",
location: example.location,
resourceGroupName: example.name,
workspaceId: exampleAnalyticsWorkspace.id,
applicationType: "web",
});
export const instrumentationKey = exampleInsights.instrumentationKey;
export const appId = exampleInsights.appId;
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="tf-test",
location="West Europe")
example_analytics_workspace = azure.operationalinsights.AnalyticsWorkspace("example",
name="workspace-test",
location=example.location,
resource_group_name=example.name,
sku="PerGB2018",
retention_in_days=30)
example_insights = azure.appinsights.Insights("example",
name="tf-test-appinsights",
location=example.location,
resource_group_name=example.name,
workspace_id=example_analytics_workspace.id,
application_type="web")
pulumi.export("instrumentationKey", example_insights.instrumentation_key)
pulumi.export("appId", example_insights.app_id)
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 = "tf-test",
Location = "West Europe",
});
var exampleAnalyticsWorkspace = new Azure.OperationalInsights.AnalyticsWorkspace("example", new()
{
Name = "workspace-test",
Location = example.Location,
ResourceGroupName = example.Name,
Sku = "PerGB2018",
RetentionInDays = 30,
});
var exampleInsights = new Azure.AppInsights.Insights("example", new()
{
Name = "tf-test-appinsights",
Location = example.Location,
ResourceGroupName = example.Name,
WorkspaceId = exampleAnalyticsWorkspace.Id,
ApplicationType = "web",
});
return new Dictionary<string, object?>
{
["instrumentationKey"] = exampleInsights.InstrumentationKey,
["appId"] = exampleInsights.AppId,
};
});
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-azure/sdk/v6/go/azure/operationalinsights"
"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("tf-test"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
Name: pulumi.String("workspace-test"),
Location: example.Location,
ResourceGroupName: example.Name,
Sku: pulumi.String("PerGB2018"),
RetentionInDays: pulumi.Int(30),
})
if err != nil {
return err
}
exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
Name: pulumi.String("tf-test-appinsights"),
Location: example.Location,
ResourceGroupName: example.Name,
WorkspaceId: exampleAnalyticsWorkspace.ID(),
ApplicationType: pulumi.String("web"),
})
if err != nil {
return err
}
ctx.Export("instrumentationKey", exampleInsights.InstrumentationKey)
ctx.Export("appId", exampleInsights.AppId)
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.operationalinsights.AnalyticsWorkspace;
import com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs;
import com.pulumi.azure.appinsights.Insights;
import com.pulumi.azure.appinsights.InsightsArgs;
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("tf-test")
.location("West Europe")
.build());
var exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()
.name("workspace-test")
.location(example.location())
.resourceGroupName(example.name())
.sku("PerGB2018")
.retentionInDays(30)
.build());
var exampleInsights = new Insights("exampleInsights", InsightsArgs.builder()
.name("tf-test-appinsights")
.location(example.location())
.resourceGroupName(example.name())
.workspaceId(exampleAnalyticsWorkspace.id())
.applicationType("web")
.build());
ctx.export("instrumentationKey", exampleInsights.instrumentationKey());
ctx.export("appId", exampleInsights.appId());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: tf-test
location: West Europe
exampleAnalyticsWorkspace:
type: azure:operationalinsights:AnalyticsWorkspace
name: example
properties:
name: workspace-test
location: ${example.location}
resourceGroupName: ${example.name}
sku: PerGB2018
retentionInDays: 30
exampleInsights:
type: azure:appinsights:Insights
name: example
properties:
name: tf-test-appinsights
location: ${example.location}
resourceGroupName: ${example.name}
workspaceId: ${exampleAnalyticsWorkspace.id}
applicationType: web
outputs:
instrumentationKey: ${exampleInsights.instrumentationKey}
appId: ${exampleInsights.appId}

Import

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

$ pulumi import azure:appinsights/insights:Insights instance1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Insights/components/instance1

Constructors

Link copied to clipboard
constructor(applicationType: Output<String>? = null, dailyDataCapInGb: Output<Double>? = null, dailyDataCapNotificationsDisabled: Output<Boolean>? = null, disableIpMasking: Output<Boolean>? = null, forceCustomerStorageForProfiler: Output<Boolean>? = null, internetIngestionEnabled: Output<Boolean>? = null, internetQueryEnabled: Output<Boolean>? = null, localAuthenticationDisabled: Output<Boolean>? = null, location: Output<String>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, retentionInDays: Output<Int>? = null, samplingPercentage: Output<Double>? = null, tags: Output<Map<String, String>>? = null, workspaceId: Output<String>? = null)

Properties

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

Specifies the type of Application Insights to create. Valid values are ios for iOS, java for Java web, MobileCenter for App Center, Node.JS for Node.js, other for General, phone for Windows Phone, store for Windows Store and web for ASP.NET. Please note these values are case sensitive; unmatched values are treated as ASP.NET by Azure. Changing this forces a new resource to be created.

Link copied to clipboard
val dailyDataCapInGb: Output<Double>? = null

Specifies the Application Insights component daily data volume cap in GB. Defaults to 100.

Link copied to clipboard

Specifies if a notification email will be sent when the daily data volume cap is met. Defaults to false.

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

By default the real client IP is masked as 0.0.0.0 in the logs. Use this argument to disable masking and log the real client IP. Defaults to false.

Link copied to clipboard

Should the Application Insights component force users to create their own storage account for profiling? Defaults to false.

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

Should the Application Insights component support ingestion over the Public Internet? Defaults to true.

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

Should the Application Insights component support querying over the Public Internet? Defaults to true.

Link copied to clipboard

Disable Non-Azure AD based Auth. Defaults to false.

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

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

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

Specifies the name of the Application Insights component. Changing this forces a new resource to be created.

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

The name of the resource group in which to create the Application Insights component. Changing this forces a new resource to be created.

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

Specifies the retention period in days. Possible values are 30, 60, 90, 120, 180, 270, 365, 550 or 730. Defaults to 90.

Link copied to clipboard
val samplingPercentage: Output<Double>? = null

Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to 100.

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

A mapping of tags to assign to the resource.

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

Specifies the id of a log analytics workspace resource.

Functions

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