1. Packages
  2. Azure Classic
  3. API Docs
  4. operationalinsights
  5. AnalyticsWorkspace

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages a Log Analytics (formally Operational Insights) Workspace.

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
            {
                Location = "West Europe",
            });
            var exampleAnalyticsWorkspace = new Azure.OperationalInsights.AnalyticsWorkspace("exampleAnalyticsWorkspace", new Azure.OperationalInsights.AnalyticsWorkspaceArgs
            {
                Location = exampleResourceGroup.Location,
                ResourceGroupName = exampleResourceGroup.Name,
                Sku = "PerGB2018",
                RetentionInDays = 30,
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/operationalinsights"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = operationalinsights.NewAnalyticsWorkspace(ctx, "exampleAnalyticsWorkspace", &operationalinsights.AnalyticsWorkspaceArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			Sku:               pulumi.String("PerGB2018"),
    			RetentionInDays:   pulumi.Int(30),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    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",
        retentionInDays: 30,
    });
    
    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",
        retention_in_days=30)
    

    Example coming soon!

    Create AnalyticsWorkspace Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AnalyticsWorkspace(name: string, args: AnalyticsWorkspaceArgs, opts?: CustomResourceOptions);
    @overload
    def AnalyticsWorkspace(resource_name: str,
                           args: AnalyticsWorkspaceArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def AnalyticsWorkspace(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           resource_group_name: Optional[str] = None,
                           daily_quota_gb: Optional[float] = None,
                           internet_ingestion_enabled: Optional[bool] = None,
                           internet_query_enabled: Optional[bool] = None,
                           location: Optional[str] = None,
                           name: Optional[str] = None,
                           reservation_capacity_in_gb_per_day: Optional[int] = None,
                           reservation_capcity_in_gb_per_day: Optional[int] = None,
                           retention_in_days: Optional[int] = None,
                           sku: Optional[str] = None,
                           tags: Optional[Mapping[str, str]] = None)
    func NewAnalyticsWorkspace(ctx *Context, name string, args AnalyticsWorkspaceArgs, opts ...ResourceOption) (*AnalyticsWorkspace, error)
    public AnalyticsWorkspace(string name, AnalyticsWorkspaceArgs args, CustomResourceOptions? opts = null)
    public AnalyticsWorkspace(String name, AnalyticsWorkspaceArgs args)
    public AnalyticsWorkspace(String name, AnalyticsWorkspaceArgs args, CustomResourceOptions options)
    
    type: azure:operationalinsights:AnalyticsWorkspace
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AnalyticsWorkspaceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AnalyticsWorkspaceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AnalyticsWorkspaceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AnalyticsWorkspaceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AnalyticsWorkspaceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var analyticsWorkspaceResource = new Azure.OperationalInsights.AnalyticsWorkspace("analyticsWorkspaceResource", new()
    {
        ResourceGroupName = "string",
        DailyQuotaGb = 0,
        InternetIngestionEnabled = false,
        InternetQueryEnabled = false,
        Location = "string",
        Name = "string",
        ReservationCapacityInGbPerDay = 0,
        RetentionInDays = 0,
        Sku = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := operationalinsights.NewAnalyticsWorkspace(ctx, "analyticsWorkspaceResource", &operationalinsights.AnalyticsWorkspaceArgs{
    	ResourceGroupName:             pulumi.String("string"),
    	DailyQuotaGb:                  pulumi.Float64(0),
    	InternetIngestionEnabled:      pulumi.Bool(false),
    	InternetQueryEnabled:          pulumi.Bool(false),
    	Location:                      pulumi.String("string"),
    	Name:                          pulumi.String("string"),
    	ReservationCapacityInGbPerDay: pulumi.Int(0),
    	RetentionInDays:               pulumi.Int(0),
    	Sku:                           pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var analyticsWorkspaceResource = new AnalyticsWorkspace("analyticsWorkspaceResource", AnalyticsWorkspaceArgs.builder()
        .resourceGroupName("string")
        .dailyQuotaGb(0.0)
        .internetIngestionEnabled(false)
        .internetQueryEnabled(false)
        .location("string")
        .name("string")
        .reservationCapacityInGbPerDay(0)
        .retentionInDays(0)
        .sku("string")
        .tags(Map.of("string", "string"))
        .build());
    
    analytics_workspace_resource = azure.operationalinsights.AnalyticsWorkspace("analyticsWorkspaceResource",
        resource_group_name="string",
        daily_quota_gb=0,
        internet_ingestion_enabled=False,
        internet_query_enabled=False,
        location="string",
        name="string",
        reservation_capacity_in_gb_per_day=0,
        retention_in_days=0,
        sku="string",
        tags={
            "string": "string",
        })
    
    const analyticsWorkspaceResource = new azure.operationalinsights.AnalyticsWorkspace("analyticsWorkspaceResource", {
        resourceGroupName: "string",
        dailyQuotaGb: 0,
        internetIngestionEnabled: false,
        internetQueryEnabled: false,
        location: "string",
        name: "string",
        reservationCapacityInGbPerDay: 0,
        retentionInDays: 0,
        sku: "string",
        tags: {
            string: "string",
        },
    });
    
    type: azure:operationalinsights:AnalyticsWorkspace
    properties:
        dailyQuotaGb: 0
        internetIngestionEnabled: false
        internetQueryEnabled: false
        location: string
        name: string
        reservationCapacityInGbPerDay: 0
        resourceGroupName: string
        retentionInDays: 0
        sku: string
        tags:
            string: string
    

    AnalyticsWorkspace Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The AnalyticsWorkspace resource accepts the following input properties:

    ResourceGroupName string
    The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
    DailyQuotaGb double
    The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
    InternetIngestionEnabled bool
    InternetQueryEnabled bool
    Should the Log Analytics Workflow support querying over the Public Internet? Defaults to true.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    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.
    ReservationCapacityInGbPerDay int
    The capacity reservation level in GB for this workspace. Must be in increments of 100 between 100 and 5000.
    ReservationCapcityInGbPerDay int

    Deprecated: As this property name contained a typo originally, please switch to using 'reservation_capacity_in_gb_per_day' instead.

    RetentionInDays int
    The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
    Sku string
    Specifies the Sku of the Log Analytics Workspace. Possible values are Free, PerNode, Premium, Standard, Standalone, Unlimited, CapacityReservation, and PerGB2018 (new Sku as of 2018-04-03). Defaults to PerGB2018.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    ResourceGroupName string
    The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
    DailyQuotaGb float64
    The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
    InternetIngestionEnabled bool
    InternetQueryEnabled bool
    Should the Log Analytics Workflow support querying over the Public Internet? Defaults to true.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    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.
    ReservationCapacityInGbPerDay int
    The capacity reservation level in GB for this workspace. Must be in increments of 100 between 100 and 5000.
    ReservationCapcityInGbPerDay int

    Deprecated: As this property name contained a typo originally, please switch to using 'reservation_capacity_in_gb_per_day' instead.

    RetentionInDays int
    The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
    Sku string
    Specifies the Sku of the Log Analytics Workspace. Possible values are Free, PerNode, Premium, Standard, Standalone, Unlimited, CapacityReservation, and PerGB2018 (new Sku as of 2018-04-03). Defaults to PerGB2018.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    resourceGroupName String
    The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
    dailyQuotaGb Double
    The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
    internetIngestionEnabled Boolean
    internetQueryEnabled Boolean
    Should the Log Analytics Workflow support querying over the Public Internet? Defaults to true.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    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.
    reservationCapacityInGbPerDay Integer
    The capacity reservation level in GB for this workspace. Must be in increments of 100 between 100 and 5000.
    reservationCapcityInGbPerDay Integer

    Deprecated: As this property name contained a typo originally, please switch to using 'reservation_capacity_in_gb_per_day' instead.

    retentionInDays Integer
    The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
    sku String
    Specifies the Sku of the Log Analytics Workspace. Possible values are Free, PerNode, Premium, Standard, Standalone, Unlimited, CapacityReservation, and PerGB2018 (new Sku as of 2018-04-03). Defaults to PerGB2018.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    resourceGroupName string
    The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
    dailyQuotaGb number
    The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
    internetIngestionEnabled boolean
    internetQueryEnabled boolean
    Should the Log Analytics Workflow support querying over the Public Internet? Defaults to true.
    location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name string
    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.
    reservationCapacityInGbPerDay number
    The capacity reservation level in GB for this workspace. Must be in increments of 100 between 100 and 5000.
    reservationCapcityInGbPerDay number

    Deprecated: As this property name contained a typo originally, please switch to using 'reservation_capacity_in_gb_per_day' instead.

    retentionInDays number
    The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
    sku string
    Specifies the Sku of the Log Analytics Workspace. Possible values are Free, PerNode, Premium, Standard, Standalone, Unlimited, CapacityReservation, and PerGB2018 (new Sku as of 2018-04-03). Defaults to PerGB2018.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    resource_group_name str
    The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
    daily_quota_gb float
    The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
    internet_ingestion_enabled bool
    internet_query_enabled bool
    Should the Log Analytics Workflow support querying over the Public Internet? Defaults to true.
    location str
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name 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.
    reservation_capacity_in_gb_per_day int
    The capacity reservation level in GB for this workspace. Must be in increments of 100 between 100 and 5000.
    reservation_capcity_in_gb_per_day int

    Deprecated: As this property name contained a typo originally, please switch to using 'reservation_capacity_in_gb_per_day' instead.

    retention_in_days int
    The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
    sku str
    Specifies the Sku of the Log Analytics Workspace. Possible values are Free, PerNode, Premium, Standard, Standalone, Unlimited, CapacityReservation, and PerGB2018 (new Sku as of 2018-04-03). Defaults to PerGB2018.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    resourceGroupName String
    The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
    dailyQuotaGb Number
    The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
    internetIngestionEnabled Boolean
    internetQueryEnabled Boolean
    Should the Log Analytics Workflow support querying over the Public Internet? Defaults to true.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    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.
    reservationCapacityInGbPerDay Number
    The capacity reservation level in GB for this workspace. Must be in increments of 100 between 100 and 5000.
    reservationCapcityInGbPerDay Number

    Deprecated: As this property name contained a typo originally, please switch to using 'reservation_capacity_in_gb_per_day' instead.

    retentionInDays Number
    The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
    sku String
    Specifies the Sku of the Log Analytics Workspace. Possible values are Free, PerNode, Premium, Standard, Standalone, Unlimited, CapacityReservation, and PerGB2018 (new Sku as of 2018-04-03). Defaults to PerGB2018.
    tags Map<String>
    A mapping of tags to assign to the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AnalyticsWorkspace resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    PortalUrl string

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    PrimarySharedKey string
    The Primary shared key for the Log Analytics Workspace.
    SecondarySharedKey string
    The Secondary shared key for the Log Analytics Workspace.
    WorkspaceId string
    The Workspace (or Customer) ID for the Log Analytics Workspace.
    Id string
    The provider-assigned unique ID for this managed resource.
    PortalUrl string

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    PrimarySharedKey string
    The Primary shared key for the Log Analytics Workspace.
    SecondarySharedKey string
    The Secondary shared key for the Log Analytics Workspace.
    WorkspaceId string
    The Workspace (or Customer) ID for the Log Analytics Workspace.
    id String
    The provider-assigned unique ID for this managed resource.
    portalUrl String

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    primarySharedKey String
    The Primary shared key for the Log Analytics Workspace.
    secondarySharedKey String
    The Secondary shared key for the Log Analytics Workspace.
    workspaceId String
    The Workspace (or Customer) ID for the Log Analytics Workspace.
    id string
    The provider-assigned unique ID for this managed resource.
    portalUrl string

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    primarySharedKey string
    The Primary shared key for the Log Analytics Workspace.
    secondarySharedKey string
    The Secondary shared key for the Log Analytics Workspace.
    workspaceId string
    The Workspace (or Customer) ID for the Log Analytics Workspace.
    id str
    The provider-assigned unique ID for this managed resource.
    portal_url str

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    primary_shared_key str
    The Primary shared key for the Log Analytics Workspace.
    secondary_shared_key str
    The Secondary shared key for the Log Analytics Workspace.
    workspace_id str
    The Workspace (or Customer) ID for the Log Analytics Workspace.
    id String
    The provider-assigned unique ID for this managed resource.
    portalUrl String

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    primarySharedKey String
    The Primary shared key for the Log Analytics Workspace.
    secondarySharedKey String
    The Secondary shared key for the Log Analytics Workspace.
    workspaceId String
    The Workspace (or Customer) ID for the Log Analytics Workspace.

    Look up Existing AnalyticsWorkspace Resource

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

    public static get(name: string, id: Input<ID>, state?: AnalyticsWorkspaceState, opts?: CustomResourceOptions): AnalyticsWorkspace
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            daily_quota_gb: Optional[float] = None,
            internet_ingestion_enabled: Optional[bool] = None,
            internet_query_enabled: Optional[bool] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            portal_url: Optional[str] = None,
            primary_shared_key: Optional[str] = None,
            reservation_capacity_in_gb_per_day: Optional[int] = None,
            reservation_capcity_in_gb_per_day: Optional[int] = None,
            resource_group_name: Optional[str] = None,
            retention_in_days: Optional[int] = None,
            secondary_shared_key: Optional[str] = None,
            sku: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            workspace_id: Optional[str] = None) -> AnalyticsWorkspace
    func GetAnalyticsWorkspace(ctx *Context, name string, id IDInput, state *AnalyticsWorkspaceState, opts ...ResourceOption) (*AnalyticsWorkspace, error)
    public static AnalyticsWorkspace Get(string name, Input<string> id, AnalyticsWorkspaceState? state, CustomResourceOptions? opts = null)
    public static AnalyticsWorkspace get(String name, Output<String> id, AnalyticsWorkspaceState state, CustomResourceOptions options)
    resources:  _:    type: azure:operationalinsights:AnalyticsWorkspace    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DailyQuotaGb double
    The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
    InternetIngestionEnabled bool
    InternetQueryEnabled bool
    Should the Log Analytics Workflow support querying over the Public Internet? Defaults to true.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    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.
    PortalUrl string

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    PrimarySharedKey string
    The Primary shared key for the Log Analytics Workspace.
    ReservationCapacityInGbPerDay int
    The capacity reservation level in GB for this workspace. Must be in increments of 100 between 100 and 5000.
    ReservationCapcityInGbPerDay int

    Deprecated: As this property name contained a typo originally, please switch to using 'reservation_capacity_in_gb_per_day' instead.

    ResourceGroupName string
    The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
    RetentionInDays int
    The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
    SecondarySharedKey string
    The Secondary shared key for the Log Analytics Workspace.
    Sku string
    Specifies the Sku of the Log Analytics Workspace. Possible values are Free, PerNode, Premium, Standard, Standalone, Unlimited, CapacityReservation, and PerGB2018 (new Sku as of 2018-04-03). Defaults to PerGB2018.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    WorkspaceId string
    The Workspace (or Customer) ID for the Log Analytics Workspace.
    DailyQuotaGb float64
    The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
    InternetIngestionEnabled bool
    InternetQueryEnabled bool
    Should the Log Analytics Workflow support querying over the Public Internet? Defaults to true.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    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.
    PortalUrl string

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    PrimarySharedKey string
    The Primary shared key for the Log Analytics Workspace.
    ReservationCapacityInGbPerDay int
    The capacity reservation level in GB for this workspace. Must be in increments of 100 between 100 and 5000.
    ReservationCapcityInGbPerDay int

    Deprecated: As this property name contained a typo originally, please switch to using 'reservation_capacity_in_gb_per_day' instead.

    ResourceGroupName string
    The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
    RetentionInDays int
    The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
    SecondarySharedKey string
    The Secondary shared key for the Log Analytics Workspace.
    Sku string
    Specifies the Sku of the Log Analytics Workspace. Possible values are Free, PerNode, Premium, Standard, Standalone, Unlimited, CapacityReservation, and PerGB2018 (new Sku as of 2018-04-03). Defaults to PerGB2018.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    WorkspaceId string
    The Workspace (or Customer) ID for the Log Analytics Workspace.
    dailyQuotaGb Double
    The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
    internetIngestionEnabled Boolean
    internetQueryEnabled Boolean
    Should the Log Analytics Workflow support querying over the Public Internet? Defaults to true.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    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.
    portalUrl String

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    primarySharedKey String
    The Primary shared key for the Log Analytics Workspace.
    reservationCapacityInGbPerDay Integer
    The capacity reservation level in GB for this workspace. Must be in increments of 100 between 100 and 5000.
    reservationCapcityInGbPerDay Integer

    Deprecated: As this property name contained a typo originally, please switch to using 'reservation_capacity_in_gb_per_day' instead.

    resourceGroupName String
    The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
    retentionInDays Integer
    The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
    secondarySharedKey String
    The Secondary shared key for the Log Analytics Workspace.
    sku String
    Specifies the Sku of the Log Analytics Workspace. Possible values are Free, PerNode, Premium, Standard, Standalone, Unlimited, CapacityReservation, and PerGB2018 (new Sku as of 2018-04-03). Defaults to PerGB2018.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    workspaceId String
    The Workspace (or Customer) ID for the Log Analytics Workspace.
    dailyQuotaGb number
    The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
    internetIngestionEnabled boolean
    internetQueryEnabled boolean
    Should the Log Analytics Workflow support querying over the Public Internet? Defaults to true.
    location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name string
    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.
    portalUrl string

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    primarySharedKey string
    The Primary shared key for the Log Analytics Workspace.
    reservationCapacityInGbPerDay number
    The capacity reservation level in GB for this workspace. Must be in increments of 100 between 100 and 5000.
    reservationCapcityInGbPerDay number

    Deprecated: As this property name contained a typo originally, please switch to using 'reservation_capacity_in_gb_per_day' instead.

    resourceGroupName string
    The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
    retentionInDays number
    The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
    secondarySharedKey string
    The Secondary shared key for the Log Analytics Workspace.
    sku string
    Specifies the Sku of the Log Analytics Workspace. Possible values are Free, PerNode, Premium, Standard, Standalone, Unlimited, CapacityReservation, and PerGB2018 (new Sku as of 2018-04-03). Defaults to PerGB2018.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    workspaceId string
    The Workspace (or Customer) ID for the Log Analytics Workspace.
    daily_quota_gb float
    The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
    internet_ingestion_enabled bool
    internet_query_enabled bool
    Should the Log Analytics Workflow support querying over the Public Internet? Defaults to true.
    location str
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name 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 str

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    primary_shared_key str
    The Primary shared key for the Log Analytics Workspace.
    reservation_capacity_in_gb_per_day int
    The capacity reservation level in GB for this workspace. Must be in increments of 100 between 100 and 5000.
    reservation_capcity_in_gb_per_day int

    Deprecated: As this property name contained a typo originally, please switch to using 'reservation_capacity_in_gb_per_day' instead.

    resource_group_name 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 int
    The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
    secondary_shared_key str
    The Secondary shared key for the Log Analytics Workspace.
    sku str
    Specifies the Sku of the Log Analytics Workspace. Possible values are Free, PerNode, Premium, Standard, Standalone, Unlimited, CapacityReservation, and PerGB2018 (new Sku as of 2018-04-03). Defaults to PerGB2018.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    workspace_id str
    The Workspace (or Customer) ID for the Log Analytics Workspace.
    dailyQuotaGb Number
    The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
    internetIngestionEnabled Boolean
    internetQueryEnabled Boolean
    Should the Log Analytics Workflow support querying over the Public Internet? Defaults to true.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    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.
    portalUrl String

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    primarySharedKey String
    The Primary shared key for the Log Analytics Workspace.
    reservationCapacityInGbPerDay Number
    The capacity reservation level in GB for this workspace. Must be in increments of 100 between 100 and 5000.
    reservationCapcityInGbPerDay Number

    Deprecated: As this property name contained a typo originally, please switch to using 'reservation_capacity_in_gb_per_day' instead.

    resourceGroupName String
    The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
    retentionInDays Number
    The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
    secondarySharedKey String
    The Secondary shared key for the Log Analytics Workspace.
    sku String
    Specifies the Sku of the Log Analytics Workspace. Possible values are Free, PerNode, Premium, Standard, Standalone, Unlimited, CapacityReservation, and PerGB2018 (new Sku as of 2018-04-03). Defaults to PerGB2018.
    tags Map<String>
    A mapping of tags to assign to the resource.
    workspaceId String
    The Workspace (or Customer) ID for the Log Analytics Workspace.

    Import

    Log Analytics Workspaces can be imported using the resource id, e.g.

     $ pulumi import azure:operationalinsights/analyticsWorkspace:AnalyticsWorkspace workspace1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.