Module loganalytics

This page documents the language specification for the azure package. If you're looking for help working with the inputs, outputs, or functions of azure resources in a Pulumi program, please see the resource documentation for examples and API reference.

Resources

Others

Resources

Resource DataSourceWindowsEvent

class DataSourceWindowsEvent extends CustomResource

Manages a Log Analytics Windows Event DataSource.

Example Usage

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

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("exampleAnalyticsWorkspace", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    sku: "PerGB2018",
});
const exampleDataSourceWindowsEvent = new azure.loganalytics.DataSourceWindowsEvent("exampleDataSourceWindowsEvent", {
    resourceGroupName: exampleResourceGroup.name,
    workspaceName: exampleAnalyticsWorkspace.name,
    eventLogName: "Application",
    eventTypes: ["error"],
});

constructor

new DataSourceWindowsEvent(name: string, args: DataSourceWindowsEventArgs, opts?: pulumi.CustomResourceOptions)

Create a DataSourceWindowsEvent 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?: DataSourceWindowsEventState, opts?: pulumi.CustomResourceOptions): DataSourceWindowsEvent

Get an existing DataSourceWindowsEvent 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): obj is DataSourceWindowsEvent

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

property eventLogName

public eventLogName: pulumi.Output<string>;

Specifies the name of the Windows Event Log to collect events from.

property eventTypes

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

Specifies an array of event types applied to the specified event log. Possible values include error, warning and information.

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>;

The name which should be used for this Log Analytics Windows Event DataSource. Changing this forces a new Log Analytics Windows Event DataSource to be created.

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

The name of the Resource Group where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource 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 workspaceName

public workspaceName: pulumi.Output<string>;

The name of the Log Analytics Workspace where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.

Resource DataSourceWindowsPerformanceCounter

class DataSourceWindowsPerformanceCounter extends CustomResource

Manages a Log Analytics (formally Operational Insights) Windows Performance Counter DataSource.

Example Usage

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

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("exampleAnalyticsWorkspace", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    sku: "PerGB2018",
});
const exampleDataSourceWindowsPerformanceCounter = new azure.loganalytics.DataSourceWindowsPerformanceCounter("exampleDataSourceWindowsPerformanceCounter", {
    resourceGroupName: exampleResourceGroup.name,
    workspaceName: exampleAnalyticsWorkspace.name,
    objectName: "CPU",
    instanceName: "*",
    counterName: "CPU",
    intervalSeconds: 10,
});

constructor

new DataSourceWindowsPerformanceCounter(name: string, args: DataSourceWindowsPerformanceCounterArgs, opts?: pulumi.CustomResourceOptions)

Create a DataSourceWindowsPerformanceCounter 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?: DataSourceWindowsPerformanceCounterState, opts?: pulumi.CustomResourceOptions): DataSourceWindowsPerformanceCounter

Get an existing DataSourceWindowsPerformanceCounter 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): obj is DataSourceWindowsPerformanceCounter

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

property counterName

public counterName: pulumi.Output<string>;

The friendly name of the performance counter.

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 instanceName

public instanceName: pulumi.Output<string>;

The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a * will apply to all instances.

property intervalSeconds

public intervalSeconds: pulumi.Output<number>;

The time of sample interval in seconds. Supports values between 10 and 2147483647.

property name

public name: pulumi.Output<string>;

The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

property objectName

public objectName: pulumi.Output<string>;

The object name of the Log Analytics Windows Performance Counter DataSource.

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource 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 workspaceName

public workspaceName: pulumi.Output<string>;

The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

Resource LinkedService

class LinkedService extends CustomResource

Links a Log Analytics (formally Operational Insights) Workspace to another resource. The (currently) only linkable service is an Azure Automation Account.

Example Usage

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

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAccount = new azure.automation.Account("exampleAccount", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    sku: [{
        name: "Basic",
    }],
    tags: {
        environment: "development",
    },
});
const exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("exampleAnalyticsWorkspace", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    sku: "PerGB2018",
    retentionInDays: 30,
});
const exampleLinkedService = new azure.loganalytics.LinkedService("exampleLinkedService", {
    resourceGroupName: exampleResourceGroup.name,
    workspaceName: exampleAnalyticsWorkspace.name,
    resourceId: exampleAccount.id,
});

constructor

new LinkedService(name: string, args: LinkedServiceArgs, opts?: pulumi.CustomResourceOptions)

Create a LinkedService 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?: LinkedServiceState, opts?: pulumi.CustomResourceOptions): LinkedService

Get an existing LinkedService 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): obj is LinkedService

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

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 linkedServiceName

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

Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspaceName. Currently it defaults to and only supports automation as a value. Changing this forces a new resource to be created.

property name

public name: pulumi.Output<string>;

The automatically generated name of the Linked Service. This cannot be specified. The format is always <workspace_name>/<linked_service_name> e.g. workspace1/Automation

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.

