Insights
Manages an Application Insights component.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleInsights = new Azure.AppInsights.Insights("exampleInsights", new Azure.AppInsights.InsightsArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
ApplicationType = "web",
});
this.InstrumentationKey = exampleInsights.InstrumentationKey;
this.AppId = exampleInsights.AppId;
}
[Output("instrumentationKey")]
public Output<string> InstrumentationKey { get; set; }
[Output("appId")]
public Output<string> AppId { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/appinsights"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleInsights, err := appinsights.NewInsights(ctx, "exampleInsights", &appinsights.InsightsArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
ApplicationType: pulumi.String("web"),
})
if err != nil {
return err
}
ctx.Export("instrumentationKey", exampleInsights.InstrumentationKey)
ctx.Export("appId", exampleInsights.AppId)
return nil
})
}import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_insights = azure.appinsights.Insights("exampleInsights",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
application_type="web")
pulumi.export("instrumentationKey", example_insights.instrumentation_key)
pulumi.export("appId", example_insights.app_id)import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleInsights = new azure.appinsights.Insights("exampleInsights", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
applicationType: "web",
});
export const instrumentationKey = exampleInsights.instrumentationKey;
export const appId = exampleInsights.appId;Create a Insights Resource
new Insights(name: string, args: InsightsArgs, opts?: CustomResourceOptions);def Insights(resource_name, opts=None, application_type=None, daily_data_cap_in_gb=None, daily_data_cap_notifications_disabled=None, disable_ip_masking=None, location=None, name=None, resource_group_name=None, retention_in_days=None, sampling_percentage=None, tags=None, __props__=None);func NewInsights(ctx *Context, name string, args InsightsArgs, opts ...ResourceOption) (*Insights, error)public Insights(string name, InsightsArgs args, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
Insights Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Insights resource accepts the following input properties:
- Application
Type string Specifies the type of Application Insights to create. Valid values are
iosfor iOS,javafor Java web,MobileCenterfor App Center,Node.JSfor Node.js,otherfor General,phonefor Windows Phone,storefor Windows Store andwebfor 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.
- Daily
Data doubleCap In Gb Specifies the Application Insights component daily data volume cap in GB.
- Daily
Data boolCap Notifications Disabled Specifies if a notification email will be send when the daily data volume cap is met.
- Disable
Ip boolMasking By default the real client ip is masked as
0.0.0.0in the logs. Use this argument to disable masking and log the real client ip. Defaults tofalse.- 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,550or730. Defaults to90.- Sampling
Percentage double Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry.
- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Application
Type string Specifies the type of Application Insights to create. Valid values are
iosfor iOS,javafor Java web,MobileCenterfor App Center,Node.JSfor Node.js,otherfor General,phonefor Windows Phone,storefor Windows Store andwebfor 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.
- Daily
Data float64Cap In Gb Specifies the Application Insights component daily data volume cap in GB.
- Daily
Data boolCap Notifications Disabled Specifies if a notification email will be send when the daily data volume cap is met.
- Disable
Ip boolMasking By default the real client ip is masked as
0.0.0.0in the logs. Use this argument to disable masking and log the real client ip. Defaults tofalse.- 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,550or730. Defaults to90.- Sampling
Percentage float64 Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry.
- map[string]string
A mapping of tags to assign to the resource.
- application
Type string Specifies the type of Application Insights to create. Valid values are
iosfor iOS,javafor Java web,MobileCenterfor App Center,Node.JSfor Node.js,otherfor General,phonefor Windows Phone,storefor Windows Store andwebfor 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.
- daily
Data numberCap In Gb Specifies the Application Insights component daily data volume cap in GB.
- daily
Data booleanCap Notifications Disabled Specifies if a notification email will be send when the daily data volume cap is met.
- disable
Ip booleanMasking By default the real client ip is masked as
0.0.0.0in the logs. Use this argument to disable masking and log the real client ip. Defaults tofalse.- 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,550or730. Defaults to90.- sampling
Percentage number Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry.
- {[key: string]: string}
A mapping of tags to assign to the resource.
- application_
type str Specifies the type of Application Insights to create. Valid values are
iosfor iOS,javafor Java web,MobileCenterfor App Center,Node.JSfor Node.js,otherfor General,phonefor Windows Phone,storefor Windows Store andwebfor 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.
- daily_
data_ floatcap_ in_ gb Specifies the Application Insights component daily data volume cap in GB.
- daily_
data_ boolcap_ notifications_ disabled Specifies if a notification email will be send when the daily data volume cap is met.
- disable_
ip_ boolmasking By default the real client ip is masked as
0.0.0.0in the logs. Use this argument to disable masking and log the real client ip. Defaults tofalse.- 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_ floatdays Specifies the retention period in days. Possible values are
30,60,90,120,180,270,365,550or730. Defaults to90.- sampling_
percentage float Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry.
- Dict[str, str]
A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Insights resource produces the following output properties:
Look up an 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): Insightsstatic get(resource_name, id, opts=None, app_id=None, application_type=None, daily_data_cap_in_gb=None, daily_data_cap_notifications_disabled=None, disable_ip_masking=None, instrumentation_key=None, location=None, name=None, resource_group_name=None, retention_in_days=None, sampling_percentage=None, tags=None, __props__=None);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)- 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.
The following state arguments are supported:
- 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
iosfor iOS,javafor Java web,MobileCenterfor App Center,Node.JSfor Node.js,otherfor General,phonefor Windows Phone,storefor Windows Store andwebfor 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.- Daily
Data doubleCap In Gb Specifies the Application Insights component daily data volume cap in GB.
- Daily
Data boolCap Notifications Disabled Specifies if a notification email will be send when the daily data volume cap is met.
- Disable
Ip boolMasking By default the real client ip is masked as
0.0.0.0in the logs. Use this argument to disable masking and log the real client ip. Defaults tofalse.- Instrumentation
Key string The Instrumentation Key for this Application Insights component.
- 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.
- Retention
In intDays Specifies the retention period in days. Possible values are
30,60,90,120,180,270,365,550or730. Defaults to90.- Sampling
Percentage double Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry.
- Dictionary<string, string>
A mapping of tags to assign to the resource.
- 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
iosfor iOS,javafor Java web,MobileCenterfor App Center,Node.JSfor Node.js,otherfor General,phonefor Windows Phone,storefor Windows Store andwebfor 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.- Daily
Data float64Cap In Gb Specifies the Application Insights component daily data volume cap in GB.
- Daily
Data boolCap Notifications Disabled Specifies if a notification email will be send when the daily data volume cap is met.
- Disable
Ip boolMasking By default the real client ip is masked as
0.0.0.0in the logs. Use this argument to disable masking and log the real client ip. Defaults tofalse.- Instrumentation
Key string The Instrumentation Key for this Application Insights component.
- 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.
- Retention
In intDays Specifies the retention period in days. Possible values are
30,60,90,120,180,270,365,550or730. Defaults to90.- Sampling
Percentage float64 Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry.
- map[string]string
A mapping of tags to assign to the resource.
- 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
iosfor iOS,javafor Java web,MobileCenterfor App Center,Node.JSfor Node.js,otherfor General,phonefor Windows Phone,storefor Windows Store andwebfor 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.- daily
Data numberCap In Gb Specifies the Application Insights component daily data volume cap in GB.
- daily
Data booleanCap Notifications Disabled Specifies if a notification email will be send when the daily data volume cap is met.
- disable
Ip booleanMasking By default the real client ip is masked as
0.0.0.0in the logs. Use this argument to disable masking and log the real client ip. Defaults tofalse.- instrumentation
Key string The Instrumentation Key for this Application Insights component.
- 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.
- retention
In numberDays Specifies the retention period in days. Possible values are
30,60,90,120,180,270,365,550or730. Defaults to90.- sampling
Percentage number Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry.
- {[key: string]: string}
A mapping of tags to assign to the resource.
- 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
iosfor iOS,javafor Java web,MobileCenterfor App Center,Node.JSfor Node.js,otherfor General,phonefor Windows Phone,storefor Windows Store andwebfor 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.- daily_
data_ floatcap_ in_ gb Specifies the Application Insights component daily data volume cap in GB.
- daily_
data_ boolcap_ notifications_ disabled Specifies if a notification email will be send when the daily data volume cap is met.
- disable_
ip_ boolmasking By default the real client ip is masked as
0.0.0.0in the logs. Use this argument to disable masking and log the real client ip. Defaults tofalse.- instrumentation_
key str The Instrumentation Key for this Application Insights component.
- 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.
- retention_
in_ floatdays Specifies the retention period in days. Possible values are
30,60,90,120,180,270,365,550or730. Defaults to90.- sampling_
percentage float Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry.
- Dict[str, str]
A mapping of tags to assign to the resource.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.