We recommend using Azure Native.
azure.operationalinsights.AnalyticsWorkspace
Explore with Pulumi AI
Manages a Log Analytics (formally Operational Insights) Workspace.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
{
Location = "West Europe",
});
var exampleAnalyticsWorkspace = new Azure.OperationalInsights.AnalyticsWorkspace("exampleAnalyticsWorkspace", new()
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
Sku = "PerGB2018",
RetentionInDays = 30,
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/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
})
}
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku("PerGB2018")
.retentionInDays(30)
.build());
}
}
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)
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,
});
resources:
exampleResourceGroup:
type: azure:core:ResourceGroup
properties:
location: West Europe
exampleAnalyticsWorkspace:
type: azure:operationalinsights:AnalyticsWorkspace
properties:
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
sku: PerGB2018
retentionInDays: 30
Create AnalyticsWorkspace Resource
new AnalyticsWorkspace(name: string, args: AnalyticsWorkspaceArgs, opts?: CustomResourceOptions);
@overload
def AnalyticsWorkspace(resource_name: 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,
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,
reservation_capacity_in_gb_per_day: Optional[int] = None,
resource_group_name: Optional[str] = None,
retention_in_days: Optional[int] = None,
sku: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
@overload
def AnalyticsWorkspace(resource_name: str,
args: AnalyticsWorkspaceArgs,
opts: Optional[ResourceOptions] = 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.
- 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.
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
The AnalyticsWorkspace resource accepts the following input properties:
- Resource
Group stringName 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 doubleGb The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
NOTE: When
sku
is set toFree
this field should not be set and has a default value of0.5
.- 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 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.
- Reservation
Capacity intIn Gb Per Day The capacity reservation level in GB for this workspace. Possible values are
100
,200
,300
,400
,500
,1000
,2000
and5000
.NOTE:
reservation_capacity_in_gb_per_day
can only be used when thesku
is set toCapacityReservation
.- Retention
In 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
Free
,PerNode
,Premium
,Standard
,Standalone
,Unlimited
,CapacityReservation
, andPerGB2018
(new SKU as of2018-04-03
). Defaults toPerGB2018
.NOTE: A new pricing model took effect on
2018-04-03
, which requires the SKUPerGB2018
. 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
sku
forces a new Log Analytics Workspace to be created, except when changing betweenPerGB2018
andCapacityReservation
. However, changingsku
toCapacityReservation
or changingreservation_capacity_in_gb_per_day
to 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.NOTE: The
Free
SKU has a defaultdaily_quota_gb
value of0.5
(GB).- Dictionary<string, string>
A mapping of tags to assign to the resource.
NOTE: If a
azure.operationalinsights.AnalyticsWorkspace
is connected to aazure.loganalytics.Cluster
via aazure.loganalytics.LinkedService
you will not be able to modify the workspacessku
field until the link between the workspace and the cluster has been broken by deleting theazure.loganalytics.LinkedService
resource. All other fields are modifiable while the workspace is linked to a cluster.
- Resource
Group stringName 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 float64Gb The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
NOTE: When
sku
is set toFree
this field should not be set and has a default value of0.5
.- 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 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.
- Reservation
Capacity intIn Gb Per Day The capacity reservation level in GB for this workspace. Possible values are
100
,200
,300
,400
,500
,1000
,2000
and5000
.NOTE:
reservation_capacity_in_gb_per_day
can only be used when thesku
is set toCapacityReservation
.- Retention
In 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
Free
,PerNode
,Premium
,Standard
,Standalone
,Unlimited
,CapacityReservation
, andPerGB2018
(new SKU as of2018-04-03
). Defaults toPerGB2018
.NOTE: A new pricing model took effect on
2018-04-03
, which requires the SKUPerGB2018
. 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
sku
forces a new Log Analytics Workspace to be created, except when changing betweenPerGB2018
andCapacityReservation
. However, changingsku
toCapacityReservation
or changingreservation_capacity_in_gb_per_day
to 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.NOTE: The
Free
SKU has a defaultdaily_quota_gb
value of0.5
(GB).- map[string]string
A mapping of tags to assign to the resource.
NOTE: If a
azure.operationalinsights.AnalyticsWorkspace
is connected to aazure.loganalytics.Cluster
via aazure.loganalytics.LinkedService
you will not be able to modify the workspacessku
field until the link between the workspace and the cluster has been broken by deleting theazure.loganalytics.LinkedService
resource. All other fields are modifiable while the workspace is linked to a cluster.
- resource
Group StringName 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 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
.- cmk
For BooleanQuery Forced Is Customer Managed Storage mandatory for query management?
- daily
Quota DoubleGb The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
NOTE: When
sku
is set toFree
this field should not be set and has a default value of0.5
.- internet
Ingestion BooleanEnabled Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to
true
.- internet
Query BooleanEnabled Should the Log Analytics Workspace support querying over the Public Internet? Defaults to
true
.- local
Authentication 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.
- reservation
Capacity IntegerIn Gb Per Day The capacity reservation level in GB for this workspace. Possible values are
100
,200
,300
,400
,500
,1000
,2000
and5000
.NOTE:
reservation_capacity_in_gb_per_day
can only be used when thesku
is set toCapacityReservation
.- retention
In 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
Free
,PerNode
,Premium
,Standard
,Standalone
,Unlimited
,CapacityReservation
, andPerGB2018
(new SKU as of2018-04-03
). Defaults toPerGB2018
.NOTE: A new pricing model took effect on
2018-04-03
, which requires the SKUPerGB2018
. 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
sku
forces a new Log Analytics Workspace to be created, except when changing betweenPerGB2018
andCapacityReservation
. However, changingsku
toCapacityReservation
or changingreservation_capacity_in_gb_per_day
to 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.NOTE: The
Free
SKU has a defaultdaily_quota_gb
value of0.5
(GB).- Map<String,String>
A mapping of tags to assign to the resource.
NOTE: If a
azure.operationalinsights.AnalyticsWorkspace
is connected to aazure.loganalytics.Cluster
via aazure.loganalytics.LinkedService
you will not be able to modify the workspacessku
field until the link between the workspace and the cluster has been broken by deleting theazure.loganalytics.LinkedService
resource. All other fields are modifiable while the workspace is linked to a cluster.
- resource
Group stringName 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 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
.- cmk
For booleanQuery Forced Is Customer Managed Storage mandatory for query management?
- daily
Quota numberGb The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
NOTE: When
sku
is set toFree
this field should not be set and has a default value of0.5
.- internet
Ingestion booleanEnabled Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to
true
.- internet
Query booleanEnabled Should the Log Analytics Workspace support querying over the Public Internet? Defaults to
true
.- local
Authentication 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.
- reservation
Capacity numberIn Gb Per Day The capacity reservation level in GB for this workspace. Possible values are
100
,200
,300
,400
,500
,1000
,2000
and5000
.NOTE:
reservation_capacity_in_gb_per_day
can only be used when thesku
is set toCapacityReservation
.- retention
In 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
Free
,PerNode
,Premium
,Standard
,Standalone
,Unlimited
,CapacityReservation
, andPerGB2018
(new SKU as of2018-04-03
). Defaults toPerGB2018
.NOTE: A new pricing model took effect on
2018-04-03
, which requires the SKUPerGB2018
. 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
sku
forces a new Log Analytics Workspace to be created, except when changing betweenPerGB2018
andCapacityReservation
. However, changingsku
toCapacityReservation
or changingreservation_capacity_in_gb_per_day
to 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.NOTE: The
Free
SKU has a defaultdaily_quota_gb
value of0.5
(GB).- {[key: string]: string}
A mapping of tags to assign to the resource.
NOTE: If a
azure.operationalinsights.AnalyticsWorkspace
is connected to aazure.loganalytics.Cluster
via aazure.loganalytics.LinkedService
you will not be able to modify the workspacessku
field until the link between the workspace and the cluster has been broken by deleting theazure.loganalytics.LinkedService
resource. 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
sku
is set toFree
this field should not be set and has a default value of0.5
.- 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
,2000
and5000
.NOTE:
reservation_capacity_in_gb_per_day
can only be used when thesku
is set toCapacityReservation
.- 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
Free
,PerNode
,Premium
,Standard
,Standalone
,Unlimited
,CapacityReservation
, andPerGB2018
(new SKU as of2018-04-03
). Defaults toPerGB2018
.NOTE: A new pricing model took effect on
2018-04-03
, which requires the SKUPerGB2018
. 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
sku
forces a new Log Analytics Workspace to be created, except when changing betweenPerGB2018
andCapacityReservation
. However, changingsku
toCapacityReservation
or changingreservation_capacity_in_gb_per_day
to 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.NOTE: The
Free
SKU has a defaultdaily_quota_gb
value of0.5
(GB).- Mapping[str, str]
A mapping of tags to assign to the resource.
NOTE: If a
azure.operationalinsights.AnalyticsWorkspace
is connected to aazure.loganalytics.Cluster
via aazure.loganalytics.LinkedService
you will not be able to modify the workspacessku
field until the link between the workspace and the cluster has been broken by deleting theazure.loganalytics.LinkedService
resource. All other fields are modifiable while the workspace is linked to a cluster.
- resource
Group StringName 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 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
.- cmk
For BooleanQuery Forced Is Customer Managed Storage mandatory for query management?
- daily
Quota NumberGb The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
NOTE: When
sku
is set toFree
this field should not be set and has a default value of0.5
.- internet
Ingestion BooleanEnabled Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to
true
.- internet
Query BooleanEnabled Should the Log Analytics Workspace support querying over the Public Internet? Defaults to
true
.- local
Authentication 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.
- reservation
Capacity NumberIn Gb Per Day The capacity reservation level in GB for this workspace. Possible values are
100
,200
,300
,400
,500
,1000
,2000
and5000
.NOTE:
reservation_capacity_in_gb_per_day
can only be used when thesku
is set toCapacityReservation
.- retention
In 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
Free
,PerNode
,Premium
,Standard
,Standalone
,Unlimited
,CapacityReservation
, andPerGB2018
(new SKU as of2018-04-03
). Defaults toPerGB2018
.NOTE: A new pricing model took effect on
2018-04-03
, which requires the SKUPerGB2018
. 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
sku
forces a new Log Analytics Workspace to be created, except when changing betweenPerGB2018
andCapacityReservation
. However, changingsku
toCapacityReservation
or changingreservation_capacity_in_gb_per_day
to 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.NOTE: The
Free
SKU has a defaultdaily_quota_gb
value of0.5
(GB).- Map<String>
A mapping of tags to assign to the resource.
NOTE: If a
azure.operationalinsights.AnalyticsWorkspace
is connected to aazure.loganalytics.Cluster
via aazure.loganalytics.LinkedService
you will not be able to modify the workspacessku
field until the link between the workspace and the cluster has been broken by deleting theazure.loganalytics.LinkedService
resource. 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.
- Workspace
Id 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.
- Workspace
Id 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.
- workspace
Id 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.
- workspace
Id 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.
- workspace
Id 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,
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) -> 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)
Resource lookup is not supported in YAML
- 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.
- 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 doubleGb The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
NOTE: When
sku
is set toFree
this field should not be set and has a default value of0.5
.- 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 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.
- Reservation
Capacity intIn Gb Per Day The capacity reservation level in GB for this workspace. Possible values are
100
,200
,300
,400
,500
,1000
,2000
and5000
.NOTE:
reservation_capacity_in_gb_per_day
can only be used when thesku
is set toCapacityReservation
.- Resource
Group stringName 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.
- 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
, andPerGB2018
(new SKU as of2018-04-03
). Defaults toPerGB2018
.NOTE: A new pricing model took effect on
2018-04-03
, which requires the SKUPerGB2018
. 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
sku
forces a new Log Analytics Workspace to be created, except when changing betweenPerGB2018
andCapacityReservation
. However, changingsku
toCapacityReservation
or changingreservation_capacity_in_gb_per_day
to 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.NOTE: The
Free
SKU has a defaultdaily_quota_gb
value of0.5
(GB).- Dictionary<string, string>
A mapping of tags to assign to the resource.
NOTE: If a
azure.operationalinsights.AnalyticsWorkspace
is connected to aazure.loganalytics.Cluster
via aazure.loganalytics.LinkedService
you will not be able to modify the workspacessku
field until the link between the workspace and the cluster has been broken by deleting theazure.loganalytics.LinkedService
resource. All other fields are modifiable while the workspace is linked to a cluster.- Workspace
Id 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 float64Gb The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
NOTE: When
sku
is set toFree
this field should not be set and has a default value of0.5
.- 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 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.
- Reservation
Capacity intIn Gb Per Day The capacity reservation level in GB for this workspace. Possible values are
100
,200
,300
,400
,500
,1000
,2000
and5000
.NOTE:
reservation_capacity_in_gb_per_day
can only be used when thesku
is set toCapacityReservation
.- Resource
Group stringName 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.
- 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
, andPerGB2018
(new SKU as of2018-04-03
). Defaults toPerGB2018
.NOTE: A new pricing model took effect on
2018-04-03
, which requires the SKUPerGB2018
. 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
sku
forces a new Log Analytics Workspace to be created, except when changing betweenPerGB2018
andCapacityReservation
. However, changingsku
toCapacityReservation
or changingreservation_capacity_in_gb_per_day
to 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.NOTE: The
Free
SKU has a defaultdaily_quota_gb
value of0.5
(GB).- map[string]string
A mapping of tags to assign to the resource.
NOTE: If a
azure.operationalinsights.AnalyticsWorkspace
is connected to aazure.loganalytics.Cluster
via aazure.loganalytics.LinkedService
you will not be able to modify the workspacessku
field until the link between the workspace and the cluster has been broken by deleting theazure.loganalytics.LinkedService
resource. All other fields are modifiable while the workspace is linked to a cluster.- Workspace
Id string The Workspace (or Customer) ID for the Log Analytics Workspace.
- allow
Resource 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
.- cmk
For BooleanQuery Forced Is Customer Managed Storage mandatory for query management?
- daily
Quota DoubleGb The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
NOTE: When
sku
is set toFree
this field should not be set and has a default value of0.5
.- internet
Ingestion BooleanEnabled Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to
true
.- internet
Query BooleanEnabled Should the Log Analytics Workspace support querying over the Public Internet? Defaults to
true
.- local
Authentication 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.
- reservation
Capacity IntegerIn Gb Per Day The capacity reservation level in GB for this workspace. Possible values are
100
,200
,300
,400
,500
,1000
,2000
and5000
.NOTE:
reservation_capacity_in_gb_per_day
can only be used when thesku
is set toCapacityReservation
.- resource
Group StringName 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 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
Free
,PerNode
,Premium
,Standard
,Standalone
,Unlimited
,CapacityReservation
, andPerGB2018
(new SKU as of2018-04-03
). Defaults toPerGB2018
.NOTE: A new pricing model took effect on
2018-04-03
, which requires the SKUPerGB2018
. 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
sku
forces a new Log Analytics Workspace to be created, except when changing betweenPerGB2018
andCapacityReservation
. However, changingsku
toCapacityReservation
or changingreservation_capacity_in_gb_per_day
to 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.NOTE: The
Free
SKU has a defaultdaily_quota_gb
value of0.5
(GB).- Map<String,String>
A mapping of tags to assign to the resource.
NOTE: If a
azure.operationalinsights.AnalyticsWorkspace
is connected to aazure.loganalytics.Cluster
via aazure.loganalytics.LinkedService
you will not be able to modify the workspacessku
field until the link between the workspace and the cluster has been broken by deleting theazure.loganalytics.LinkedService
resource. All other fields are modifiable while the workspace is linked to a cluster.- workspace
Id String The Workspace (or Customer) ID for the Log Analytics Workspace.
- allow
Resource 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
.- cmk
For booleanQuery Forced Is Customer Managed Storage mandatory for query management?
- daily
Quota numberGb The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
NOTE: When
sku
is set toFree
this field should not be set and has a default value of0.5
.- internet
Ingestion booleanEnabled Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to
true
.- internet
Query booleanEnabled Should the Log Analytics Workspace support querying over the Public Internet? Defaults to
true
.- local
Authentication 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.
- reservation
Capacity numberIn Gb Per Day The capacity reservation level in GB for this workspace. Possible values are
100
,200
,300
,400
,500
,1000
,2000
and5000
.NOTE:
reservation_capacity_in_gb_per_day
can only be used when thesku
is set toCapacityReservation
.- resource
Group stringName 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 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
Free
,PerNode
,Premium
,Standard
,Standalone
,Unlimited
,CapacityReservation
, andPerGB2018
(new SKU as of2018-04-03
). Defaults toPerGB2018
.NOTE: A new pricing model took effect on
2018-04-03
, which requires the SKUPerGB2018
. 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
sku
forces a new Log Analytics Workspace to be created, except when changing betweenPerGB2018
andCapacityReservation
. However, changingsku
toCapacityReservation
or changingreservation_capacity_in_gb_per_day
to 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.NOTE: The
Free
SKU has a defaultdaily_quota_gb
value of0.5
(GB).- {[key: string]: string}
A mapping of tags to assign to the resource.
NOTE: If a
azure.operationalinsights.AnalyticsWorkspace
is connected to aazure.loganalytics.Cluster
via aazure.loganalytics.LinkedService
you will not be able to modify the workspacessku
field until the link between the workspace and the cluster has been broken by deleting theazure.loganalytics.LinkedService
resource. All other fields are modifiable while the workspace is linked to a cluster.- workspace
Id 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
sku
is set toFree
this field should not be set and has a default value of0.5
.- 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
,2000
and5000
.NOTE:
reservation_capacity_in_gb_per_day
can only be used when thesku
is set toCapacityReservation
.- 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
Free
,PerNode
,Premium
,Standard
,Standalone
,Unlimited
,CapacityReservation
, andPerGB2018
(new SKU as of2018-04-03
). Defaults toPerGB2018
.NOTE: A new pricing model took effect on
2018-04-03
, which requires the SKUPerGB2018
. 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
sku
forces a new Log Analytics Workspace to be created, except when changing betweenPerGB2018
andCapacityReservation
. However, changingsku
toCapacityReservation
or changingreservation_capacity_in_gb_per_day
to 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.NOTE: The
Free
SKU has a defaultdaily_quota_gb
value of0.5
(GB).- Mapping[str, str]
A mapping of tags to assign to the resource.
NOTE: If a
azure.operationalinsights.AnalyticsWorkspace
is connected to aazure.loganalytics.Cluster
via aazure.loganalytics.LinkedService
you will not be able to modify the workspacessku
field until the link between the workspace and the cluster has been broken by deleting theazure.loganalytics.LinkedService
resource. 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.
- allow
Resource 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
.- cmk
For BooleanQuery Forced Is Customer Managed Storage mandatory for query management?
- daily
Quota NumberGb The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
NOTE: When
sku
is set toFree
this field should not be set and has a default value of0.5
.- internet
Ingestion BooleanEnabled Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to
true
.- internet
Query BooleanEnabled Should the Log Analytics Workspace support querying over the Public Internet? Defaults to
true
.- local
Authentication 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.
- reservation
Capacity NumberIn Gb Per Day The capacity reservation level in GB for this workspace. Possible values are
100
,200
,300
,400
,500
,1000
,2000
and5000
.NOTE:
reservation_capacity_in_gb_per_day
can only be used when thesku
is set toCapacityReservation
.- resource
Group StringName 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 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
Free
,PerNode
,Premium
,Standard
,Standalone
,Unlimited
,CapacityReservation
, andPerGB2018
(new SKU as of2018-04-03
). Defaults toPerGB2018
.NOTE: A new pricing model took effect on
2018-04-03
, which requires the SKUPerGB2018
. 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
sku
forces a new Log Analytics Workspace to be created, except when changing betweenPerGB2018
andCapacityReservation
. However, changingsku
toCapacityReservation
or changingreservation_capacity_in_gb_per_day
to 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.NOTE: The
Free
SKU has a defaultdaily_quota_gb
value of0.5
(GB).- Map<String>
A mapping of tags to assign to the resource.
NOTE: If a
azure.operationalinsights.AnalyticsWorkspace
is connected to aazure.loganalytics.Cluster
via aazure.loganalytics.LinkedService
you will not be able to modify the workspacessku
field until the link between the workspace and the cluster has been broken by deleting theazure.loganalytics.LinkedService
resource. All other fields are modifiable while the workspace is linked to a cluster.- workspace
Id 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
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.