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
new AnalyticsItem(name: string, args: AnalyticsItemArgs, opts?: CustomResourceOptions);def AnalyticsItem(resource_name, opts=None, application_insights_id=None, content=None, function_alias=None, name=None, scope=None, type=None, __props__=None);func NewAnalyticsItem(ctx *Context, name string, args AnalyticsItemArgs, opts ...ResourceOption) (*AnalyticsItem, error)public AnalyticsItem(string name, AnalyticsItemArgs args, CustomResourceOptions? opts = null)- 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:
- Application
Insights stringId 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
typeisquery.- Scope string
The scope for the Analytics Item. Can be
sharedoruser. Changing this forces a new resource to be created. Must besharedfor 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.- Function
Alias string The alias to use for the function. Required when
typeisfunction.- Name string
Specifies the name of the Application Insights Analytics Item. Changing this forces a new resource to be created.
- Application
Insights stringId 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
typeisquery.- Scope string
The scope for the Analytics Item. Can be
sharedoruser. Changing this forces a new resource to be created. Must besharedfor 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.- Function
Alias string The alias to use for the function. Required when
typeisfunction.- Name string
Specifies the name of the Application Insights Analytics Item. Changing this forces a new resource to be created.
- application
Insights stringId 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
typeisquery.- scope string
The scope for the Analytics Item. Can be
sharedoruser. Changing this forces a new resource to be created. Must besharedfor 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.- function
Alias string The alias to use for the function. Required when
typeisfunction.- name string
Specifies the name of the Application Insights Analytics Item. Changing this forces a new resource to be created.
- application_
insights_ strid 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
typeisquery.- scope str
The scope for the Analytics Item. Can be
sharedoruser. Changing this forces a new resource to be created. Must besharedfor 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
typeisfunction.- 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.
- Time
Created string A string containing the time the Analytics Item was created.
- Time
Modified 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.
- Time
Created string A string containing the time the Analytics Item was created.
- Time
Modified 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.
- time
Created string A string containing the time the Analytics Item was created.
- time
Modified 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): AnalyticsItemstatic 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:
- Application
Insights stringId 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
typeisquery.- Function
Alias string The alias to use for the function. Required when
typeisfunction.- 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
sharedoruser. Changing this forces a new resource to be created. Must besharedfor functions.- Time
Created string A string containing the time the Analytics Item was created.
- Time
Modified 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 stringId 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
typeisquery.- Function
Alias string The alias to use for the function. Required when
typeisfunction.- 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
sharedoruser. Changing this forces a new resource to be created. Must besharedfor functions.- Time
Created string A string containing the time the Analytics Item was created.
- Time
Modified 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 stringId 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
typeisquery.- function
Alias string The alias to use for the function. Required when
typeisfunction.- 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
sharedoruser. Changing this forces a new resource to be created. Must besharedfor functions.- time
Created string A string containing the time the Analytics Item was created.
- time
Modified 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_ strid 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
typeisquery.- function_
alias str The alias to use for the function. Required when
typeisfunction.- 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
sharedoruser. Changing this forces a new resource to be created. Must besharedfor 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
azurermTerraform Provider.