AnalyticsItem

Manages an Application Insights Analytics Item 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 = "West Europe",
            ResourceGroupName = exampleResourceGroup.Name,
            ApplicationType = "web",
        });
        var exampleAnalyticsItem = new Azure.AppInsights.AnalyticsItem("exampleAnalyticsItem", new Azure.AppInsights.AnalyticsItemArgs
        {
            ApplicationInsightsId = exampleInsights.Id,
            Content = "requests //simple example query",
            Scope = "shared",
            Type = "query",
        });
    }

}
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:          pulumi.String("West Europe"),
            ResourceGroupName: exampleResourceGroup.Name,
            ApplicationType:   pulumi.String("web"),
        })
        if err != nil {
            return err
        }
        _, err = appinsights.NewAnalyticsItem(ctx, "exampleAnalyticsItem", &appinsights.AnalyticsItemArgs{
            ApplicationInsightsId: exampleInsights.ID(),
            Content:               pulumi.String("requests //simple example query"),
            Scope:                 pulumi.String("shared"),
            Type:                  pulumi.String("query"),
        })
        if err != nil {
            return err
        }
        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="West Europe",
    resource_group_name=example_resource_group.name,
    application_type="web")
example_analytics_item = azure.appinsights.AnalyticsItem("exampleAnalyticsItem",
    application_insights_id=example_insights.id,
    content="requests //simple example query",
    scope="shared",
    type="query")
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: "West Europe",
    resourceGroupName: exampleResourceGroup.name,
    applicationType: "web",
});
const exampleAnalyticsItem = new azure.appinsights.AnalyticsItem("exampleAnalyticsItem", {
    applicationInsightsId: exampleInsights.id,
    content: "requests //simple example query",
    scope: "shared",
    type: "query",
});

Create a AnalyticsItem Resource

def AnalyticsItem(resource_name, opts=None, application_insights_id=None, content=None, function_alias=None, name=None, scope=None, type=None, __props__=None);
name string
The unique name of the resource.
args AnalyticsItemArgs
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 AnalyticsItemArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AnalyticsItemArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AnalyticsItem Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The AnalyticsItem resource accepts the following input properties:

ApplicationInsightsId string

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

Content string

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

Scope 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.

Type 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.

FunctionAlias string

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

Name string

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

ApplicationInsightsId string

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

Content string

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

Scope 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.

Type 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.

FunctionAlias string

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

Name string

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

applicationInsightsId string

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

content string

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

scope 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.

type 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.

functionAlias string

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

name string

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

application_insights_id str

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

content str

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

scope str

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.

type str

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

function_alias str

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

name str

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

Outputs

All input properties are implicitly available as output properties. Additionally, the AnalyticsItem resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
TimeCreated string

A string containing the time the Analytics Item was created.

TimeModified string

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

Version string

A string indicating the version of the query format

Id string
The provider-assigned unique ID for this managed resource.
TimeCreated string

A string containing the time the Analytics Item was created.

TimeModified string

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

Version string

A string indicating the version of the query format

id string
The provider-assigned unique ID for this managed resource.
timeCreated string

A string containing the time the Analytics Item was created.

timeModified string

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

version string

A string indicating the version of the query format

id str
The provider-assigned unique ID for this managed resource.
time_created str

A string containing the time the Analytics Item was created.

time_modified str

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

version str

A string indicating the version of the query format

Look up an Existing AnalyticsItem Resource

Get an existing AnalyticsItem 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?: AnalyticsItemState, opts?: CustomResourceOptions): AnalyticsItem
static get(resource_name, id, opts=None, application_insights_id=None, content=None, function_alias=None, name=None, scope=None, time_created=None, time_modified=None, type=None, version=None, __props__=None);
func GetAnalyticsItem(ctx *Context, name string, id IDInput, state *AnalyticsItemState, opts ...ResourceOption) (*AnalyticsItem, error)
public static AnalyticsItem Get(string name, Input<string> id, AnalyticsItemState? 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:

ApplicationInsightsId string

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

Content string

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

FunctionAlias string

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

Name string

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

Scope 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.

TimeCreated string

A string containing the time the Analytics Item was created.

TimeModified string

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

Type 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.

Version string

A string indicating the version of the query format

ApplicationInsightsId string

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

Content string

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

FunctionAlias string

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

Name string

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

Scope 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.

TimeCreated string

A string containing the time the Analytics Item was created.

TimeModified string

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

Type 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.

Version string

A string indicating the version of the query format

applicationInsightsId string

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

content string

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

functionAlias string

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

name string

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

scope 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.

timeCreated string

A string containing the time the Analytics Item was created.

timeModified string

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

type 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.

version string

A string indicating the version of the query format

application_insights_id str

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

content str

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

function_alias str

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

name str

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

scope str

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.

time_created str

A string containing the time the Analytics Item was created.

time_modified str

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

type str

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

version str

A string indicating the version of the query format

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.