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
LookupInsightsin 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.
- Resource
Group stringName Specifies the name of the resource group the Application Insights component is located in.
- Name string
Specifies the name of the Application Insights component.
- Resource
Group stringName Specifies the name of the resource group the Application Insights component is located in.
- name string
Specifies the name of the Application Insights component.
- resource
Group stringName 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_ strname Specifies the name of the resource group the Application Insights component is located in.
GetInsights Result
The following output properties are available:
- App
Id string The App ID associated with this Application Insights component.
- Application
Type string The type of the component.
- Id string
The provider-assigned unique ID for this managed resource.
- Instrumentation
Key string The instrumentation key of the Application Insights component.
- Location string
The Azure location where the component exists.
- Name string
- Resource
Group stringName - Retention
In intDays The retention period in days.
- Dictionary<string, string>
Tags applied to the component.
- App
Id string The App ID associated with this Application Insights component.
- Application
Type string The type of the component.
- Id string
The provider-assigned unique ID for this managed resource.
- Instrumentation
Key string The instrumentation key of the Application Insights component.
- Location string
The Azure location where the component exists.
- Name string
- Resource
Group stringName - Retention
In intDays The retention period in days.
- map[string]string
Tags applied to the component.
- app
Id string The App ID associated with this Application Insights component.
- application
Type string The type of the component.
- id string
The provider-assigned unique ID for this managed resource.
- instrumentation
Key string The instrumentation key of the Application Insights component.
- location string
The Azure location where the component exists.
- name string
- resource
Group stringName - retention
In numberDays The retention period in days.
- {[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_ strname - retention_
in_ floatdays The retention period in days.
- 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
azurermTerraform Provider.