Module appinsights

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-azure repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-azurerm repo.

Resources

Data Sources

Others

Resources

Resource ApiKey

class ApiKey extends CustomResource

Manages an Application Insights API key.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const testResourceGroup = new azure.core.ResourceGroup("test", {
    location: "West Europe",
    name: "tf-test",
});
const testInsights = new azure.appinsights.Insights("test", {
    applicationType: "web",
    location: "West Europe",
    name: "tf-test-appinsights",
    resourceGroupName: testResourceGroup.name,
});
const authenticateSdkControlChannelApiKey = new azure.appinsights.ApiKey("authenticateSdkControlChannel", {
    applicationInsightsId: testInsights.id,
    name: "tf-test-appinsights-authenticate-sdk-control-channel-api-key",
    readPermissions: ["agentconfig"],
});
const fullPermissions = new azure.appinsights.ApiKey("fullPermissions", {
    applicationInsightsId: testInsights.id,
    name: "tf-test-appinsights-full-permissions-api-key",
    readPermissions: [
        "agentconfig",
        "aggregate",
        "api",
        "draft",
        "extendqueries",
        "search",
    ],
    writePermissions: ["annotations"],
});
const readTelemetry = new azure.appinsights.ApiKey("readTelemetry", {
    applicationInsightsId: testInsights.id,
    name: "tf-test-appinsights-read-telemetry-api-key",
    readPermissions: [
        "aggregate",
        "api",
        "draft",
        "extendqueries",
        "search",
    ],
});
const writeAnnotations = new azure.appinsights.ApiKey("writeAnnotations", {
    applicationInsightsId: testInsights.id,
    name: "tf-test-appinsights-write-annotations-api-key",
    writePermissions: ["annotations"],
});

export const authenticateSdkControlChannel = authenticateSdkControlChannelApiKey.apiKey;
export const fullPermissionsApiKey = fullPermissions.apiKey;
export const readTelemetryApiKey = readTelemetry.apiKey;
export const writeAnnotationsApiKey = writeAnnotations.apiKey;

This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/application_insights_api_key.html.markdown.

constructor

new ApiKey(name: string, args: ApiKeyArgs, opts?: pulumi.CustomResourceOptions)

Create a ApiKey resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ApiKeyState, opts?: pulumi.CustomResourceOptions): ApiKey

Get an existing ApiKey resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of ApiKey. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property apiKey

public apiKey: pulumi.Output<string>;

The API Key secret (Sensitive).

property applicationInsightsId

public applicationInsightsId: pulumi.Output<string>;

The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

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

property readPermissions

public readPermissions: pulumi.Output<string[] | undefined>;

Specifies the list of read permissions granted to the API key. Valid values are agentconfig, aggregate, api, draft, extendqueries, search. Please note these values are case sensitive. Changing this forces a new resource to be created.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property writePermissions

public writePermissions: pulumi.Output<string[] | undefined>;

Specifies the list of write permissions granted to the API key. Valid values are annotations. Please note these values are case sensitive. Changing this forces a new resource to be created.

Resource Insights

class Insights extends CustomResource

Manage an Application Insights component.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const testResourceGroup = new azure.core.ResourceGroup("test", {
    location: "West Europe",
    name: "tf-test",
});
const testInsights = new azure.appinsights.Insights("test", {
    applicationType: "web",
    location: "West Europe",
    name: "tf-test-appinsights",
    resourceGroupName: testResourceGroup.name,
});

export const appId = testInsights.appId;
export const instrumentationKey = testInsights.instrumentationKey;

This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/application_insights.html.markdown.

constructor

new Insights(name: string, args: InsightsArgs, opts?: pulumi.CustomResourceOptions)

Create a Insights resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InsightsState, opts?: pulumi.CustomResourceOptions): Insights

Get an existing Insights resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of Insights. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property appId

public appId: pulumi.Output<string>;

The App ID associated with this Application Insights component.

property applicationType

public applicationType: pulumi.Output<string>;

Specifies the type of Application Insights to create. Valid values are ios for iOS, java for Java web, MobileCenter for App Center, Node.JS for Node.js, other for General, phone for Windows Phone, store for Windows Store and web for ASP.NET. Please note these values are case sensitive; unmatched values are treated as ASP.NET by Azure. Changing this forces a new resource to be created.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property instrumentationKey

public instrumentationKey: pulumi.Output<string>;

The Instrumentation Key for this Application Insights component.

property location

public location: pulumi.Output<string>;

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

property name

public name: pulumi.Output<string>;

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

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

The name of the resource group in which to create the Application Insights component.

property tags

public tags: pulumi.Output<{[key: string]: any}>;

A mapping of tags to assign to the resource.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource WebTest

class WebTest extends CustomResource