property resourceId

public resourceId: pulumi.Output<string>;

The ID of the Resource that will be linked to the workspace. Changing this forces a new resource to be created.

property tags

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

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.

property workspaceName

public workspaceName: pulumi.Output<string>;

Name of the Log Analytics Workspace that will contain the linkedServices resource. Changing this forces a new resource to be created.

Others

interface DataSourceWindowsEventArgs

interface DataSourceWindowsEventArgs

The set of arguments for constructing a DataSourceWindowsEvent resource.

property eventLogName

eventLogName: pulumi.Input<string>;

Specifies the name of the Windows Event Log to collect events from.

property eventTypes

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

Specifies an array of event types applied to the specified event log. Possible values include error, warning and information.

property name

name?: pulumi.Input<string>;

The name which should be used for this Log Analytics Windows Event DataSource. Changing this forces a new Log Analytics Windows Event DataSource to be created.

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

The name of the Resource Group where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.

property workspaceName

workspaceName: pulumi.Input<string>;

The name of the Log Analytics Workspace where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.

interface DataSourceWindowsEventState

interface DataSourceWindowsEventState

Input properties used for looking up and filtering DataSourceWindowsEvent resources.

property eventLogName

eventLogName?: pulumi.Input<string>;

Specifies the name of the Windows Event Log to collect events from.

property eventTypes

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

Specifies an array of event types applied to the specified event log. Possible values include error, warning and information.

property name

name?: pulumi.Input<string>;

The name which should be used for this Log Analytics Windows Event DataSource. Changing this forces a new Log Analytics Windows Event DataSource to be created.

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

The name of the Resource Group where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.

property workspaceName

workspaceName?: pulumi.Input<string>;

The name of the Log Analytics Workspace where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.

interface DataSourceWindowsPerformanceCounterArgs

interface DataSourceWindowsPerformanceCounterArgs

The set of arguments for constructing a DataSourceWindowsPerformanceCounter resource.

property counterName

counterName: pulumi.Input<string>;

The friendly name of the performance counter.

property instanceName

instanceName: pulumi.Input<string>;

The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a * will apply to all instances.

property intervalSeconds

intervalSeconds: pulumi.Input<number>;

The time of sample interval in seconds. Supports values between 10 and 2147483647.

property name

name?: pulumi.Input<string>;

The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

property objectName

objectName: pulumi.Input<string>;

The object name of the Log Analytics Windows Performance Counter DataSource.

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

property workspaceName

workspaceName: pulumi.Input<string>;

The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

interface DataSourceWindowsPerformanceCounterState

interface DataSourceWindowsPerformanceCounterState

Input properties used for looking up and filtering DataSourceWindowsPerformanceCounter resources.

property counterName

counterName?: pulumi.Input<string>;

The friendly name of the performance counter.

property instanceName

instanceName?: pulumi.Input<string>;

The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a * will apply to all instances.

property intervalSeconds

intervalSeconds?: pulumi.Input<number>;

The time of sample interval in seconds. Supports values between 10 and 2147483647.

property name

name?: pulumi.Input<string>;

The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

property objectName

objectName?: pulumi.Input<string>;

The object name of the Log Analytics Windows Performance Counter DataSource.

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

property workspaceName

workspaceName?: pulumi.Input<string>;

The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

interface LinkedServiceArgs

interface LinkedServiceArgs

The set of arguments for constructing a LinkedService resource.

property linkedServiceName

linkedServiceName?: pulumi.Input<string>;

Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspaceName. Currently it defaults to and only supports automation as a value. Changing this forces a new resource to be created.

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.

property resourceId

resourceId: pulumi.Input<string>;

The ID of the Resource that will be linked to the workspace. Changing this forces a new resource to be created.

property tags

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

A mapping of tags to assign to the resource.

property workspaceName

workspaceName: pulumi.Input<string>;

Name of the Log Analytics Workspace that will contain the linkedServices resource. Changing this forces a new resource to be created.

interface LinkedServiceState

interface LinkedServiceState

Input properties used for looking up and filtering LinkedService resources.

property linkedServiceName

linkedServiceName?: pulumi.Input<string>;

Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspaceName. Currently it defaults to and only supports automation as a value. Changing this forces a new resource to be created.

property name

name?: pulumi.Input<string>;

The automatically generated name of the Linked Service. This cannot be specified. The format is always <workspace_name>/<linked_service_name> e.g. workspace1/Automation

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.

property resourceId

resourceId?: pulumi.Input<string>;

The ID of the Resource that will be linked to the workspace. Changing this forces a new resource to be created.

property tags

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

A mapping of tags to assign to the resource.

property workspaceName

workspaceName?: pulumi.Input<string>;

Name of the Log Analytics Workspace that will contain the linkedServices resource. Changing this forces a new resource to be created.