AnalyticsItemArgs

data class AnalyticsItemArgs(val applicationInsightsId: Output<String>? = null, val content: Output<String>? = null, val functionAlias: Output<String>? = null, val name: Output<String>? = null, val scope: Output<String>? = null, val type: Output<String>? = null) : ConvertibleToJava<AnalyticsItemArgs>

Manages an Application Insights Analytics Item 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 com.pulumi.azure.appinsights.AnalyticsItem;
import com.pulumi.azure.appinsights.AnalyticsItemArgs;
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());
var exampleAnalyticsItem = new AnalyticsItem("exampleAnalyticsItem", AnalyticsItemArgs.builder()
.applicationInsightsId(exampleInsights.id())
.content("requests //simple example query")
.scope("shared")
.type("query")
.build());
}
}

Import

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

$ pulumi import azure:appinsights/analyticsItem:AnalyticsItem example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Insights/components/mycomponent1/analyticsItems/11111111-1111-1111-1111-111111111111

To find the Analytics Item ID you can query the REST API using the az rest CLI command, e.g. az rest --method GET --uri "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/microsoft.insights/components/appinsightstest/analyticsItems?api-version=2015-05-01"

Constructors

Link copied to clipboard
fun AnalyticsItemArgs(applicationInsightsId: Output<String>? = null, content: Output<String>? = null, functionAlias: Output<String>? = null, name: Output<String>? = null, scope: Output<String>? = null, type: Output<String>? = null)

Functions

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

Properties

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

The ID of the Application Insights component on which the Analytics Item exists. Changing this forces a new resource to be created.

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

The content for the Analytics Item, for example the query text if type is query.

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

The alias to use for the function. Required when type is function.

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

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

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

The scope for the Analytics Item. Can be shared or user. Changing this forces a new resource to be created. Must be shared for functions.

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

The type of Analytics Item to create. Can be one of query, function, folder, recent. Changing this forces a new resource to be created.