We recommend using Azure Native.
azure.operationalinsights.AnalyticsWorkspace
Explore with Pulumi AI
Manages a Log Analytics (formally Operational Insights) Workspace.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
    name: "example-resources",
    location: "West Europe",
});
const exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("example", {
    name: "acctest-01",
    location: example.location,
    resourceGroupName: example.name,
    sku: "PerGB2018",
    retentionInDays: 30,
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
    name="example-resources",
    location="West Europe")
example_analytics_workspace = azure.operationalinsights.AnalyticsWorkspace("example",
    name="acctest-01",
    location=example.location,
    resource_group_name=example.name,
    sku="PerGB2018",
    retention_in_days=30)
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("example-resources"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		_, err = operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
			Name:              pulumi.String("acctest-01"),
			Location:          example.Location,
			ResourceGroupName: example.Name,
			Sku:               pulumi.String("PerGB2018"),
			RetentionInDays:   pulumi.Int(30),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "example-resources",
        Location = "West Europe",
    });
    var exampleAnalyticsWorkspace = new Azure.OperationalInsights.AnalyticsWorkspace("example", new()
    {
        Name = "acctest-01",
        Location = example.Location,
        ResourceGroupName = example.Name,
        Sku = "PerGB2018",
        RetentionInDays = 30,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.operationalinsights.AnalyticsWorkspace;
import com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var example = new ResourceGroup("example", ResourceGroupArgs.builder()
            .name("example-resources")
            .location("West Europe")
            .build());
        var exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()
            .name("acctest-01")
            .location(example.location())
            .resourceGroupName(example.name())
            .sku("PerGB2018")
            .retentionInDays(30)
            .build());
    }
}
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-resources
      location: West Europe
  exampleAnalyticsWorkspace:
    type: azure:operationalinsights:AnalyticsWorkspace
    name: example
    properties:
      name: acctest-01
      location: ${example.location}
      resourceGroupName: ${example.name}
      sku: PerGB2018
      retentionInDays: 30
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,
                       identity: Optional[AnalyticsWorkspaceIdentityArgs] = None,
                       location: Optional[str] = None,
                       data_collection_rule_id: Optional[str] = None,
                       allow_resource_only_permissions: Optional[bool] = None,
                       immediate_data_purge_on30_days_enabled: Optional[bool] = None,
                       internet_ingestion_enabled: Optional[bool] = None,
                       daily_quota_gb: Optional[float] = None,
                       local_authentication_disabled: Optional[bool] = None,
                       internet_query_enabled: Optional[bool] = None,
                       name: Optional[str] = None,
                       reservation_capacity_in_gb_per_day: Optional[int] = None,
                       cmk_for_query_forced: Optional[bool] = 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",
    Identity = new Azure.OperationalInsights.Inputs.AnalyticsWorkspaceIdentityArgs
    {
        Type = "string",
        IdentityIds = new[]
        {
            "string",
        },
        PrincipalId = "string",
        TenantId = "string",
    },
    Location = "string",
    DataCollectionRuleId = "string",
    AllowResourceOnlyPermissions = false,
    ImmediateDataPurgeOn30DaysEnabled = false,
    InternetIngestionEnabled = false,
    DailyQuotaGb = 0,
    LocalAuthenticationDisabled = false,
    InternetQueryEnabled = false,
    Name = "string",
    ReservationCapacityInGbPerDay = 0,
    CmkForQueryForced = false,
    RetentionInDays = 0,
    Sku = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
