GetInsights

Use this data source to access information about an existing Application Insights component.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.AppInsights.GetInsights.InvokeAsync(new Azure.AppInsights.GetInsightsArgs
        {
            Name = "production",
            ResourceGroupName = "networking",
        }));
        this.ApplicationInsightsInstrumentationKey = example.Apply(example => example.InstrumentationKey);
    }

    [Output("applicationInsightsInstrumentationKey")]
    public Output<string> ApplicationInsightsInstrumentationKey { get; set; }
}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/appinsights"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        example, err := appinsights.LookupInsights(ctx, &appinsights.LookupInsightsArgs{
            Name:              "production",
            ResourceGroupName: "networking",
        }, nil)
        if err != nil {
            return err
        }
        ctx.Export("applicationInsightsInstrumentationKey", example.InstrumentationKey)
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example = azure.appinsights.get_insights(name="production",
    resource_group_name="networking")
pulumi.export("applicationInsightsInstrumentationKey", example.instrumentation_key)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.appinsights.getInsights({
    name: "production",
    resourceGroupName: "networking",
});
export const applicationInsightsInstrumentationKey = example.then(example => example.instrumentationKey);

Using GetInsights

function getInsights(args: GetInsightsArgs, opts?: InvokeOptions): Promise<GetInsightsResult>
function  get_insights(name=None, resource_group_name=None, opts=None)
func LookupInsights(ctx *Context, args *LookupInsightsArgs, opts ...InvokeOption) (*LookupInsightsResult, error)

Note: This function is named LookupInsights in the Go SDK.

public static class GetInsights {
    public static Task<GetInsightsResult> InvokeAsync(GetInsightsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

Specifies the name of the Application Insights component.

ResourceGroupName string

Specifies the name of the resource group the Application Insights component is located in.

Name string

Specifies the name of the Application Insights component.

ResourceGroupName string

Specifies the name of the resource group the Application Insights component is located in.

name string

Specifies the name of the Application Insights component.

resourceGroupName string

Specifies the name of the resource group the Application Insights component is located in.

name str

Specifies the name of the Application Insights component.

resource_group_name str

Specifies the name of the resource group the Application Insights component is located in.

GetInsights Result

The following output properties are available:

AppId string

The App ID associated with this Application Insights component.

ApplicationType string

The type of the component.

Id string

The provider-assigned unique ID for this managed resource.

InstrumentationKey string

The instrumentation key of the Application Insights component.

Location string

The Azure location where the component exists.

Name string
ResourceGroupName string
RetentionInDays int

The retention period in days.

Tags Dictionary<string, string>

Tags applied to the component.

AppId string

The App ID associated with this Application Insights component.

ApplicationType string

The type of the component.

Id string

The provider-assigned unique ID for this managed resource.

InstrumentationKey string

The instrumentation key of the Application Insights component.

Location string

The Azure location where the component exists.

Name string
ResourceGroupName string
RetentionInDays int

The retention period in days.

Tags map[string]string

Tags applied to the component.

appId string

The App ID associated with this Application Insights component.

applicationType string

The type of the component.

id string

The provider-assigned unique ID for this managed resource.

instrumentationKey string

The instrumentation key of the Application Insights component.

location string

The Azure location where the component exists.

name string
resourceGroupName string
retentionInDays number

The retention period in days.

tags {[key: string]: string}

Tags applied to the component.

app_id str

The App ID associated with this Application Insights component.

application_type str

The type of the component.

id str

The provider-assigned unique ID for this managed resource.

instrumentation_key str

The instrumentation key of the Application Insights component.

location str

The Azure location where the component exists.

name str
resource_group_name str
retention_in_days float

The retention period in days.

tags Dict[str, str]

Tags applied to the component.

Package Details

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