AnalyticsItem

class AnalyticsItem : KotlinCustomResource

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"

Properties

Link copied to clipboard

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>

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

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

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

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

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

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val scope: Output<String>

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 timeCreated: Output<String>

A string containing the time the Analytics Item was created.

Link copied to clipboard
val timeModified: Output<String>

A string containing the time the Analytics Item was last modified.

Link copied to clipboard
val type: Output<String>

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

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val version: Output<String>

A string indicating the version of the query format