We recommend using Azure Native.
azure.appinsights.Insights
Explore with Pulumi AI
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/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
})
}
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/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
})
}
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.
Constructor 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Insights resource accepts the following input properties:
- Application
Type 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 andweb
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 stringName - 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 doubleCap In Gb - Specifies the Application Insights component daily data volume cap in GB. Defaults to
100
. - Daily
Data boolCap Notifications Disabled - Specifies if a notification email will be sent when the daily data volume cap is met. Defaults to
false
. - Disable
Ip boolMasking - 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 tofalse
. - Force
Customer boolStorage For Profiler - Should the Application Insights component force users to create their own storage account for profiling? Defaults to
false
. - Internet
Ingestion boolEnabled - Should the Application Insights component support ingestion over the Public Internet? Defaults to
true
. - Internet
Query boolEnabled - Should the Application Insights component support querying over the Public Internet? Defaults to
true
. - Local
Authentication boolDisabled - 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.
- Retention
In intDays - Specifies the retention period in days. Possible values are
30
,60
,90
,120
,180
,270
,365
,550
or730
. Defaults to90
. - Sampling
Percentage double - Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to
100
. - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Workspace
Id string Specifies the id of a log analytics workspace resource.
NOTE:
workspace_id
cannot be removed after set. More details can be found at Migrate to workspace-based Application Insights resources. Ifworkspace_id
is not specified but you encounter a diff, this might indicate a Microsoft initiated automatic migration from classic resources to workspace-based resources. If this is the case, please updateworkspace_id
in the config file to the new value.
- Application
Type 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 andweb
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 stringName - 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 float64Cap In Gb - Specifies the Application Insights component daily data volume cap in GB. Defaults to
100
. - Daily
Data boolCap Notifications Disabled - Specifies if a notification email will be sent when the daily data volume cap is met. Defaults to
false
. - Disable
Ip boolMasking - 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 tofalse
. - Force
Customer boolStorage For Profiler - Should the Application Insights component force users to create their own storage account for profiling? Defaults to
false
. - Internet
Ingestion boolEnabled - Should the Application Insights component support ingestion over the Public Internet? Defaults to
true
. - Internet
Query boolEnabled - Should the Application Insights component support querying over the Public Internet? Defaults to
true
. - Local
Authentication boolDisabled - 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.
- Retention
In intDays - Specifies the retention period in days. Possible values are
30
,60
,90
,120
,180
,270
,365
,550
or730
. Defaults to90
. - Sampling
Percentage float64 - Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to
100
. - map[string]string
- A mapping of tags to assign to the resource.
- Workspace
Id string Specifies the id of a log analytics workspace resource.
NOTE:
workspace_id
cannot be removed after set. More details can be found at Migrate to workspace-based Application Insights resources. Ifworkspace_id
is not specified but you encounter a diff, this might indicate a Microsoft initiated automatic migration from classic resources to workspace-based resources. If this is the case, please updateworkspace_id
in the config file to the new value.
- application
Type 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 andweb
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 StringName - 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 DoubleCap In Gb - Specifies the Application Insights component daily data volume cap in GB. Defaults to
100
. - daily
Data BooleanCap Notifications Disabled - Specifies if a notification email will be sent when the daily data volume cap is met. Defaults to
false
. - disable
Ip BooleanMasking - 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 tofalse
. - force
Customer BooleanStorage For Profiler - Should the Application Insights component force users to create their own storage account for profiling? Defaults to
false
. - internet
Ingestion BooleanEnabled - Should the Application Insights component support ingestion over the Public Internet? Defaults to
true
. - internet
Query BooleanEnabled - Should the Application Insights component support querying over the Public Internet? Defaults to
true
. - local
Authentication BooleanDisabled - 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.
- retention
In IntegerDays - Specifies the retention period in days. Possible values are
30
,60
,90
,120
,180
,270
,365
,550
or730
. Defaults to90
. - sampling
Percentage Double - Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to
100
. - Map<String,String>
- A mapping of tags to assign to the resource.
- workspace
Id String Specifies the id of a log analytics workspace resource.
NOTE:
workspace_id
cannot be removed after set. More details can be found at Migrate to workspace-based Application Insights resources. Ifworkspace_id
is not specified but you encounter a diff, this might indicate a Microsoft initiated automatic migration from classic resources to workspace-based resources. If this is the case, please updateworkspace_id
in the config file to the new value.
- application
Type 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 andweb
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 stringName - 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 numberCap In Gb - Specifies the Application Insights component daily data volume cap in GB. Defaults to
100
. - daily
Data booleanCap Notifications Disabled - Specifies if a notification email will be sent when the daily data volume cap is met. Defaults to
false
. - disable
Ip booleanMasking - 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 tofalse
. - force
Customer booleanStorage For Profiler - Should the Application Insights component force users to create their own storage account for profiling? Defaults to
false
. - internet
Ingestion booleanEnabled - Should the Application Insights component support ingestion over the Public Internet? Defaults to
true
. - internet
Query booleanEnabled - Should the Application Insights component support querying over the Public Internet? Defaults to
true
. - local
Authentication booleanDisabled - 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.
- retention
In numberDays - Specifies the retention period in days. Possible values are
30
,60
,90
,120
,180
,270
,365
,550
or730
. Defaults to90
. - sampling
Percentage number - Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to
100
. - {[key: string]: string}
- A mapping of tags to assign to the resource.
- workspace
Id string Specifies the id of a log analytics workspace resource.
NOTE:
workspace_id
cannot be removed after set. More details can be found at Migrate to workspace-based Application Insights resources. Ifworkspace_id
is not specified but you encounter a diff, this might indicate a Microsoft initiated automatic migration from classic resources to workspace-based resources. If this is the case, please updateworkspace_id
in the config file to the new value.
- 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 andweb
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_ strname - 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_ floatcap_ in_ gb - Specifies the Application Insights component daily data volume cap in GB. Defaults to
100
. - daily_
data_ boolcap_ notifications_ disabled - Specifies if a notification email will be sent when the daily data volume cap is met. Defaults to
false
. - disable_
ip_ boolmasking - 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 tofalse
. - force_
customer_ boolstorage_ for_ profiler - Should the Application Insights component force users to create their own storage account for profiling? Defaults to
false
. - internet_
ingestion_ boolenabled - Should the Application Insights component support ingestion over the Public Internet? Defaults to
true
. - internet_
query_ boolenabled - Should the Application Insights component support querying over the Public Internet? Defaults to
true
. - local_
authentication_ booldisabled - 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_ intdays - Specifies the retention period in days. Possible values are
30
,60
,90
,120
,180
,270
,365
,550
or730
. Defaults to90
. - sampling_
percentage float - Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to
100
. - 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:
workspace_id
cannot be removed after set. More details can be found at Migrate to workspace-based Application Insights resources. Ifworkspace_id
is not specified but you encounter a diff, this might indicate a Microsoft initiated automatic migration from classic resources to workspace-based resources. If this is the case, please updateworkspace_id
in the config file to the new value.
- application
Type 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 andweb
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 StringName - 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 NumberCap In Gb - Specifies the Application Insights component daily data volume cap in GB. Defaults to
100
. - daily
Data BooleanCap Notifications Disabled - Specifies if a notification email will be sent when the daily data volume cap is met. Defaults to
false
. - disable
Ip BooleanMasking - 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 tofalse
. - force
Customer BooleanStorage For Profiler - Should the Application Insights component force users to create their own storage account for profiling? Defaults to
false
. - internet
Ingestion BooleanEnabled - Should the Application Insights component support ingestion over the Public Internet? Defaults to
true
. - internet
Query BooleanEnabled - Should the Application Insights component support querying over the Public Internet? Defaults to
true
. - local
Authentication BooleanDisabled - 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.
- retention
In NumberDays - Specifies the retention period in days. Possible values are
30
,60
,90
,120
,180
,270
,365
,550
or730
. Defaults to90
. - sampling
Percentage Number - Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to
100
. - Map<String>
- A mapping of tags to assign to the resource.
- workspace
Id String Specifies the id of a log analytics workspace resource.
NOTE:
workspace_id
cannot be removed after set. More details can be found at Migrate to workspace-based Application Insights resources. Ifworkspace_id
is not specified but you encounter a diff, this might indicate a Microsoft initiated automatic migration from classic resources to workspace-based resources. If this is the case, please updateworkspace_id
in the config file to the new value.
Outputs
All input properties are implicitly available as output properties. Additionally, the Insights resource produces the following output properties:
- App
Id string - The App ID associated with this Application Insights component.
- Connection
String string - The Connection String for this Application Insights component. (Sensitive)
- Id string
- The provider-assigned unique ID for this managed resource.
- Instrumentation
Key string - The Instrumentation Key for this Application Insights component. (Sensitive)
- App
Id string - The App ID associated with this Application Insights component.
- Connection
String string - The Connection String for this Application Insights component. (Sensitive)
- Id string
- The provider-assigned unique ID for this managed resource.
- Instrumentation
Key string - The Instrumentation Key for this Application Insights component. (Sensitive)
- app
Id String - The App ID associated with this Application Insights component.
- connection
String String - The Connection String for this Application Insights component. (Sensitive)
- id String
- The provider-assigned unique ID for this managed resource.
- instrumentation
Key String - The Instrumentation Key for this Application Insights component. (Sensitive)
- app
Id string - The App ID associated with this Application Insights component.
- connection
String string - The Connection String for this Application Insights component. (Sensitive)
- id string
- The provider-assigned unique ID for this managed resource.
- instrumentation
Key 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)
- app
Id String - The App ID associated with this Application Insights component.
- connection
String String - The Connection String for this Application Insights component. (Sensitive)
- id String
- The provider-assigned unique ID for this managed resource.
- instrumentation
Key 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.
- App
Id string - The App ID associated with this Application Insights component.
- Application
Type 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 andweb
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 string - The Connection String for this Application Insights component. (Sensitive)
- Daily
Data doubleCap In Gb - Specifies the Application Insights component daily data volume cap in GB. Defaults to
100
. - Daily
Data boolCap Notifications Disabled - Specifies if a notification email will be sent when the daily data volume cap is met. Defaults to
false
. - Disable
Ip boolMasking - 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 tofalse
. - Force
Customer boolStorage For Profiler - Should the Application Insights component force users to create their own storage account for profiling? Defaults to
false
. - Instrumentation
Key string - The Instrumentation Key for this Application Insights component. (Sensitive)
- Internet
Ingestion boolEnabled - Should the Application Insights component support ingestion over the Public Internet? Defaults to
true
. - Internet
Query boolEnabled - Should the Application Insights component support querying over the Public Internet? Defaults to
true
. - Local
Authentication boolDisabled - 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.
- Resource
Group stringName - 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 intDays - Specifies the retention period in days. Possible values are
30
,60
,90
,120
,180
,270
,365
,550
or730
. Defaults to90
. - Sampling
Percentage double - Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to
100
. - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Workspace
Id string Specifies the id of a log analytics workspace resource.
NOTE:
workspace_id
cannot be removed after set. More details can be found at Migrate to workspace-based Application Insights resources. Ifworkspace_id
is not specified but you encounter a diff, this might indicate a Microsoft initiated automatic migration from classic resources to workspace-based resources. If this is the case, please updateworkspace_id
in the config file to the new value.
- App
Id string - The App ID associated with this Application Insights component.
- Application
Type 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 andweb
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 string - The Connection String for this Application Insights component. (Sensitive)
- Daily
Data float64Cap In Gb - Specifies the Application Insights component daily data volume cap in GB. Defaults to
100
. - Daily
Data boolCap Notifications Disabled - Specifies if a notification email will be sent when the daily data volume cap is met. Defaults to
false
. - Disable
Ip boolMasking - 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 tofalse
. - Force
Customer boolStorage For Profiler - Should the Application Insights component force users to create their own storage account for profiling? Defaults to
false
. - Instrumentation
Key string - The Instrumentation Key for this Application Insights component. (Sensitive)
- Internet
Ingestion boolEnabled - Should the Application Insights component support ingestion over the Public Internet? Defaults to
true
. - Internet
Query boolEnabled - Should the Application Insights component support querying over the Public Internet? Defaults to
true
. - Local
Authentication boolDisabled - 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.
- Resource
Group stringName - 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 intDays - Specifies the retention period in days. Possible values are
30
,60
,90
,120
,180
,270
,365
,550
or730
. Defaults to90
. - Sampling
Percentage float64 - Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to
100
. - map[string]string
- A mapping of tags to assign to the resource.
- Workspace
Id string Specifies the id of a log analytics workspace resource.
NOTE:
workspace_id
cannot be removed after set. More details can be found at Migrate to workspace-based Application Insights resources. Ifworkspace_id
is not specified but you encounter a diff, this might indicate a Microsoft initiated automatic migration from classic resources to workspace-based resources. If this is the case, please updateworkspace_id
in the config file to the new value.
- app
Id String - The App ID associated with this Application Insights component.
- application
Type 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 andweb
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 String - The Connection String for this Application Insights component. (Sensitive)
- daily
Data DoubleCap In Gb - Specifies the Application Insights component daily data volume cap in GB. Defaults to
100
. - daily
Data BooleanCap Notifications Disabled - Specifies if a notification email will be sent when the daily data volume cap is met. Defaults to
false
. - disable
Ip BooleanMasking - 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 tofalse
. - force
Customer BooleanStorage For Profiler - Should the Application Insights component force users to create their own storage account for profiling? Defaults to
false
. - instrumentation
Key String - The Instrumentation Key for this Application Insights component. (Sensitive)
- internet
Ingestion BooleanEnabled - Should the Application Insights component support ingestion over the Public Internet? Defaults to
true
. - internet
Query BooleanEnabled - Should the Application Insights component support querying over the Public Internet? Defaults to
true
. - local
Authentication BooleanDisabled - 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.
- resource
Group StringName - 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 IntegerDays - Specifies the retention period in days. Possible values are
30
,60
,90
,120
,180
,270
,365
,550
or730
. Defaults to90
. - sampling
Percentage Double - Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to
100
. - Map<String,String>
- A mapping of tags to assign to the resource.
- workspace
Id String Specifies the id of a log analytics workspace resource.
NOTE:
workspace_id
cannot be removed after set. More details can be found at Migrate to workspace-based Application Insights resources. Ifworkspace_id
is not specified but you encounter a diff, this might indicate a Microsoft initiated automatic migration from classic resources to workspace-based resources. If this is the case, please updateworkspace_id
in the config file to the new value.
- app
Id string - The App ID associated with this Application Insights component.
- application
Type 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 andweb
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 string - The Connection String for this Application Insights component. (Sensitive)
- daily
Data numberCap In Gb - Specifies the Application Insights component daily data volume cap in GB. Defaults to
100
. - daily
Data booleanCap Notifications Disabled - Specifies if a notification email will be sent when the daily data volume cap is met. Defaults to
false
. - disable
Ip booleanMasking - 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 tofalse
. - force
Customer booleanStorage For Profiler - Should the Application Insights component force users to create their own storage account for profiling? Defaults to
false
. - instrumentation
Key string - The Instrumentation Key for this Application Insights component. (Sensitive)
- internet
Ingestion booleanEnabled - Should the Application Insights component support ingestion over the Public Internet? Defaults to
true
. - internet
Query booleanEnabled - Should the Application Insights component support querying over the Public Internet? Defaults to
true
. - local
Authentication booleanDisabled - 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.
- resource
Group stringName - 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 numberDays - Specifies the retention period in days. Possible values are
30
,60
,90
,120
,180
,270
,365
,550
or730
. Defaults to90
. - sampling
Percentage number - Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to
100
. - {[key: string]: string}
- A mapping of tags to assign to the resource.
- workspace
Id string Specifies the id of a log analytics workspace resource.
NOTE:
workspace_id
cannot be removed after set. More details can be found at Migrate to workspace-based Application Insights resources. Ifworkspace_id
is not specified but you encounter a diff, this might indicate a Microsoft initiated automatic migration from classic resources to workspace-based resources. If this is the case, please updateworkspace_id
in the config file to the new value.
- 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 andweb
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_ floatcap_ in_ gb - Specifies the Application Insights component daily data volume cap in GB. Defaults to
100
. - daily_
data_ boolcap_ notifications_ disabled - Specifies if a notification email will be sent when the daily data volume cap is met. Defaults to
false
. - disable_
ip_ boolmasking - 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 tofalse
. - force_
customer_ boolstorage_ for_ profiler - 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_ boolenabled - Should the Application Insights component support ingestion over the Public Internet? Defaults to
true
. - internet_
query_ boolenabled - Should the Application Insights component support querying over the Public Internet? Defaults to
true
. - local_
authentication_ booldisabled - 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_ strname - 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_ intdays - Specifies the retention period in days. Possible values are
30
,60
,90
,120
,180
,270
,365
,550
or730
. Defaults to90
. - sampling_
percentage float - Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to
100
. - 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:
workspace_id
cannot be removed after set. More details can be found at Migrate to workspace-based Application Insights resources. Ifworkspace_id
is not specified but you encounter a diff, this might indicate a Microsoft initiated automatic migration from classic resources to workspace-based resources. If this is the case, please updateworkspace_id
in the config file to the new value.
- app
Id String - The App ID associated with this Application Insights component.
- application
Type 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 andweb
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 String - The Connection String for this Application Insights component. (Sensitive)
- daily
Data NumberCap In Gb - Specifies the Application Insights component daily data volume cap in GB. Defaults to
100
. - daily
Data BooleanCap Notifications Disabled - Specifies if a notification email will be sent when the daily data volume cap is met. Defaults to
false
. - disable
Ip BooleanMasking - 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 tofalse
. - force
Customer BooleanStorage For Profiler - Should the Application Insights component force users to create their own storage account for profiling? Defaults to
false
. - instrumentation
Key String - The Instrumentation Key for this Application Insights component. (Sensitive)
- internet
Ingestion BooleanEnabled - Should the Application Insights component support ingestion over the Public Internet? Defaults to
true
. - internet
Query BooleanEnabled - Should the Application Insights component support querying over the Public Internet? Defaults to
true
. - local
Authentication BooleanDisabled - 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.
- resource
Group StringName - 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 NumberDays - Specifies the retention period in days. Possible values are
30
,60
,90
,120
,180
,270
,365
,550
or730
. Defaults to90
. - sampling
Percentage Number - Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to
100
. - Map<String>
- A mapping of tags to assign to the resource.
- workspace
Id String Specifies the id of a log analytics workspace resource.
NOTE:
workspace_id
cannot be removed after set. More details can be found at Migrate to workspace-based Application Insights resources. Ifworkspace_id
is not specified but you encounter a diff, this might indicate a Microsoft initiated automatic migration from classic resources to workspace-based resources. If this is the case, please updateworkspace_id
in the config file to the new value.
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.