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.

operationalinsights

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.operationalinsights.AnalyticsSolution(resource_name, opts=None, location=None, plan=None, resource_group_name=None, solution_name=None, workspace_name=None, workspace_resource_id=None, __props__=None, __name__=None, __opts__=None)

Manages a Log Analytics (formally Operational Insights) Solution.

import pulumi
import pulumi_azure as azure
import pulumi_random as random

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="westeurope")
workspace = random.RandomId("workspace",
    keepers={
        "group_name": example_resource_group.name,
    },
    byte_length=8)
example_analytics_workspace = azure.operationalinsights.AnalyticsWorkspace("exampleAnalyticsWorkspace",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku="PerGB2018")
example_analytics_solution = azure.operationalinsights.AnalyticsSolution("exampleAnalyticsSolution",
    solution_name="ContainerInsights",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    workspace_resource_id=example_analytics_workspace.id,
    workspace_name=example_analytics_workspace.name,
    plan={
        "publisher": "Microsoft",
        "product": "OMSGallery/ContainerInsights",
    })
Parameters
  • resource_name (str) – The name of the resource.

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

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • plan (pulumi.Input[dict]) – A plan block as documented below.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the Log Analytics solution is created. Changing this forces a new resource to be created. Note: The solution and it’s related workspace can only exist in the same resource group.

  • solution_name (pulumi.Input[str]) – Specifies the name of the solution to be deployed. See here for options.Changing this forces a new resource to be created.

  • workspace_name (pulumi.Input[str]) – The full name of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.

  • workspace_resource_id (pulumi.Input[str]) – The full resource ID of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.

The plan object supports the following:

  • name (pulumi.Input[str])

  • product (pulumi.Input[str]) - The product name of the solution. For example OMSGallery/Containers. Changing this forces a new resource to be created.

  • promotionCode (pulumi.Input[str]) - A promotion code to be used with the solution.

  • publisher (pulumi.Input[str]) - The publisher of the solution. For example Microsoft. Changing this forces a new resource to be created.

location: pulumi.Output[str] = None

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

plan: pulumi.Output[dict] = None

A plan block as documented below.

  • name (str)

  • product (str) - The product name of the solution. For example OMSGallery/Containers. Changing this forces a new resource to be created.

  • promotionCode (str) - A promotion code to be used with the solution.

  • publisher (str) - The publisher of the solution. For example Microsoft. Changing this forces a new resource to be created.

resource_group_name: pulumi.Output[str] = None

The name of the resource group in which the Log Analytics solution is created. Changing this forces a new resource to be created. Note: The solution and it’s related workspace can only exist in the same resource group.

solution_name: pulumi.Output[str] = None

Specifies the name of the solution to be deployed. See here for options.Changing this forces a new resource to be created.

workspace_name: pulumi.Output[str] = None

The full name of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.

workspace_resource_id: pulumi.Output[str] = None

The full resource ID of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.

static get(resource_name, id, opts=None, location=None, plan=None, resource_group_name=None, solution_name=None, workspace_name=None, workspace_resource_id=None)

Get an existing AnalyticsSolution 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.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • plan (pulumi.Input[dict]) – A plan block as documented below.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the Log Analytics solution is created. Changing this forces a new resource to be created. Note: The solution and it’s related workspace can only exist in the same resource group.

  • solution_name (pulumi.Input[str]) –

    Specifies the name of the solution to be deployed. See here for options.Changing this forces a new resource to be created.

  • workspace_name (pulumi.Input[str]) – The full name of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.

  • workspace_resource_id (pulumi.Input[str]) – The full resource ID of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.

The plan object supports the following:

  • name (pulumi.Input[str])

  • product (pulumi.Input[str]) - The product name of the solution. For example OMSGallery/Containers. Changing this forces a new resource to be created.

  • promotionCode (pulumi.Input[str]) - A promotion code to be used with the solution.

  • publisher (pulumi.Input[str]) - The publisher of the solution. For example Microsoft. 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

class pulumi_azure.operationalinsights.AnalyticsWorkspace(resource_name, opts=None, location=None, name=None, resource_group_name=None, retention_in_days=None, sku=None, tags=None, __props__=None, __name__=None, __opts__=None)

Manages a Log Analytics (formally Operational Insights) Workspace.

