1. Packages
  2. Azure Classic
  3. API Docs
  4. appinsights
  5. Insights

We recommend using Azure Native.

Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi

azure.appinsights.Insights

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi

    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)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appinsights"
    	"github.com/pulumi/pulumi-azure/sdk/v5/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
    	})
    }
    
    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 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)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appinsights"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/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
    	})
    }
    
    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 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}
    

    Create Insights Resource

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

    Constructor syntax

    new Insights(name: string, args: InsightsArgs, opts?: CustomResourceOptions);
    @overload
    def Insights(resource_name: str,
                 args: InsightsArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Insights(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 application_type: Optional[str] = None,
                 resource_group_name: Optional[str] = None,
                 internet_query_enabled: Optional[bool] = None,
                 disable_ip_masking: Optional[bool] = None,
                 force_customer_storage_for_profiler: Optional[bool] = None,
                 internet_ingestion_enabled: Optional[bool] = None,
                 daily_data_cap_notifications_disabled: Optional[bool] = None,
                 local_authentication_disabled: Optional[bool] = None,
                 location: Optional[str] = None,
                 name: Optional[str] = None,
                 daily_data_cap_in_gb: Optional[float] = None,
                 retention_in_days: Optional[int] = None,
                 sampling_percentage: Optional[float] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 workspace_id: Optional[str] = None)
    func NewInsights(ctx *Context, name string, args InsightsArgs, opts ...ResourceOption) (*Insights, error)
    public Insights(string name, InsightsArgs args, CustomResourceOptions? opts = null)
    public Insights(String name, InsightsArgs args)
    public Insights(String name, InsightsArgs args, CustomResourceOptions options)
    
    type: azure:appinsights:Insights
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

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

    Example

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

    var insightsResource = new Azure.AppInsights.Insights("insightsResource", new()
    {
        ApplicationType = "string",
        ResourceGroupName = "string",
        InternetQueryEnabled = false,
        DisableIpMasking = false,
        ForceCustomerStorageForProfiler = false,
        InternetIngestionEnabled = false,
        DailyDataCapNotificationsDisabled = false,
        LocalAuthenticationDisabled = false,
        Location = "string",
        Name = "string",
        DailyDataCapInGb = 0,
        RetentionInDays = 0,
        SamplingPercentage = 0,
        Tags = 
        {
            { "string", "string" },
        },
        WorkspaceId = "string",
    });
    
    example, err := appinsights.NewInsights(ctx, "insightsResource", &appinsights.InsightsArgs{
    	ApplicationType:                   pulumi.String("string"),
    	ResourceGroupName:                 pulumi.String("string"),
    	InternetQueryEnabled:              pulumi.Bool(false),
    	DisableIpMasking:                  pulumi.Bool(false),
    	ForceCustomerStorageForProfiler:   pulumi.Bool(false),
    	InternetIngestionEnabled:          pulumi.Bool(false),
    	DailyDataCapNotificationsDisabled: pulumi.Bool(false),
    	LocalAuthenticationDisabled:       pulumi.Bool(false),
    	Location:                          pulumi.String("string"),
    	Name:                              pulumi.String("string"),
    	DailyDataCapInGb:                  pulumi.Float64(0),
    	RetentionInDays:                   pulumi.Int(0),
    	SamplingPercentage:                pulumi.Float64(0),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	WorkspaceId: pulumi.String("string"),
    })
    
    var insightsResource = new Insights("insightsResource", InsightsArgs.builder()        
        .applicationType("string")
        .resourceGroupName("string")
        .internetQueryEnabled(false)
        .disableIpMasking(false)
        .forceCustomerStorageForProfiler(false)
        .internetIngestionEnabled(false)
        .dailyDataCapNotificationsDisabled(false)
        .localAuthenticationDisabled(false)
        .location("string")
        .name("string")
        .dailyDataCapInGb(0)
        .retentionInDays(0)
        .samplingPercentage(0)
        .tags(Map.of("string", "string"))
        .workspaceId("string")
        .build());
    
    insights_resource = azure.appinsights.Insights("insightsResource",
        application_type="string",
        resource_group_name="string",
        internet_query_enabled=False,
        disable_ip_masking=False,
        force_customer_storage_for_profiler=False,
        internet_ingestion_enabled=False,
        daily_data_cap_notifications_disabled=False,
        local_authentication_disabled=False,
        location="string",
        name="string",
        daily_data_cap_in_gb=0,
        retention_in_days=0,
        sampling_percentage=0,
        tags={
            "string": "string",
        },
        workspace_id="string")
    
    const insightsResource = new azure.appinsights.Insights("insightsResource", {
        applicationType: "string",
        resourceGroupName: "string",
        internetQueryEnabled: false,
        disableIpMasking: false,
        forceCustomerStorageForProfiler: false,
        internetIngestionEnabled: false,
        dailyDataCapNotificationsDisabled: false,
        localAuthenticationDisabled: false,
        location: "string",
        name: "string",
        dailyDataCapInGb: 0,
        retentionInDays: 0,
        samplingPercentage: 0,
        tags: {
            string: "string",
        },
        workspaceId: "string",
    });
    
    type: azure:appinsights:Insights
    properties:
        applicationType: string
        dailyDataCapInGb: 0
        dailyDataCapNotificationsDisabled: false
        disableIpMasking: false
        forceCustomerStorageForProfiler: false
        internetIngestionEnabled: false
        internetQueryEnabled: false
        localAuthenticationDisabled: false
        location: string
        name: string
        resourceGroupName: string
        retentionInDays: 0
        samplingPercentage: 0
        tags:
            string: string
        workspaceId: string
    

    Insights Resource Properties

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

    Inputs

    The Insights resource accepts the following input properties:

    ApplicationType string
    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.
    ResourceGroupName string
    The name of the resource group in which to create the Application Insights component. Changing this forces a new resource to be created.
    DailyDataCapInGb double
    Specifies the Application Insights component daily data volume cap in GB.
    DailyDataCapNotificationsDisabled bool
    Specifies if a notification email will be send when the daily data volume cap is met.
    DisableIpMasking bool
    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.
    ForceCustomerStorageForProfiler bool
    Should the Application Insights component force users to create their own storage account for profiling? Defaults to false.
    InternetIngestionEnabled bool
    Should the Application Insights component support ingestion over the Public Internet? Defaults to true.
    InternetQueryEnabled bool
    Should the Application Insights component support querying over the Public Internet? Defaults to true.
    LocalAuthenticationDisabled bool
    Disable Non-Azure AD based Auth. Defaults to false.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Application Insights component. Changing this forces a new resource to be created.
    RetentionInDays int
    Specifies the retention period in days. Possible values are 30, 60, 90, 120, 180, 270, 365, 550 or 730. Defaults to 90.
    SamplingPercentage double
    Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to 100.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    WorkspaceId string

    Specifies the id of a log analytics workspace resource.

    NOTE: This can not be removed after set. More details can be found at Migrate to workspace-based Application Insights resources

    ApplicationType string
    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.
    ResourceGroupName string
    The name of the resource group in which to create the Application Insights component. Changing this forces a new resource to be created.
    DailyDataCapInGb float64
    Specifies the Application Insights component daily data volume cap in GB.
    DailyDataCapNotificationsDisabled bool
    Specifies if a notification email will be send when the daily data volume cap is met.
    DisableIpMasking bool
    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.
    ForceCustomerStorageForProfiler bool
    Should the Application Insights component force users to create their own storage account for profiling? Defaults to false.
    InternetIngestionEnabled bool
    Should the Application Insights component support ingestion over the Public Internet? Defaults to true.
    InternetQueryEnabled bool
    Should the Application Insights component support querying over the Public Internet? Defaults to true.
    LocalAuthenticationDisabled bool
    Disable Non-Azure AD based Auth. Defaults to false.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Application Insights component. Changing this forces a new resource to be created.
    RetentionInDays int
    Specifies the retention period in days. Possible values are 30, 60, 90, 120, 180, 270, 365, 550 or 730. Defaults to 90.
    SamplingPercentage float64
    Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to 100.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    WorkspaceId string

    Specifies the id of a log analytics workspace resource.

    NOTE: This can not be removed after set. More details can be found at Migrate to workspace-based Application Insights resources

    applicationType String
    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.
    resourceGroupName String
    The name of the resource group in which to create the Application Insights component. Changing this forces a new resource to be created.
    dailyDataCapInGb Double
    Specifies the Application Insights component daily data volume cap in GB.
    dailyDataCapNotificationsDisabled Boolean
    Specifies if a notification email will be send when the daily data volume cap is met.
    disableIpMasking Boolean
    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.
    forceCustomerStorageForProfiler Boolean
    Should the Application Insights component force users to create their own storage account for profiling? Defaults to false.
    internetIngestionEnabled Boolean
    Should the Application Insights component support ingestion over the Public Internet? Defaults to true.
    internetQueryEnabled Boolean
    Should the Application Insights component support querying over the Public Internet? Defaults to true.
    localAuthenticationDisabled Boolean
    Disable Non-Azure AD based Auth. Defaults to false.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Application Insights component. Changing this forces a new resource to be created.
    retentionInDays Integer
    Specifies the retention period in days. Possible values are 30, 60, 90, 120, 180, 270, 365, 550 or 730. Defaults to 90.
    samplingPercentage Double
    Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to 100.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    workspaceId String

    Specifies the id of a log analytics workspace resource.

    NOTE: This can not be removed after set. More details can be found at Migrate to workspace-based Application Insights resources

    applicationType string
    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.
    resourceGroupName string
    The name of the resource group in which to create the Application Insights component. Changing this forces a new resource to be created.
    dailyDataCapInGb number
    Specifies the Application Insights component daily data volume cap in GB.
    dailyDataCapNotificationsDisabled boolean
    Specifies if a notification email will be send when the daily data volume cap is met.
    disableIpMasking boolean
    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.
    forceCustomerStorageForProfiler boolean
    Should the Application Insights component force users to create their own storage account for profiling? Defaults to false.
    internetIngestionEnabled boolean
    Should the Application Insights component support ingestion over the Public Internet? Defaults to true.
    internetQueryEnabled boolean
    Should the Application Insights component support querying over the Public Internet? Defaults to true.
    localAuthenticationDisabled boolean
    Disable Non-Azure AD based Auth. Defaults to false.
    location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name string
    Specifies the name of the Application Insights component. Changing this forces a new resource to be created.
    retentionInDays number
    Specifies the retention period in days. Possible values are 30, 60, 90, 120, 180, 270, 365, 550 or 730. Defaults to 90.
    samplingPercentage number
    Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to 100.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    workspaceId string

    Specifies the id of a log analytics workspace resource.

    NOTE: This can not be removed after set. More details can be found at Migrate to workspace-based Application Insights resources

    application_type str
    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.
    resource_group_name str
    The name of the resource group in which to create the Application Insights component. Changing this forces a new resource to be created.
    daily_data_cap_in_gb float
    Specifies the Application Insights component daily data volume cap in GB.
    daily_data_cap_notifications_disabled bool
    Specifies if a notification email will be send when the daily data volume cap is met.
    disable_ip_masking bool
    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.
    force_customer_storage_for_profiler bool
    Should the Application Insights component force users to create their own storage account for profiling? Defaults to false.
    internet_ingestion_enabled bool
    Should the Application Insights component support ingestion over the Public Internet? Defaults to true.
    internet_query_enabled bool
    Should the Application Insights component support querying over the Public Internet? Defaults to true.
    local_authentication_disabled bool
    Disable Non-Azure AD based Auth. Defaults to false.
    location str
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name str
    Specifies the name of the Application Insights component. Changing this forces a new resource to be created.
    retention_in_days int
    Specifies the retention period in days. Possible values are 30, 60, 90, 120, 180, 270, 365, 550 or 730. Defaults to 90.
    sampling_percentage float
    Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to 100.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    workspace_id str

    Specifies the id of a log analytics workspace resource.

    NOTE: This can not be removed after set. More details can be found at Migrate to workspace-based Application Insights resources

    applicationType String
    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.
    resourceGroupName String
    The name of the resource group in which to create the Application Insights component. Changing this forces a new resource to be created.
    dailyDataCapInGb Number
    Specifies the Application Insights component daily data volume cap in GB.
    dailyDataCapNotificationsDisabled Boolean
    Specifies if a notification email will be send when the daily data volume cap is met.
    disableIpMasking Boolean
    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.
    forceCustomerStorageForProfiler Boolean
    Should the Application Insights component force users to create their own storage account for profiling? Defaults to false.
    internetIngestionEnabled Boolean
    Should the Application Insights component support ingestion over the Public Internet? Defaults to true.
    internetQueryEnabled Boolean
    Should the Application Insights component support querying over the Public Internet? Defaults to true.
    localAuthenticationDisabled Boolean
    Disable Non-Azure AD based Auth. Defaults to false.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Application Insights component. Changing this forces a new resource to be created.
    retentionInDays Number
    Specifies the retention period in days. Possible values are 30, 60, 90, 120, 180, 270, 365, 550 or 730. Defaults to 90.
    samplingPercentage Number
    Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to 100.
    tags Map<String>
    A mapping of tags to assign to the resource.
    workspaceId String

    Specifies the id of a log analytics workspace resource.

    NOTE: This can not be removed after set. More details can be found at Migrate to workspace-based Application Insights resources

    Outputs

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

    AppId string
    The App ID associated with this Application Insights component.
    ConnectionString string
    The Connection String for this Application Insights component. (Sensitive)
    Id string
    The provider-assigned unique ID for this managed resource.
    InstrumentationKey string
    The Instrumentation Key for this Application Insights component. (Sensitive)
    AppId string
    The App ID associated with this Application Insights component.
    ConnectionString string
    The Connection String for this Application Insights component. (Sensitive)
    Id string
    The provider-assigned unique ID for this managed resource.
    InstrumentationKey string
    The Instrumentation Key for this Application Insights component. (Sensitive)
    appId String
    The App ID associated with this Application Insights component.
    connectionString String
    The Connection String for this Application Insights component. (Sensitive)
    id String
    The provider-assigned unique ID for this managed resource.
    instrumentationKey String
    The Instrumentation Key for this Application Insights component. (Sensitive)
    appId string
    The App ID associated with this Application Insights component.
    connectionString string
    The Connection String for this Application Insights component. (Sensitive)
    id string
    The provider-assigned unique ID for this managed resource.
    instrumentationKey string
    The Instrumentation Key for this Application Insights component. (Sensitive)
    app_id str
    The App ID associated with this Application Insights component.
    connection_string str
    The Connection String for this Application Insights component. (Sensitive)
    id str
    The provider-assigned unique ID for this managed resource.
    instrumentation_key str
    The Instrumentation Key for this Application Insights component. (Sensitive)
    appId String
    The App ID associated with this Application Insights component.
    connectionString String
    The Connection String for this Application Insights component. (Sensitive)
    id String
    The provider-assigned unique ID for this managed resource.
    instrumentationKey String
    The Instrumentation Key for this Application Insights component. (Sensitive)

    Look up Existing Insights Resource

    Get an existing Insights resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: InsightsState, opts?: CustomResourceOptions): Insights
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            app_id: Optional[str] = None,
            application_type: Optional[str] = None,
            connection_string: Optional[str] = None,
            daily_data_cap_in_gb: Optional[float] = None,
            daily_data_cap_notifications_disabled: Optional[bool] = None,
            disable_ip_masking: Optional[bool] = None,
            force_customer_storage_for_profiler: Optional[bool] = None,
            instrumentation_key: Optional[str] = None,
            internet_ingestion_enabled: Optional[bool] = None,
            internet_query_enabled: Optional[bool] = None,
            local_authentication_disabled: Optional[bool] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            retention_in_days: Optional[int] = None,
            sampling_percentage: Optional[float] = None,
            tags: Optional[Mapping[str, str]] = None,
            workspace_id: Optional[str] = None) -> Insights
    func GetInsights(ctx *Context, name string, id IDInput, state *InsightsState, opts ...ResourceOption) (*Insights, error)
    public static Insights Get(string name, Input<string> id, InsightsState? state, CustomResourceOptions? opts = null)
    public static Insights get(String name, Output<String> id, InsightsState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AppId string
    The App ID associated with this Application Insights component.
    ApplicationType string
    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.
    ConnectionString string
    The Connection String for this Application Insights component. (Sensitive)
    DailyDataCapInGb double
    Specifies the Application Insights component daily data volume cap in GB.
    DailyDataCapNotificationsDisabled bool
    Specifies if a notification email will be send when the daily data volume cap is met.
    DisableIpMasking bool
    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.
    ForceCustomerStorageForProfiler bool
    Should the Application Insights component force users to create their own storage account for profiling? Defaults to false.
    InstrumentationKey string
    The Instrumentation Key for this Application Insights component. (Sensitive)
    InternetIngestionEnabled bool
    Should the Application Insights component support ingestion over the Public Internet? Defaults to true.
    InternetQueryEnabled bool
    Should the Application Insights component support querying over the Public Internet? Defaults to true.
    LocalAuthenticationDisabled bool
    Disable Non-Azure AD based Auth. Defaults to false.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Application Insights component. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which to create the Application Insights component. Changing this forces a new resource to be created.
    RetentionInDays int
    Specifies the retention period in days. Possible values are 30, 60, 90, 120, 180, 270, 365, 550 or 730. Defaults to 90.
    SamplingPercentage double
    Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to 100.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    WorkspaceId string

    Specifies the id of a log analytics workspace resource.

    NOTE: This can not be removed after set. More details can be found at Migrate to workspace-based Application Insights resources

    AppId string
    The App ID associated with this Application Insights component.
    ApplicationType string
    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.
    ConnectionString string
    The Connection String for this Application Insights component. (Sensitive)
    DailyDataCapInGb float64
    Specifies the Application Insights component daily data volume cap in GB.
    DailyDataCapNotificationsDisabled bool
    Specifies if a notification email will be send when the daily data volume cap is met.
    DisableIpMasking bool
    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.
    ForceCustomerStorageForProfiler bool
    Should the Application Insights component force users to create their own storage account for profiling? Defaults to false.
    InstrumentationKey string
    The Instrumentation Key for this Application Insights component. (Sensitive)
    InternetIngestionEnabled bool
    Should the Application Insights component support ingestion over the Public Internet? Defaults to true.
    InternetQueryEnabled bool
    Should the Application Insights component support querying over the Public Internet? Defaults to true.
    LocalAuthenticationDisabled bool
    Disable Non-Azure AD based Auth. Defaults to false.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Application Insights component. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which to create the Application Insights component. Changing this forces a new resource to be created.
    RetentionInDays int
    Specifies the retention period in days. Possible values are 30, 60, 90, 120, 180, 270, 365, 550 or 730. Defaults to 90.
    SamplingPercentage float64
    Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to 100.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    WorkspaceId string

    Specifies the id of a log analytics workspace resource.

    NOTE: This can not be removed after set. More details can be found at Migrate to workspace-based Application Insights resources

    appId String
    The App ID associated with this Application Insights component.
    applicationType String
    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.
    connectionString String
    The Connection String for this Application Insights component. (Sensitive)
    dailyDataCapInGb Double
    Specifies the Application Insights component daily data volume cap in GB.
    dailyDataCapNotificationsDisabled Boolean
    Specifies if a notification email will be send when the daily data volume cap is met.
    disableIpMasking Boolean
    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.
    forceCustomerStorageForProfiler Boolean
    Should the Application Insights component force users to create their own storage account for profiling? Defaults to false.
    instrumentationKey String
    The Instrumentation Key for this Application Insights component. (Sensitive)
    internetIngestionEnabled Boolean
    Should the Application Insights component support ingestion over the Public Internet? Defaults to true.
    internetQueryEnabled Boolean
    Should the Application Insights component support querying over the Public Internet? Defaults to true.
    localAuthenticationDisabled Boolean
    Disable Non-Azure AD based Auth. Defaults to false.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Application Insights component. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which to create the Application Insights component. Changing this forces a new resource to be created.
    retentionInDays Integer
    Specifies the retention period in days. Possible values are 30, 60, 90, 120, 180, 270, 365, 550 or 730. Defaults to 90.
    samplingPercentage Double
    Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to 100.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    workspaceId String

    Specifies the id of a log analytics workspace resource.

    NOTE: This can not be removed after set. More details can be found at Migrate to workspace-based Application Insights resources

    appId string
    The App ID associated with this Application Insights component.
    applicationType string
    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.
    connectionString string
    The Connection String for this Application Insights component. (Sensitive)
    dailyDataCapInGb number
    Specifies the Application Insights component daily data volume cap in GB.
    dailyDataCapNotificationsDisabled boolean
    Specifies if a notification email will be send when the daily data volume cap is met.
    disableIpMasking boolean
    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.
    forceCustomerStorageForProfiler boolean
    Should the Application Insights component force users to create their own storage account for profiling? Defaults to false.
    instrumentationKey string
    The Instrumentation Key for this Application Insights component. (Sensitive)
    internetIngestionEnabled boolean
    Should the Application Insights component support ingestion over the Public Internet? Defaults to true.
    internetQueryEnabled boolean
    Should the Application Insights component support querying over the Public Internet? Defaults to true.
    localAuthenticationDisabled boolean
    Disable Non-Azure AD based Auth. Defaults to false.
    location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name string
    Specifies the name of the Application Insights component. Changing this forces a new resource to be created.
    resourceGroupName string
    The name of the resource group in which to create the Application Insights component. Changing this forces a new resource to be created.
    retentionInDays number
    Specifies the retention period in days. Possible values are 30, 60, 90, 120, 180, 270, 365, 550 or 730. Defaults to 90.
    samplingPercentage number
    Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to 100.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    workspaceId string

    Specifies the id of a log analytics workspace resource.

    NOTE: This can not be removed after set. More details can be found at Migrate to workspace-based Application Insights resources

    app_id str
    The App ID associated with this Application Insights component.
    application_type str
    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.
    connection_string str
    The Connection String for this Application Insights component. (Sensitive)
    daily_data_cap_in_gb float
    Specifies the Application Insights component daily data volume cap in GB.
    daily_data_cap_notifications_disabled bool
    Specifies if a notification email will be send when the daily data volume cap is met.
    disable_ip_masking bool
    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.
    force_customer_storage_for_profiler bool
    Should the Application Insights component force users to create their own storage account for profiling? Defaults to false.
    instrumentation_key str
    The Instrumentation Key for this Application Insights component. (Sensitive)
    internet_ingestion_enabled bool
    Should the Application Insights component support ingestion over the Public Internet? Defaults to true.
    internet_query_enabled bool
    Should the Application Insights component support querying over the Public Internet? Defaults to true.
    local_authentication_disabled bool
    Disable Non-Azure AD based Auth. Defaults to false.
    location str
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name str
    Specifies the name of the Application Insights component. Changing this forces a new resource to be created.
    resource_group_name str
    The name of the resource group in which to create the Application Insights component. Changing this forces a new resource to be created.
    retention_in_days int
    Specifies the retention period in days. Possible values are 30, 60, 90, 120, 180, 270, 365, 550 or 730. Defaults to 90.
    sampling_percentage float
    Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to 100.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    workspace_id str

    Specifies the id of a log analytics workspace resource.

    NOTE: This can not be removed after set. More details can be found at Migrate to workspace-based Application Insights resources

    appId String
    The App ID associated with this Application Insights component.
    applicationType String
    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.
    connectionString String
    The Connection String for this Application Insights component. (Sensitive)
    dailyDataCapInGb Number
    Specifies the Application Insights component daily data volume cap in GB.
    dailyDataCapNotificationsDisabled Boolean
    Specifies if a notification email will be send when the daily data volume cap is met.
    disableIpMasking Boolean
    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.
    forceCustomerStorageForProfiler Boolean
    Should the Application Insights component force users to create their own storage account for profiling? Defaults to false.
    instrumentationKey String
    The Instrumentation Key for this Application Insights component. (Sensitive)
    internetIngestionEnabled Boolean
    Should the Application Insights component support ingestion over the Public Internet? Defaults to true.
    internetQueryEnabled Boolean
    Should the Application Insights component support querying over the Public Internet? Defaults to true.
    localAuthenticationDisabled Boolean
    Disable Non-Azure AD based Auth. Defaults to false.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Application Insights component. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which to create the Application Insights component. Changing this forces a new resource to be created.
    retentionInDays Number
    Specifies the retention period in days. Possible values are 30, 60, 90, 120, 180, 270, 365, 550 or 730. Defaults to 90.
    samplingPercentage Number
    Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to 100.
    tags Map<String>
    A mapping of tags to assign to the resource.
    workspaceId String

    Specifies the id of a log analytics workspace resource.

    NOTE: This can not be removed after set. More details can be found at Migrate to workspace-based Application Insights resources

    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
    

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

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi