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.

loganalytics

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.

class pulumi_azure.loganalytics.DataSourceWindowsEvent(resource_name, opts=None, event_log_name=None, event_types=None, name=None, resource_group_name=None, workspace_name=None, __props__=None, __name__=None, __opts__=None)

Manages a Log Analytics Windows Event DataSource.

import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_analytics_workspace = azure.operationalinsights.AnalyticsWorkspace("exampleAnalyticsWorkspace",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku="PerGB2018")
example_data_source_windows_event = azure.loganalytics.DataSourceWindowsEvent("exampleDataSourceWindowsEvent",
    resource_group_name=example_resource_group.name,
    workspace_name=example_analytics_workspace.name,
    event_log_name="Application",
    event_types=["error"])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • event_log_name (pulumi.Input[str]) – Specifies the name of the Windows Event Log to collect events from.

  • event_types (pulumi.Input[list]) – Specifies an array of event types applied to the specified event log. Possible values include error, warning and information.

  • name (pulumi.Input[str]) – 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.

  • resource_group_name (pulumi.Input[str]) – 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.

  • workspace_name (pulumi.Input[str]) – 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.

event_log_name: pulumi.Output[str] = None

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

event_types: pulumi.Output[list] = None

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

name: pulumi.Output[str] = None

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.

resource_group_name: pulumi.Output[str] = None

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.

workspace_name: pulumi.Output[str] = None

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.

static get(resource_name, id, opts=None, event_log_name=None, event_types=None, name=None, resource_group_name=None, workspace_name=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • event_log_name (pulumi.Input[str]) – Specifies the name of the Windows Event Log to collect events from.

  • event_types (pulumi.Input[list]) – Specifies an array of event types applied to the specified event log. Possible values include error, warning and information.

  • name (pulumi.Input[str]) – 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.

  • resource_group_name (pulumi.Input[str]) – 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.

  • workspace_name (pulumi.Input[str]) – 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.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.loganalytics.DataSourceWindowsPerformanceCounter(resource_name, opts=None, counter_name=None, instance_name=None, interval_seconds=None, name=None, object_name=None, resource_group_name=None, workspace_name=None, __props__=None, __name__=None, __opts__=None)

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

import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_analytics_workspace = azure.operationalinsights.AnalyticsWorkspace("exampleAnalyticsWorkspace",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku="PerGB2018")
example_data_source_windows_performance_counter = azure.loganalytics.DataSourceWindowsPerformanceCounter("exampleDataSourceWindowsPerformanceCounter",
    resource_group_name=example_resource_group.name,
    workspace_name=example_analytics_workspace.name,
    object_name="CPU",
    instance_name="*",
    counter_name="CPU",
    interval_seconds=10)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • counter_name (pulumi.Input[str]) – The friendly name of the performance counter.

  • instance_name (pulumi.Input[str]) – The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a * will apply to all instances.

  • interval_seconds (pulumi.Input[float]) – The time of sample interval in seconds. Supports values between 10 and 2147483647.

  • name (pulumi.Input[str]) – 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.

  • object_name (pulumi.Input[str]) – The object name of the Log Analytics Windows Performance Counter DataSource.

  • resource_group_name (pulumi.Input[str]) – 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.

  • workspace_name (pulumi.Input[str]) – 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.

counter_name: pulumi.Output[str] = None

The friendly name of the performance counter.

instance_name: pulumi.Output[str] = None

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

interval_seconds: pulumi.Output[float] = None

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

name: pulumi.Output[str] = None

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.

object_name: pulumi.Output[str] = None

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

resource_group_name: pulumi.Output[str] = None

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.

workspace_name: pulumi.Output[str] = None

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.

static get(resource_name, id, opts=None, counter_name=None, instance_name=None, interval_seconds=None, name=None, object_name=None, resource_group_name=None, workspace_name=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • counter_name (pulumi.Input[str]) – The friendly name of the performance counter.

  • instance_name (pulumi.Input[str]) – The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a * will apply to all instances.

  • interval_seconds (pulumi.Input[float]) – The time of sample interval in seconds. Supports values between 10 and 2147483647.

  • name (pulumi.Input[str]) – 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.

  • object_name (pulumi.Input[str]) – The object name of the Log Analytics Windows Performance Counter DataSource.

  • resource_group_name (pulumi.Input[str]) – 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.

  • workspace_name (pulumi.Input[str]) – 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.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.loganalytics.LinkedService(resource_name, opts=None, linked_service_name=None, resource_group_name=None, resource_id=None, tags=None, workspace_name=None, __props__=None, __name__=None, __opts__=None)

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

import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_account = azure.automation.Account("exampleAccount",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku=[{
        "name": "Basic",
    }],
    tags={
        "environment": "development",
    })
example_analytics_workspace = azure.operationalinsights.AnalyticsWorkspace("exampleAnalyticsWorkspace",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku="PerGB2018",
    retention_in_days=30)
example_linked_service = azure.loganalytics.LinkedService("exampleLinkedService",
    resource_group_name=example_resource_group.name,
    workspace_name=example_analytics_workspace.name,
    resource_id=example_account.id)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • linked_service_name (pulumi.Input[str]) – Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspace_name. Currently it defaults to and only supports automation as a value. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.

  • resource_id (pulumi.Input[str]) – The ID of the Resource that will be linked to the workspace. Changing this forces a new resource to be created.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • workspace_name (pulumi.Input[str]) – Name of the Log Analytics Workspace that will contain the linkedServices resource. Changing this forces a new resource to be created.

linked_service_name: pulumi.Output[str] = None

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

name: pulumi.Output[str] = None

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

resource_group_name: pulumi.Output[str] = None

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

resource_id: pulumi.Output[str] = None

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

tags: pulumi.Output[dict] = None

A mapping of tags to assign to the resource.

workspace_name: pulumi.Output[str] = None

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

static get(resource_name, id, opts=None, linked_service_name=None, name=None, resource_group_name=None, resource_id=None, tags=None, workspace_name=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • linked_service_name (pulumi.Input[str]) – Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspace_name. Currently it defaults to and only supports automation as a value. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – 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

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.

  • resource_id (pulumi.Input[str]) – The ID of the Resource that will be linked to the workspace. Changing this forces a new resource to be created.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • workspace_name (pulumi.Input[str]) – Name of the Log Analytics Workspace that will contain the linkedServices resource. Changing this forces a new resource to be created.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str