import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="East US")
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)
Parameters
  • resource_name (str) – The name of the resource.

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

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Log Analytics Workspace. Workspace name should include 4-63 letters, digits or ‘-‘. The ‘-‘ shouldn’t be the first or the last symbol. 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 workspace is created. Changing this forces a new resource to be created.

  • retention_in_days (pulumi.Input[float]) – The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.

  • sku (pulumi.Input[str]) – Specifies the Sku of the Log Analytics Workspace. Possible values are Free, PerNode, Premium, Standard, Standalone, Unlimited, and PerGB2018 (new Sku as of 2018-04-03).

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

location: pulumi.Output[str] = None

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

name: pulumi.Output[str] = None

Specifies the name of the Log Analytics Workspace. Workspace name should include 4-63 letters, digits or ‘-‘. The ‘-‘ shouldn’t be the first or the last symbol. Changing this forces a new resource to be created.

portal_url: pulumi.Output[str] = None

The Portal URL for the Log Analytics Workspace.

primary_shared_key: pulumi.Output[str] = None

The Primary shared key for the Log Analytics Workspace.

resource_group_name: pulumi.Output[str] = None

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

retention_in_days: pulumi.Output[float] = None

The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.

secondary_shared_key: pulumi.Output[str] = None

The Secondary shared key for the Log Analytics Workspace.

sku: pulumi.Output[str] = None

Specifies the Sku of the Log Analytics Workspace. Possible values are Free, PerNode, Premium, Standard, Standalone, Unlimited, and PerGB2018 (new Sku as of 2018-04-03).

tags: pulumi.Output[dict] = None

A mapping of tags to assign to the resource.

workspace_id: pulumi.Output[str] = None

The Workspace (or Customer) ID for the Log Analytics Workspace.

static get(resource_name, id, opts=None, location=None, name=None, portal_url=None, primary_shared_key=None, resource_group_name=None, retention_in_days=None, secondary_shared_key=None, sku=None, tags=None, workspace_id=None)

Get an existing AnalyticsWorkspace 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.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Log Analytics Workspace. Workspace name should include 4-63 letters, digits or ‘-‘. The ‘-‘ shouldn’t be the first or the last symbol. Changing this forces a new resource to be created.

  • portal_url (pulumi.Input[str]) – The Portal URL for the Log Analytics Workspace.

  • primary_shared_key (pulumi.Input[str]) – The Primary shared key for the Log Analytics Workspace.

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

  • retention_in_days (pulumi.Input[float]) – The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.

  • secondary_shared_key (pulumi.Input[str]) – The Secondary shared key for the Log Analytics Workspace.

  • sku (pulumi.Input[str]) – Specifies the Sku of the Log Analytics Workspace. Possible values are Free, PerNode, Premium, Standard, Standalone, Unlimited, and PerGB2018 (new Sku as of 2018-04-03).

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

  • workspace_id (pulumi.Input[str]) – The Workspace (or Customer) ID for the Log Analytics Workspace.

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.operationalinsights.AwaitableGetAnalyticsWorkspaceResult(id=None, location=None, name=None, portal_url=None, primary_shared_key=None, resource_group_name=None, retention_in_days=None, secondary_shared_key=None, sku=None, tags=None, workspace_id=None)
class pulumi_azure.operationalinsights.GetAnalyticsWorkspaceResult(id=None, location=None, name=None, portal_url=None, primary_shared_key=None, resource_group_name=None, retention_in_days=None, secondary_shared_key=None, sku=None, tags=None, workspace_id=None)

A collection of values returned by getAnalyticsWorkspace.

id = None

The provider-assigned unique ID for this managed resource.

portal_url = None

The Portal URL for the Log Analytics Workspace.

primary_shared_key = None

The Primary shared key for the Log Analytics Workspace.

retention_in_days = None

The workspace data retention in days.

secondary_shared_key = None

The Secondary shared key for the Log Analytics Workspace.

sku = None

The Sku of the Log Analytics Workspace.

tags = None

A mapping of tags assigned to the resource.

workspace_id = None

The Workspace (or Customer) ID for the Log Analytics Workspace.

pulumi_azure.operationalinsights.get_analytics_workspace(name=None, resource_group_name=None, opts=None)

Use this data source to access information about an existing Log Analytics (formally Operational Insights) Workspace.

import pulumi
import pulumi_azure as azure

example = azure.operationalinsights.get_analytics_workspace(name="acctest-01",
    resource_group_name="acctest")
pulumi.export("logAnalyticsWorkspaceId", example.workspace_id)
Parameters
  • name (str) – Specifies the name of the Log Analytics Workspace.

  • resource_group_name (str) – The name of the resource group in which the Log Analytics workspace is located in.