example, err := operationalinsights.NewAnalyticsWorkspace(ctx, "analyticsWorkspaceResource", &operationalinsights.AnalyticsWorkspaceArgs{
	ResourceGroupName: pulumi.String("string"),
	Identity: &operationalinsights.AnalyticsWorkspaceIdentityArgs{
		Type: pulumi.String("string"),
		IdentityIds: pulumi.StringArray{
			pulumi.String("string"),
		},
		PrincipalId: pulumi.String("string"),
		TenantId:    pulumi.String("string"),
	},
	Location:                          pulumi.String("string"),
	DataCollectionRuleId:              pulumi.String("string"),
	AllowResourceOnlyPermissions:      pulumi.Bool(false),
	ImmediateDataPurgeOn30DaysEnabled: pulumi.Bool(false),
	InternetIngestionEnabled:          pulumi.Bool(false),
	DailyQuotaGb:                      pulumi.Float64(0),
	LocalAuthenticationDisabled:       pulumi.Bool(false),
	InternetQueryEnabled:              pulumi.Bool(false),
	Name:                              pulumi.String("string"),
	ReservationCapacityInGbPerDay:     pulumi.Int(0),
	CmkForQueryForced:                 pulumi.Bool(false),
	RetentionInDays:                   pulumi.Int(0),
	Sku:                               pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
var analyticsWorkspaceResource = new AnalyticsWorkspace("analyticsWorkspaceResource", AnalyticsWorkspaceArgs.builder()
    .resourceGroupName("string")
    .identity(AnalyticsWorkspaceIdentityArgs.builder()
        .type("string")
        .identityIds("string")
        .principalId("string")
        .tenantId("string")
        .build())
    .location("string")
    .dataCollectionRuleId("string")
    .allowResourceOnlyPermissions(false)
    .immediateDataPurgeOn30DaysEnabled(false)
    .internetIngestionEnabled(false)
    .dailyQuotaGb(0)
    .localAuthenticationDisabled(false)
    .internetQueryEnabled(false)
    .name("string")
    .reservationCapacityInGbPerDay(0)
    .cmkForQueryForced(false)
    .retentionInDays(0)
    .sku("string")
    .tags(Map.of("string", "string"))
    .build());
analytics_workspace_resource = azure.operationalinsights.AnalyticsWorkspace("analyticsWorkspaceResource",
    resource_group_name="string",
    identity={
        "type": "string",
        "identity_ids": ["string"],
        "principal_id": "string",
        "tenant_id": "string",
    },
    location="string",
    data_collection_rule_id="string",
    allow_resource_only_permissions=False,
    immediate_data_purge_on30_days_enabled=False,
    internet_ingestion_enabled=False,
    daily_quota_gb=0,
    local_authentication_disabled=False,
    internet_query_enabled=False,
    name="string",
    reservation_capacity_in_gb_per_day=0,
    cmk_for_query_forced=False,
    retention_in_days=0,
    sku="string",
    tags={
        "string": "string",
    })
const analyticsWorkspaceResource = new azure.operationalinsights.AnalyticsWorkspace("analyticsWorkspaceResource", {
    resourceGroupName: "string",
    identity: {
        type: "string",
        identityIds: ["string"],
        principalId: "string",
        tenantId: "string",
    },
    location: "string",
    dataCollectionRuleId: "string",
    allowResourceOnlyPermissions: false,
    immediateDataPurgeOn30DaysEnabled: false,
    internetIngestionEnabled: false,
    dailyQuotaGb: 0,
    localAuthenticationDisabled: false,
    internetQueryEnabled: false,
    name: "string",
    reservationCapacityInGbPerDay: 0,
    cmkForQueryForced: false,
    retentionInDays: 0,
    sku: "string",
    tags: {
        string: "string",
    },
});
type: azure:operationalinsights:AnalyticsWorkspace
properties:
    allowResourceOnlyPermissions: false
    cmkForQueryForced: false
    dailyQuotaGb: 0
    dataCollectionRuleId: string
    identity:
        identityIds:
            - string
        principalId: string
        tenantId: string
        type: string
    immediateDataPurgeOn30DaysEnabled: false
    internetIngestionEnabled: false
    internetQueryEnabled: false
    localAuthenticationDisabled: 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:
- ResourceGroup stringName 
- The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
- AllowResource boolOnly Permissions 
- Specifies if the log Analytics Workspace allow users accessing to data associated with resources they have permission to view, without permission to workspace. Defaults to true.
- CmkFor boolQuery Forced 
- Is Customer Managed Storage mandatory for query management?
- DailyQuota doubleGb 
- The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted. - NOTE: When - skuis set to- Freethis field should not be set and has a default value of- 0.5.
- DataCollection stringRule Id 
- The ID of the Data Collection Rule to use for this workspace.
- Identity
AnalyticsWorkspace Identity 
- An identityblock as defined below.
- ImmediateData boolPurge On30Days Enabled 
- Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
- InternetIngestion boolEnabled 
- Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to true.
- InternetQuery boolEnabled 
- Should the Log Analytics Workspace support querying over the Public Internet? Defaults to true.
- LocalAuthentication boolDisabled 
- Specifies if the log Analytics workspace should enforce authentication using Azure AD. Defaults to false.
- 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.
- ReservationCapacity intIn Gb Per Day 
- The capacity reservation level in GB for this workspace. Possible values are - 100,- 200,- 300,- 400,- 500,- 1000,- 2000and- 5000.- NOTE: - reservation_capacity_in_gb_per_daycan only be used when the- skuis set to- CapacityReservation.
- RetentionIn intDays 
- 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 - PerNode,- Premium,- Standard,- Standalone,- Unlimited,- CapacityReservation, and- PerGB2018(new SKU as of- 2018-04-03). Defaults to- PerGB2018.- NOTE: A new pricing model took effect on - 2018-04-03, which requires the SKU- PerGB2018. If you're provisioned resources before this date you have the option of remaining with the previous Pricing SKU and using the other SKUs defined above. More information about the Pricing SKUs is available at the following URI.- NOTE: Changing - skuforces a new Log Analytics Workspace to be created, except when changing between- PerGB2018and- CapacityReservation. However, changing- skuto- CapacityReservationor changing- reservation_capacity_in_gb_per_dayto a higher tier will lead to a 31-days commitment period, during which the SKU cannot be changed to a lower one. Please refer to official documentation for further information.
- Dictionary<string, string>
- A mapping of tags to assign to the resource. - NOTE: If a - azure.operationalinsights.AnalyticsWorkspaceis connected to a- azure.loganalytics.Clustervia a- azure.loganalytics.LinkedServiceyou will not be able to modify the workspaces- skufield until the link between the workspace and the cluster has been broken by deleting the- azure.loganalytics.LinkedServiceresource. All other fields are modifiable while the workspace is linked to a cluster.
- ResourceGroup stringName 
- The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
- AllowResource boolOnly Permissions 
- Specifies if the log Analytics Workspace allow users accessing to data associated with resources they have permission to view, without permission to workspace. Defaults to true.
- CmkFor boolQuery Forced 
- Is Customer Managed Storage mandatory for query management?
- DailyQuota float64Gb 
- The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted. - NOTE: When - skuis set to- Freethis field should not be set and has a default value of- 0.5.
- DataCollection stringRule Id 
- The ID of the Data Collection Rule to use for this workspace.
- Identity
AnalyticsWorkspace Identity Args 
- An identityblock as defined below.
- ImmediateData boolPurge On30Days Enabled 
- Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
- InternetIngestion boolEnabled 
- Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to true.
- InternetQuery boolEnabled 
- Should the Log Analytics Workspace support querying over the Public Internet? Defaults to true.
- LocalAuthentication boolDisabled 
- Specifies if the log Analytics workspace should enforce authentication using Azure AD. Defaults to false.
- 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.
- ReservationCapacity intIn Gb Per Day 
- The capacity reservation level in GB for this workspace. Possible values are - 100,- 200,- 300,- 400,- 500,- 1000,- 2000and- 5000.- NOTE: - reservation_capacity_in_gb_per_daycan only be used when the- skuis set to- CapacityReservation.
- RetentionIn intDays 
- 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 - PerNode,- Premium,- Standard,- Standalone,- Unlimited,- CapacityReservation, and- PerGB2018(new SKU as of- 2018-04-03). Defaults to- PerGB2018.- NOTE: A new pricing model took effect on - 2018-04-03, which requires the SKU- PerGB2018. If you're provisioned resources before this date you have the option of remaining with the previous Pricing SKU and using the other SKUs defined above. More information about the Pricing SKUs is available at the following URI.- NOTE: Changing - skuforces a new Log Analytics Workspace to be created, except when changing between- PerGB2018and- CapacityReservation. However, changing- skuto- CapacityReservationor changing- reservation_capacity_in_gb_per_dayto a higher tier will lead to a 31-days commitment period, during which the SKU cannot be changed to a lower one. Please refer to official documentation for further information.
- map[string]string
- A mapping of tags to assign to the resource. - NOTE: If a - azure.operationalinsights.AnalyticsWorkspaceis connected to a- azure.loganalytics.Clustervia a- azure.loganalytics.LinkedServiceyou will not be able to modify the workspaces- skufield until the link between the workspace and the cluster has been broken by deleting the- azure.loganalytics.LinkedServiceresource. All other fields are modifiable while the workspace is linked to a cluster.
- resourceGroup StringName 
- The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
- allowResource BooleanOnly Permissions 
- Specifies if the log Analytics Workspace allow users accessing to data associated with resources they have permission to view, without permission to workspace. Defaults to true.
- cmkFor BooleanQuery Forced 
- Is Customer Managed Storage mandatory for query management?
- dailyQuota DoubleGb 
- The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted. - NOTE: When - skuis set to- Freethis field should not be set and has a default value of- 0.5.
- dataCollection StringRule Id 
- The ID of the Data Collection Rule to use for this workspace.
- identity
AnalyticsWorkspace Identity 
- An identityblock as defined below.
- immediateData BooleanPurge On30Days Enabled 
- Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
- internetIngestion BooleanEnabled 
- Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to true.
- internetQuery BooleanEnabled 
- Should the Log Analytics Workspace support querying over the Public Internet? Defaults to true.
- localAuthentication BooleanDisabled 
- Specifies if the log Analytics workspace should enforce authentication using Azure AD. Defaults to false.
- 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.
- reservationCapacity IntegerIn Gb Per Day 
- The capacity reservation level in GB for this workspace. Possible values are - 100,- 200,- 300,- 400,- 500,- 1000,- 2000and- 5000.- NOTE: - reservation_capacity_in_gb_per_daycan only be used when the- skuis set to- CapacityReservation.
- retentionIn IntegerDays 
- 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 - PerNode,- Premium,- Standard,- Standalone,- Unlimited,- CapacityReservation, and- PerGB2018(new SKU as of- 2018-04-03). Defaults to- PerGB2018.- NOTE: A new pricing model took effect on - 2018-04-03, which requires the SKU- PerGB2018. If you're provisioned resources before this date you have the option of remaining with the previous Pricing SKU and using the other SKUs defined above. More information about the Pricing SKUs is available at the following URI.- NOTE: Changing - skuforces a new Log Analytics Workspace to be created, except when changing between- PerGB2018and- CapacityReservation. However, changing- skuto- CapacityReservationor changing- reservation_capacity_in_gb_per_dayto a higher tier will lead to a 31-days commitment period, during which the SKU cannot be changed to a lower one. Please refer to official documentation for further information.
- Map<String,String>
- A mapping of tags to assign to the resource. - NOTE: If a - azure.operationalinsights.AnalyticsWorkspaceis connected to a- azure.loganalytics.Clustervia a- azure.loganalytics.LinkedServiceyou will not be able to modify the workspaces- skufield until the link between the workspace and the cluster has been broken by deleting the- azure.loganalytics.LinkedServiceresource. All other fields are modifiable while the workspace is linked to a cluster.
- resourceGroup stringName 
- The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
- allowResource booleanOnly Permissions 
- Specifies if the log Analytics Workspace allow users accessing to data associated with resources they have permission to view, without permission to workspace. Defaults to true.
- cmkFor booleanQuery Forced 
- Is Customer Managed Storage mandatory for query management?
- dailyQuota numberGb 
- The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted. - NOTE: When - skuis set to- Freethis field should not be set and has a default value of- 0.5.
- dataCollection stringRule Id 
- The ID of the Data Collection Rule to use for this workspace.
- identity
AnalyticsWorkspace Identity 
- An identityblock as defined below.
- immediateData booleanPurge On30Days Enabled 
- Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
- internetIngestion booleanEnabled 
- Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to true.
- internetQuery booleanEnabled 
- Should the Log Analytics Workspace support querying over the Public Internet? Defaults to true.
- localAuthentication booleanDisabled 
- Specifies if the log Analytics workspace should enforce authentication using Azure AD. Defaults to false.
- 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.
- reservationCapacity numberIn Gb Per Day 
- The capacity reservation level in GB for this workspace. Possible values are - 100,- 200,- 300,- 400,- 500,- 1000,- 2000and- 5000.- NOTE: - reservation_capacity_in_gb_per_daycan only be used when the- skuis set to- CapacityReservation.
- retentionIn numberDays 
- 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 - PerNode,- Premium,- Standard,- Standalone,- Unlimited,- CapacityReservation, and- PerGB2018(new SKU as of- 2018-04-03). Defaults to- PerGB2018.- NOTE: A new pricing model took effect on - 2018-04-03, which requires the SKU- PerGB2018. If you're provisioned resources before this date you have the option of remaining with the previous Pricing SKU and using the other SKUs defined above. More information about the Pricing SKUs is available at the following URI.- NOTE: Changing - skuforces a new Log Analytics Workspace to be created, except when changing between- PerGB2018and- CapacityReservation. However, changing- skuto- CapacityReservationor changing- reservation_capacity_in_gb_per_dayto a higher tier will lead to a 31-days commitment period, during which the SKU cannot be changed to a lower one. Please refer to official documentation for further information.
- {[key: string]: string}
- A mapping of tags to assign to the resource. - NOTE: If a - azure.operationalinsights.AnalyticsWorkspaceis connected to a- azure.loganalytics.Clustervia a- azure.loganalytics.LinkedServiceyou will not be able to modify the workspaces- skufield until the link between the workspace and the cluster has been broken by deleting the- azure.loganalytics.LinkedServiceresource. All other fields are modifiable while the workspace is linked to a cluster.
- resource_group_ strname 
- The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
- allow_resource_ boolonly_ permissions 
- Specifies if the log Analytics Workspace allow users accessing to data associated with resources they have permission to view, without permission to workspace. Defaults to true.
- cmk_for_ boolquery_ forced 
- Is Customer Managed Storage mandatory for query management?
- daily_quota_ floatgb 
- The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted. - NOTE: When - skuis set to- Freethis field should not be set and has a default value of- 0.5.
- data_collection_ strrule_ id 
- The ID of the Data Collection Rule to use for this workspace.
- identity
AnalyticsWorkspace Identity Args 
- An identityblock as defined below.
- immediate_data_ boolpurge_ on30_ days_ enabled 
- Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
- internet_ingestion_ boolenabled 
- Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to true.
- internet_query_ boolenabled 
- Should the Log Analytics Workspace support querying over the Public Internet? Defaults to true.
- local_authentication_ booldisabled 
- Specifies if the log Analytics workspace should enforce authentication using Azure AD. Defaults to false.
- 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_ intin_ gb_ per_ day 
- The capacity reservation level in GB for this workspace. Possible values are - 100,- 200,- 300,- 400,- 500,- 1000,- 2000and- 5000.- NOTE: - reservation_capacity_in_gb_per_daycan only be used when the- skuis set to- CapacityReservation.
- retention_in_ intdays 
- 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 - PerNode,- Premium,- Standard,- Standalone,- Unlimited,- CapacityReservation, and- PerGB2018(new SKU as of- 2018-04-03). Defaults to- PerGB2018.- NOTE: A new pricing model took effect on - 2018-04-03, which requires the SKU- PerGB2018. If you're provisioned resources before this date you have the option of remaining with the previous Pricing SKU and using the other SKUs defined above. More information about the Pricing SKUs is available at the following URI.- NOTE: Changing - skuforces a new Log Analytics Workspace to be created, except when changing between- PerGB2018and- CapacityReservation. However, changing- skuto- CapacityReservationor changing- reservation_capacity_in_gb_per_dayto a higher tier will lead to a 31-days commitment period, during which the SKU cannot be changed to a lower one. Please refer to official documentation for further information.
- Mapping[str, str]
- A mapping of tags to assign to the resource. - NOTE: If a - azure.operationalinsights.AnalyticsWorkspaceis connected to a- azure.loganalytics.Clustervia a- azure.loganalytics.LinkedServiceyou will not be able to modify the workspaces- skufield until the link between the workspace and the cluster has been broken by deleting the- azure.loganalytics.LinkedServiceresource. All other fields are modifiable while the workspace is linked to a cluster.
- resourceGroup StringName 
- The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
- allowResource BooleanOnly Permissions 
- Specifies if the log Analytics Workspace allow users accessing to data associated with resources they have permission to view, without permission to workspace. Defaults to true.
- cmkFor BooleanQuery Forced 
- Is Customer Managed Storage mandatory for query management?
- dailyQuota NumberGb 
- The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted. - NOTE: When - skuis set to- Freethis field should not be set and has a default value of- 0.5.
- dataCollection StringRule Id 
- The ID of the Data Collection Rule to use for this workspace.
- identity Property Map
- An identityblock as defined below.
- immediateData BooleanPurge On30Days Enabled 
- Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
- internetIngestion BooleanEnabled 
- Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to true.
- internetQuery BooleanEnabled 
- Should the Log Analytics Workspace support querying over the Public Internet? Defaults to true.
- localAuthentication BooleanDisabled 
- Specifies if the log Analytics workspace should enforce authentication using Azure AD. Defaults to false.
- 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.
- reservationCapacity NumberIn Gb Per Day 
- The capacity reservation level in GB for this workspace. Possible values are - 100,- 200,- 300,- 400,- 500,- 1000,- 2000and- 5000.- NOTE: - reservation_capacity_in_gb_per_daycan only be used when the- skuis set to- CapacityReservation.
- retentionIn NumberDays 
- 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 - PerNode,- Premium,- Standard,- Standalone,- Unlimited,- CapacityReservation, and- PerGB2018(new SKU as of- 2018-04-03). Defaults to- PerGB2018.- NOTE: A new pricing model took effect on - 2018-04-03, which requires the SKU- PerGB2018. If you're provisioned resources before this date you have the option of remaining with the previous Pricing SKU and using the other SKUs defined above. More information about the Pricing SKUs is available at the following URI.- NOTE: Changing - skuforces a new Log Analytics Workspace to be created, except when changing between- PerGB2018and- CapacityReservation. However, changing- skuto- CapacityReservationor changing- reservation_capacity_in_gb_per_dayto a higher tier will lead to a 31-days commitment period, during which the SKU cannot be changed to a lower one. Please refer to official documentation for further information.
- Map<String>
- A mapping of tags to assign to the resource. - NOTE: If a - azure.operationalinsights.AnalyticsWorkspaceis connected to a- azure.loganalytics.Clustervia a- azure.loganalytics.LinkedServiceyou will not be able to modify the workspaces- skufield until the link between the workspace and the cluster has been broken by deleting the- azure.loganalytics.LinkedServiceresource. All other fields are modifiable while the workspace is linked to a cluster.
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.
- string
- The Primary shared key for the Log Analytics Workspace.
- 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.
- string
- The Primary shared key for the Log Analytics Workspace.
- 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.
- String
- The Primary shared key for the Log Analytics Workspace.
- 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.
- string
- The Primary shared key for the Log Analytics Workspace.
- 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.
- str
- The Primary shared key for the Log Analytics Workspace.
- 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.
- String
- The Primary shared key for the Log Analytics Workspace.
- 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,
        allow_resource_only_permissions: Optional[bool] = None,
        cmk_for_query_forced: Optional[bool] = None,
        daily_quota_gb: Optional[float] = None,
        data_collection_rule_id: Optional[str] = None,
        identity: Optional[AnalyticsWorkspaceIdentityArgs] = None,
        immediate_data_purge_on30_days_enabled: Optional[bool] = None,
        internet_ingestion_enabled: Optional[bool] = None,
        internet_query_enabled: Optional[bool] = None,
        local_authentication_disabled: Optional[bool] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        primary_shared_key: Optional[str] = None,
        reservation_capacity_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) -> AnalyticsWorkspacefunc 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.
- AllowResource boolOnly Permissions 
- Specifies if the log Analytics Workspace allow users accessing to data associated with resources they have permission to view, without permission to workspace. Defaults to true.
- CmkFor boolQuery Forced 
- Is Customer Managed Storage mandatory for query management?
- DailyQuota doubleGb 
- The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted. - NOTE: When - skuis set to- Freethis field should not be set and has a default value of- 0.5.
- DataCollection stringRule Id 
- The ID of the Data Collection Rule to use for this workspace.
- Identity
AnalyticsWorkspace Identity 
- An identityblock as defined below.
- ImmediateData boolPurge On30Days Enabled 
- Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
- InternetIngestion boolEnabled 
- Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to true.
- InternetQuery boolEnabled 
- Should the Log Analytics Workspace support querying over the Public Internet? Defaults to true.
- LocalAuthentication boolDisabled 
- Specifies if the log Analytics workspace should enforce authentication using Azure AD. Defaults to false.
- 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.
- string
- The Primary shared key for the Log Analytics Workspace.
- ReservationCapacity intIn Gb Per Day 
- The capacity reservation level in GB for this workspace. Possible values are - 100,- 200,- 300,- 400,- 500,- 1000,- 2000and- 5000.- NOTE: - reservation_capacity_in_gb_per_daycan only be used when the- skuis set to- CapacityReservation.
- ResourceGroup stringName 
- The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
- RetentionIn intDays 
- The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
- string
- The Secondary shared key for the Log Analytics Workspace.
- Sku string
- Specifies the SKU of the Log Analytics Workspace. Possible values are - PerNode,- Premium,- Standard,- Standalone,- Unlimited,- CapacityReservation, and- PerGB2018(new SKU as of- 2018-04-03). Defaults to- PerGB2018.- NOTE: A new pricing model took effect on - 2018-04-03, which requires the SKU- PerGB2018. If you're provisioned resources before this date you have the option of remaining with the previous Pricing SKU and using the other SKUs defined above. More information about the Pricing SKUs is available at the following URI.- NOTE: Changing - skuforces a new Log Analytics Workspace to be created, except when changing between- PerGB2018and- CapacityReservation. However, changing- skuto- CapacityReservationor changing- reservation_capacity_in_gb_per_dayto a higher tier will lead to a 31-days commitment period, during which the SKU cannot be changed to a lower one. Please refer to official documentation for further information.
- Dictionary<string, string>
- A mapping of tags to assign to the resource. - NOTE: If a - azure.operationalinsights.AnalyticsWorkspaceis connected to a- azure.loganalytics.Clustervia a- azure.loganalytics.LinkedServiceyou will not be able to modify the workspaces- skufield until the link between the workspace and the cluster has been broken by deleting the- azure.loganalytics.LinkedServiceresource. All other fields are modifiable while the workspace is linked to a cluster.
- WorkspaceId string
- The Workspace (or Customer) ID for the Log Analytics Workspace.
- AllowResource boolOnly Permissions 
- Specifies if the log Analytics Workspace allow users accessing to data associated with resources they have permission to view, without permission to workspace. Defaults to true.
- CmkFor boolQuery Forced 
- Is Customer Managed Storage mandatory for query management?
- DailyQuota float64Gb 
- The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted. - NOTE: When - skuis set to- Freethis field should not be set and has a default value of- 0.5.
- DataCollection stringRule Id 
- The ID of the Data Collection Rule to use for this workspace.
- Identity
AnalyticsWorkspace Identity Args 
- An identityblock as defined below.
- ImmediateData boolPurge On30Days Enabled 
- Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
- InternetIngestion boolEnabled 
- Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to true.
- InternetQuery boolEnabled 
- Should the Log Analytics Workspace support querying over the Public Internet? Defaults to true.
- LocalAuthentication boolDisabled 
- Specifies if the log Analytics workspace should enforce authentication using Azure AD. Defaults to false.
- 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.
- string
- The Primary shared key for the Log Analytics Workspace.
- ReservationCapacity intIn Gb Per Day 
- The capacity reservation level in GB for this workspace. Possible values are - 100,- 200,- 300,- 400,- 500,- 1000,- 2000and- 5000.- NOTE: - reservation_capacity_in_gb_per_daycan only be used when the- skuis set to- CapacityReservation.
- ResourceGroup stringName 
- The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
- RetentionIn intDays 
- The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
- string
- The Secondary shared key for the Log Analytics Workspace.
- Sku string
- Specifies the SKU of the Log Analytics Workspace. Possible values are - PerNode,- Premium,- Standard,- Standalone,- Unlimited,- CapacityReservation, and- PerGB2018(new SKU as of- 2018-04-03). Defaults to- PerGB2018.- NOTE: A new pricing model took effect on - 2018-04-03, which requires the SKU- PerGB2018. If you're provisioned resources before this date you have the option of remaining with the previous Pricing SKU and using the other SKUs defined above. More information about the Pricing SKUs is available at the following URI.- NOTE: Changing - skuforces a new Log Analytics Workspace to be created, except when changing between- PerGB2018and- CapacityReservation. However, changing- skuto- CapacityReservationor changing- reservation_capacity_in_gb_per_dayto a higher tier will lead to a 31-days commitment period, during which the SKU cannot be changed to a lower one. Please refer to official documentation for further information.
- map[string]string
- A mapping of tags to assign to the resource. - NOTE: If a - azure.operationalinsights.AnalyticsWorkspaceis connected to a- azure.loganalytics.Clustervia a- azure.loganalytics.LinkedServiceyou will not be able to modify the workspaces- skufield until the link between the workspace and the cluster has been broken by deleting the- azure.loganalytics.LinkedServiceresource. All other fields are modifiable while the workspace is linked to a cluster.
- WorkspaceId string
- The Workspace (or Customer) ID for the Log Analytics Workspace.
- allowResource BooleanOnly Permissions 
- Specifies if the log Analytics Workspace allow users accessing to data associated with resources they have permission to view, without permission to workspace. Defaults to true.
- cmkFor BooleanQuery Forced 
- Is Customer Managed Storage mandatory for query management?
- dailyQuota DoubleGb 
- The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted. - NOTE: When - skuis set to- Freethis field should not be set and has a default value of- 0.5.
- dataCollection StringRule Id 
- The ID of the Data Collection Rule to use for this workspace.
- identity
AnalyticsWorkspace Identity 
- An identityblock as defined below.
- immediateData BooleanPurge On30Days Enabled 
- Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
- internetIngestion BooleanEnabled 
- Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to true.
- internetQuery BooleanEnabled 
- Should the Log Analytics Workspace support querying over the Public Internet? Defaults to true.
- localAuthentication BooleanDisabled 
- Specifies if the log Analytics workspace should enforce authentication using Azure AD. Defaults to false.
- 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.
- String
- The Primary shared key for the Log Analytics Workspace.
- reservationCapacity IntegerIn Gb Per Day 
- The capacity reservation level in GB for this workspace. Possible values are - 100,- 200,- 300,- 400,- 500,- 1000,- 2000and- 5000.- NOTE: - reservation_capacity_in_gb_per_daycan only be used when the- skuis set to- CapacityReservation.
- resourceGroup StringName 
- The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
- retentionIn IntegerDays 
- The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
- String
- The Secondary shared key for the Log Analytics Workspace.
- sku String
- Specifies the SKU of the Log Analytics Workspace. Possible values are - PerNode,- Premium,- Standard,- Standalone,- Unlimited,- CapacityReservation, and- PerGB2018(new SKU as of- 2018-04-03). Defaults to- PerGB2018.- NOTE: A new pricing model took effect on - 2018-04-03, which requires the SKU- PerGB2018. If you're provisioned resources before this date you have the option of remaining with the previous Pricing SKU and using the other SKUs defined above. More information about the Pricing SKUs is available at the following URI.- NOTE: Changing - skuforces a new Log Analytics Workspace to be created, except when changing between- PerGB2018and- CapacityReservation. However, changing- skuto- CapacityReservationor changing- reservation_capacity_in_gb_per_dayto a higher tier will lead to a 31-days commitment period, during which the SKU cannot be changed to a lower one. Please refer to official documentation for further information.
- Map<String,String>
- A mapping of tags to assign to the resource. - NOTE: If a - azure.operationalinsights.AnalyticsWorkspaceis connected to a- azure.loganalytics.Clustervia a- azure.loganalytics.LinkedServiceyou will not be able to modify the workspaces- skufield until the link between the workspace and the cluster has been broken by deleting the- azure.loganalytics.LinkedServiceresource. All other fields are modifiable while the workspace is linked to a cluster.
- workspaceId String
- The Workspace (or Customer) ID for the Log Analytics Workspace.
- allowResource booleanOnly Permissions 
- Specifies if the log Analytics Workspace allow users accessing to data associated with resources they have permission to view, without permission to workspace. Defaults to true.
- cmkFor booleanQuery Forced 
- Is Customer Managed Storage mandatory for query management?
- dailyQuota numberGb 
- The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted. - NOTE: When - skuis set to- Freethis field should not be set and has a default value of- 0.5.
- dataCollection stringRule Id 
- The ID of the Data Collection Rule to use for this workspace.
- identity
AnalyticsWorkspace Identity 
- An identityblock as defined below.
- immediateData booleanPurge On30Days Enabled 
- Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
- internetIngestion booleanEnabled 
- Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to true.
- internetQuery booleanEnabled 
- Should the Log Analytics Workspace support querying over the Public Internet? Defaults to true.
- localAuthentication booleanDisabled 
- Specifies if the log Analytics workspace should enforce authentication using Azure AD. Defaults to false.
- 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.
- string
- The Primary shared key for the Log Analytics Workspace.
- reservationCapacity numberIn Gb Per Day 
- The capacity reservation level in GB for this workspace. Possible values are - 100,- 200,- 300,- 400,- 500,- 1000,- 2000and- 5000.- NOTE: - reservation_capacity_in_gb_per_daycan only be used when the- skuis set to- CapacityReservation.
- resourceGroup stringName 
- The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
- retentionIn numberDays 
- The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
- string
- The Secondary shared key for the Log Analytics Workspace.
- sku string
- Specifies the SKU of the Log Analytics Workspace. Possible values are - PerNode,- Premium,- Standard,- Standalone,- Unlimited,- CapacityReservation, and- PerGB2018(new SKU as of- 2018-04-03). Defaults to- PerGB2018.- NOTE: A new pricing model took effect on - 2018-04-03, which requires the SKU- PerGB2018. If you're provisioned resources before this date you have the option of remaining with the previous Pricing SKU and using the other SKUs defined above. More information about the Pricing SKUs is available at the following URI.- NOTE: Changing - skuforces a new Log Analytics Workspace to be created, except when changing between- PerGB2018and- CapacityReservation. However, changing- skuto- CapacityReservationor changing- reservation_capacity_in_gb_per_dayto a higher tier will lead to a 31-days commitment period, during which the SKU cannot be changed to a lower one. Please refer to official documentation for further information.
- {[key: string]: string}
- A mapping of tags to assign to the resource. - NOTE: If a - azure.operationalinsights.AnalyticsWorkspaceis connected to a- azure.loganalytics.Clustervia a- azure.loganalytics.LinkedServiceyou will not be able to modify the workspaces- skufield until the link between the workspace and the cluster has been broken by deleting the- azure.loganalytics.LinkedServiceresource. All other fields are modifiable while the workspace is linked to a cluster.
- workspaceId string
- The Workspace (or Customer) ID for the Log Analytics Workspace.
- allow_resource_ boolonly_ permissions 
- Specifies if the log Analytics Workspace allow users accessing to data associated with resources they have permission to view, without permission to workspace. Defaults to true.
- cmk_for_ boolquery_ forced 
- Is Customer Managed Storage mandatory for query management?
- daily_quota_ floatgb 
- The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted. - NOTE: When - skuis set to- Freethis field should not be set and has a default value of- 0.5.
- data_collection_ strrule_ id 
- The ID of the Data Collection Rule to use for this workspace.
- identity
AnalyticsWorkspace Identity Args 
- An identityblock as defined below.
- immediate_data_ boolpurge_ on30_ days_ enabled 
- Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
- internet_ingestion_ boolenabled 
- Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to true.
- internet_query_ boolenabled 
- Should the Log Analytics Workspace support querying over the Public Internet? Defaults to true.
- local_authentication_ booldisabled 
- Specifies if the log Analytics workspace should enforce authentication using Azure AD. Defaults to false.
- 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.
- str
- The Primary shared key for the Log Analytics Workspace.
- reservation_capacity_ intin_ gb_ per_ day 
- The capacity reservation level in GB for this workspace. Possible values are - 100,- 200,- 300,- 400,- 500,- 1000,- 2000and- 5000.- NOTE: - reservation_capacity_in_gb_per_daycan only be used when the- skuis set to- CapacityReservation.
- resource_group_ strname 
- 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_ intdays 
- The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
- str
- The Secondary shared key for the Log Analytics Workspace.
- sku str
- Specifies the SKU of the Log Analytics Workspace. Possible values are - PerNode,- Premium,- Standard,- Standalone,- Unlimited,- CapacityReservation, and- PerGB2018(new SKU as of- 2018-04-03). Defaults to- PerGB2018.- NOTE: A new pricing model took effect on - 2018-04-03, which requires the SKU- PerGB2018. If you're provisioned resources before this date you have the option of remaining with the previous Pricing SKU and using the other SKUs defined above. More information about the Pricing SKUs is available at the following URI.- NOTE: Changing - skuforces a new Log Analytics Workspace to be created, except when changing between- PerGB2018and- CapacityReservation. However, changing- skuto- CapacityReservationor changing- reservation_capacity_in_gb_per_dayto a higher tier will lead to a 31-days commitment period, during which the SKU cannot be changed to a lower one. Please refer to official documentation for further information.
- Mapping[str, str]
- A mapping of tags to assign to the resource. - NOTE: If a - azure.operationalinsights.AnalyticsWorkspaceis connected to a- azure.loganalytics.Clustervia a- azure.loganalytics.LinkedServiceyou will not be able to modify the workspaces- skufield until the link between the workspace and the cluster has been broken by deleting the- azure.loganalytics.LinkedServiceresource. All other fields are modifiable while the workspace is linked to a cluster.
- workspace_id str
- The Workspace (or Customer) ID for the Log Analytics Workspace.
- allowResource BooleanOnly Permissions 
- Specifies if the log Analytics Workspace allow users accessing to data associated with resources they have permission to view, without permission to workspace. Defaults to true.
- cmkFor BooleanQuery Forced 
- Is Customer Managed Storage mandatory for query management?
- dailyQuota NumberGb 
- The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted. - NOTE: When - skuis set to- Freethis field should not be set and has a default value of- 0.5.
- dataCollection StringRule Id 
- The ID of the Data Collection Rule to use for this workspace.
- identity Property Map
- An identityblock as defined below.
- immediateData BooleanPurge On30Days Enabled 
- Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
- internetIngestion BooleanEnabled 
- Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to true.
- internetQuery BooleanEnabled 
- Should the Log Analytics Workspace support querying over the Public Internet? Defaults to true.
- localAuthentication BooleanDisabled 
- Specifies if the log Analytics workspace should enforce authentication using Azure AD. Defaults to false.
- 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.
- String
- The Primary shared key for the Log Analytics Workspace.
- reservationCapacity NumberIn Gb Per Day 
- The capacity reservation level in GB for this workspace. Possible values are - 100,- 200,- 300,- 400,- 500,- 1000,- 2000and- 5000.- NOTE: - reservation_capacity_in_gb_per_daycan only be used when the- skuis set to- CapacityReservation.
- resourceGroup StringName 
- The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
- retentionIn NumberDays 
- The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
- String
- The Secondary shared key for the Log Analytics Workspace.
- sku String
- Specifies the SKU of the Log Analytics Workspace. Possible values are - PerNode,- Premium,- Standard,- Standalone,- Unlimited,- CapacityReservation, and- PerGB2018(new SKU as of- 2018-04-03). Defaults to- PerGB2018.- NOTE: A new pricing model took effect on - 2018-04-03, which requires the SKU- PerGB2018. If you're provisioned resources before this date you have the option of remaining with the previous Pricing SKU and using the other SKUs defined above. More information about the Pricing SKUs is available at the following URI.- NOTE: Changing - skuforces a new Log Analytics Workspace to be created, except when changing between- PerGB2018and- CapacityReservation. However, changing- skuto- CapacityReservationor changing- reservation_capacity_in_gb_per_dayto a higher tier will lead to a 31-days commitment period, during which the SKU cannot be changed to a lower one. Please refer to official documentation for further information.
- Map<String>
- A mapping of tags to assign to the resource. - NOTE: If a - azure.operationalinsights.AnalyticsWorkspaceis connected to a- azure.loganalytics.Clustervia a- azure.loganalytics.LinkedServiceyou will not be able to modify the workspaces- skufield until the link between the workspace and the cluster has been broken by deleting the- azure.loganalytics.LinkedServiceresource. All other fields are modifiable while the workspace is linked to a cluster.
- workspaceId String
- The Workspace (or Customer) ID for the Log Analytics Workspace.
Supporting Types
AnalyticsWorkspaceIdentity, AnalyticsWorkspaceIdentityArgs      
- Type string
- Specifies the identity type of the Log Analytics Workspace. Possible values are - SystemAssigned(where Azure will generate a Service Principal for you) and- UserAssignedwhere you can specify the Service Principal IDs in the- identity_idsfield.- NOTE: When - typeis set to- SystemAssigned, The assigned- principal_idand- tenant_idcan be retrieved after the Log Analytics Workspace has been created.
- IdentityIds List<string>
- Specifies a list of user managed identity ids to be assigned. Required if typeisUserAssigned.
- PrincipalId string
- TenantId string
- Type string
- Specifies the identity type of the Log Analytics Workspace. Possible values are - SystemAssigned(where Azure will generate a Service Principal for you) and- UserAssignedwhere you can specify the Service Principal IDs in the- identity_idsfield.- NOTE: When - typeis set to- SystemAssigned, The assigned- principal_idand- tenant_idcan be retrieved after the Log Analytics Workspace has been created.
- IdentityIds []string
- Specifies a list of user managed identity ids to be assigned. Required if typeisUserAssigned.
- PrincipalId string
- TenantId string
- type String
- Specifies the identity type of the Log Analytics Workspace. Possible values are - SystemAssigned(where Azure will generate a Service Principal for you) and- UserAssignedwhere you can specify the Service Principal IDs in the- identity_idsfield.- NOTE: When - typeis set to- SystemAssigned, The assigned- principal_idand- tenant_idcan be retrieved after the Log Analytics Workspace has been created.
- identityIds List<String>
- Specifies a list of user managed identity ids to be assigned. Required if typeisUserAssigned.
- principalId String
- tenantId String
- type string
- Specifies the identity type of the Log Analytics Workspace. Possible values are - SystemAssigned(where Azure will generate a Service Principal for you) and- UserAssignedwhere you can specify the Service Principal IDs in the- identity_idsfield.- NOTE: When - typeis set to- SystemAssigned, The assigned- principal_idand- tenant_idcan be retrieved after the Log Analytics Workspace has been created.
- identityIds string[]
- Specifies a list of user managed identity ids to be assigned. Required if typeisUserAssigned.
- principalId string
- tenantId string
- type str
- Specifies the identity type of the Log Analytics Workspace. Possible values are - SystemAssigned(where Azure will generate a Service Principal for you) and- UserAssignedwhere you can specify the Service Principal IDs in the- identity_idsfield.- NOTE: When - typeis set to- SystemAssigned, The assigned- principal_idand- tenant_idcan be retrieved after the Log Analytics Workspace has been created.
- identity_ids Sequence[str]
- Specifies a list of user managed identity ids to be assigned. Required if typeisUserAssigned.
- principal_id str
- tenant_id str
- type String
- Specifies the identity type of the Log Analytics Workspace. Possible values are - SystemAssigned(where Azure will generate a Service Principal for you) and- UserAssignedwhere you can specify the Service Principal IDs in the- identity_idsfield.- NOTE: When - typeis set to- SystemAssigned, The assigned- principal_idand- tenant_idcan be retrieved after the Log Analytics Workspace has been created.
- identityIds List<String>
- Specifies a list of user managed identity ids to be assigned. Required if typeisUserAssigned.
- principalId String
- tenantId String
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 azurermTerraform Provider.