Manages an Application Insights WebTest.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const testResourceGroup = new azure.core.ResourceGroup("test", {
    location: "West Europe",
    name: "tf-test",
});
const testInsights = new azure.appinsights.Insights("test", {
    applicationType: "web",
    location: "West Europe",
    name: "tf-test-appinsights",
    resourceGroupName: testResourceGroup.name,
});
const testWebTest = new azure.appinsights.WebTest("test", {
    applicationInsightsId: testInsights.id,
    configuration: `<WebTest Name="WebTest1" Id="ABD48585-0831-40CB-9069-682EA6BB3583" Enabled="True" CssProjectStructure="" CssIteration="" Timeout="0" WorkItemIds="" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010" Description="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="default" StopOnError="False" RecordedResultFile="" ResultsLocale="">
  <Items>
    <Request Method="GET" Guid="a5f10126-e4cd-570d-961c-cea43999a200" Version="1.1" Url="http://microsoft.com" ThinkTime="0" Timeout="300" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="200" ExpectedResponseUrl="" ReportingName="" IgnoreHttpStatusCode="False" />
  </Items>
</WebTest>
`,
    enabled: true,
    frequency: 300,
    geoLocations: [
        "us-tx-sn1-azr",
        "us-il-ch1-azr",
    ],
    kind: "ping",
    location: testResourceGroup.location,
    name: "tf-test-appinsights-webtest",
    resourceGroupName: testResourceGroup.name,
    timeout: 60,
});

export const webtestId = testWebTest.id;
export const webtestProvisioningState = testWebTest.provisioningState;
export const webtestsSyntheticId = testWebTest.syntheticMonitorId;

This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/application_insights_web_test.html.markdown.

constructor

new WebTest(name: string, args: WebTestArgs, opts?: pulumi.CustomResourceOptions)

Create a WebTest resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: WebTestState, opts?: pulumi.CustomResourceOptions): WebTest

Get an existing WebTest resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of WebTest. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property applicationInsightsId

public applicationInsightsId: pulumi.Output<string>;

The ID of the Application Insights component on which the WebTest operates. Changing this forces a new resource to be created.

property configuration

public configuration: pulumi.Output<string>;

An XML configuration specification for a WebTest.

property description

public description: pulumi.Output<string | undefined>;

Purpose/user defined descriptive test for this WebTest.

property enabled

public enabled: pulumi.Output<boolean | undefined>;

Is the test actively being monitored.

property frequency

public frequency: pulumi.Output<number | undefined>;

Interval in seconds between test runs for this WebTest. Default is 300.

property geoLocations

public geoLocations: pulumi.Output<string[]>;

A list of where to physically run the tests from to give global coverage for accessibility of your application.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property kind

public kind: pulumi.Output<string>;

property location

public location: pulumi.Output<string>;

The location of the resource group.

property name

public name: pulumi.Output<string>;

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

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

property retryEnabled

public retryEnabled: pulumi.Output<boolean | undefined>;

Allow for retries should this WebTest fail.

property syntheticMonitorId

public syntheticMonitorId: pulumi.Output<string>;

property tags

public tags: pulumi.Output<{[key: string]: any}>;

Resource tags.

property timeout

public timeout: pulumi.Output<number | undefined>;

Seconds until this WebTest will timeout and fail. Default is 30.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Data Sources

Data Source getInsights

getInsights(args: GetInsightsArgs, opts?: pulumi.InvokeOptions): Promise<GetInsightsResult> & GetInsightsResult

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

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const test = azure.appinsights.getInsights({
    name: "production",
    resourceGroupName: "networking",
});

export const applicationInsightsInstrumentationKey = test.instrumentationKey;

This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/d/application_insights.html.markdown.

Others

interface ApiKeyArgs

interface ApiKeyArgs

The set of arguments for constructing a ApiKey resource.

property applicationInsightsId

applicationInsightsId: pulumi.Input<string>;

The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created.

property name

name?: pulumi.Input<string>;

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

property readPermissions

readPermissions?: pulumi.Input<pulumi.Input<string>[]>;

Specifies the list of read permissions granted to the API key. Valid values are agentconfig, aggregate, api, draft, extendqueries, search. Please note these values are case sensitive. Changing this forces a new resource to be created.

property writePermissions

writePermissions?: pulumi.Input<pulumi.Input<string>[]>;

Specifies the list of write permissions granted to the API key. Valid values are annotations. Please note these values are case sensitive. Changing this forces a new resource to be created.

interface ApiKeyState

interface ApiKeyState

Input properties used for looking up and filtering ApiKey resources.

property apiKey

apiKey?: pulumi.Input<string>;

The API Key secret (Sensitive).

property applicationInsightsId

applicationInsightsId?: pulumi.Input<string>;

The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created.

property name

name?: pulumi.Input<string>;

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

property readPermissions

readPermissions?: pulumi.Input<pulumi.Input<string>[]>;

Specifies the list of read permissions granted to the API key. Valid values are agentconfig, aggregate, api, draft, extendqueries, search. Please note these values are case sensitive. Changing this forces a new resource to be created.

property writePermissions

