Insights Args
data class InsightsArgs(val applicationType: Output<String>? = null, val dailyDataCapInGb: Output<Double>? = null, val dailyDataCapNotificationsDisabled: Output<Boolean>? = null, val disableIpMasking: Output<Boolean>? = null, val forceCustomerStorageForProfiler: Output<Boolean>? = null, val internetIngestionEnabled: Output<Boolean>? = null, val internetQueryEnabled: Output<Boolean>? = null, val localAuthenticationDisabled: Output<Boolean>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val retentionInDays: Output<Int>? = null, val samplingPercentage: Output<Double>? = null, val tags: Output<Map<String, String>>? = null, val workspaceId: Output<String>? = null) : ConvertibleToJava<InsightsArgs>
Manages an Application Insights component.
Example Usage
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleInsights = new Insights("exampleInsights", InsightsArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.applicationType("web")
.build());
ctx.export("instrumentationKey", exampleInsights.instrumentationKey());
ctx.export("appId", exampleInsights.appId());
}
}
Content copied to clipboard
Workspace Mode
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku("PerGB2018")
.retentionInDays(30)
.build());
var exampleInsights = new Insights("exampleInsights", InsightsArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.workspaceId(exampleAnalyticsWorkspace.id())
.applicationType("web")
.build());
ctx.export("instrumentationKey", exampleInsights.instrumentationKey());
ctx.export("appId", exampleInsights.appId());
}
}
Content copied to clipboard
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
Content copied to clipboard
Constructors
Link copied to clipboard
fun InsightsArgs(applicationType: Output<String>? = null, dailyDataCapInGb: Output<Double>? = null, dailyDataCapNotificationsDisabled: Output<Boolean>? = null, disableIpMasking: Output<Boolean>? = null, forceCustomerStorageForProfiler: Output<Boolean>? = null, internetIngestionEnabled: Output<Boolean>? = null, internetQueryEnabled: Output<Boolean>? = null, localAuthenticationDisabled: Output<Boolean>? = null, location: Output<String>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, retentionInDays: Output<Int>? = null, samplingPercentage: Output<Double>? = null, tags: Output<Map<String, String>>? = null, workspaceId: Output<String>? = null)
Functions
Properties
Link copied to clipboard
Specifies the type of Application Insights to create. Valid values are ios
for iOS, java
for Java web, MobileCenter
for App Center, Node.JS
for Node.js, other
for General, phone
for Windows Phone, store
for Windows Store and web
for ASP.NET. Please note these values are case sensitive; unmatched values are treated as ASP.NET by Azure. Changing this forces a new resource to be created.
Link copied to clipboard