writePermissions?: pulumi.Input<pulumi.Input<string>[]>;

Specifies the list of write permissions granted to the API key. Valid values are annotations. Please note these values are case sensitive. Changing this forces a new resource to be created.

interface GetInsightsArgs

interface GetInsightsArgs

A collection of arguments for invoking getInsights.

property name

name: string;

Specifies the name of the Application Insights component.

property resourceGroupName

resourceGroupName: string;

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

interface GetInsightsResult

interface GetInsightsResult

A collection of values returned by getInsights.

property appId

appId: string;

The App ID associated with this Application Insights component.

property applicationType

applicationType: string;

The type of the component.

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property instrumentationKey

instrumentationKey: string;

The instrumentation key of the Application Insights component.

property location

location: string;

The Azure location where the component exists.

property name

name: string;

property resourceGroupName

resourceGroupName: string;

property tags

tags: {[key: string]: any};

Tags applied to the component.

interface InsightsArgs

interface InsightsArgs

The set of arguments for constructing a Insights resource.

property applicationType

applicationType: pulumi.Input<string>;

Specifies the type of Application Insights to create. Valid values are ios for iOS, java for Java web, MobileCenter for App Center, Node.JS for Node.js, other for General, phone for Windows Phone, store for Windows Store and web for ASP.NET. Please note these values are case sensitive; unmatched values are treated as ASP.NET by Azure. Changing this forces a new resource to be created.

property location

location?: pulumi.Input<string>;

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

property name

name?: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

The name of the resource group in which to create the Application Insights component.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

interface InsightsState

interface InsightsState

Input properties used for looking up and filtering Insights resources.

property appId

appId?: pulumi.Input<string>;

The App ID associated with this Application Insights component.

property applicationType

applicationType?: pulumi.Input<string>;

Specifies the type of Application Insights to create. Valid values are ios for iOS, java for Java web, MobileCenter for App Center, Node.JS for Node.js, other for General, phone for Windows Phone, store for Windows Store and web for ASP.NET. Please note these values are case sensitive; unmatched values are treated as ASP.NET by Azure. Changing this forces a new resource to be created.

property instrumentationKey

instrumentationKey?: pulumi.Input<string>;

The Instrumentation Key for this Application Insights component.

property location

location?: pulumi.Input<string>;

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

property name

name?: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

The name of the resource group in which to create the Application Insights component.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

interface WebTestArgs

interface WebTestArgs

The set of arguments for constructing a WebTest resource.

property applicationInsightsId

applicationInsightsId: pulumi.Input<string>;

The ID of the Application Insights component on which the WebTest operates. Changing this forces a new resource to be created.

property configuration

configuration: pulumi.Input<string>;

An XML configuration specification for a WebTest.

property description

description?: pulumi.Input<string>;

Purpose/user defined descriptive test for this WebTest.

property enabled

enabled?: pulumi.Input<boolean>;

Is the test actively being monitored.

property frequency

frequency?: pulumi.Input<number>;

Interval in seconds between test runs for this WebTest. Default is 300.

property geoLocations

geoLocations: pulumi.Input<pulumi.Input<string>[]>;

A list of where to physically run the tests from to give global coverage for accessibility of your application.

property kind

kind: pulumi.Input<string>;

property location

location?: pulumi.Input<string>;

The location of the resource group.

property name

name?: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

property retryEnabled

retryEnabled?: pulumi.Input<boolean>;

Allow for retries should this WebTest fail.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

Resource tags.

property timeout

timeout?: pulumi.Input<number>;

Seconds until this WebTest will timeout and fail. Default is 30.

interface WebTestState

interface WebTestState

Input properties used for looking up and filtering WebTest resources.

property applicationInsightsId

applicationInsightsId?: pulumi.Input<string>;

The ID of the Application Insights component on which the WebTest operates. Changing this forces a new resource to be created.

property configuration

configuration?: pulumi.Input<string>;

An XML configuration specification for a WebTest.

property description

description?: pulumi.Input<string>;

Purpose/user defined descriptive test for this WebTest.

property enabled

enabled?: pulumi.Input<boolean>;

Is the test actively being monitored.

property frequency

frequency?: pulumi.Input<number>;

Interval in seconds between test runs for this WebTest. Default is 300.

property geoLocations

geoLocations?: pulumi.Input<pulumi.Input<string>[]>;

A list of where to physically run the tests from to give global coverage for accessibility of your application.

property kind

kind?: pulumi.Input<string>;

property location

location?: pulumi.Input<string>;

The location of the resource group.

property name

name?: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

property retryEnabled

retryEnabled?: pulumi.Input<boolean>;

Allow for retries should this WebTest fail.

property syntheticMonitorId

syntheticMonitorId?: pulumi.Input<string>;

property tags

tags?: pulumi.Input<{[key: string]: any}>;

Resource tags.

property timeout

timeout?: pulumi.Input<number>;

Seconds until this WebTest will timeout and fail. Default is 30.