AnalyticsWorkspaceArgs

data class AnalyticsWorkspaceArgs(val allowResourceOnlyPermissions: Output<Boolean>? = null, val cmkForQueryForced: Output<Boolean>? = null, val dailyQuotaGb: Output<Double>? = null, val dataCollectionRuleId: Output<String>? = null, val identity: Output<AnalyticsWorkspaceIdentityArgs>? = null, val immediateDataPurgeOn30DaysEnabled: Output<Boolean>? = null, val internetIngestionEnabled: Output<Boolean>? = null, val internetQueryEnabled: Output<Boolean>? = null, val localAuthenticationDisabled: Output<Boolean>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val reservationCapacityInGbPerDay: Output<Int>? = null, val resourceGroupName: Output<String>? = null, val retentionInDays: Output<Int>? = null, val sku: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<AnalyticsWorkspaceArgs>

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: "example",
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="example",
location=example.location,
resource_group_name=example.name,
sku="PerGB2018",
retention_in_days=30)
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 = "example",
Location = example.Location,
ResourceGroupName = example.Name,
Sku = "PerGB2018",
RetentionInDays = 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("example"),
Location: example.Location,
ResourceGroupName: example.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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()
.name("example")
.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: example
location: ${example.location}
resourceGroupName: ${example.name}
sku: PerGB2018
retentionInDays: 30

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

Constructors

Link copied to clipboard
constructor(allowResourceOnlyPermissions: Output<Boolean>? = null, cmkForQueryForced: Output<Boolean>? = null, dailyQuotaGb: Output<Double>? = null, dataCollectionRuleId: Output<String>? = null, identity: Output<AnalyticsWorkspaceIdentityArgs>? = null, immediateDataPurgeOn30DaysEnabled: Output<Boolean>? = null, internetIngestionEnabled: Output<Boolean>? = null, internetQueryEnabled: Output<Boolean>? = null, localAuthenticationDisabled: Output<Boolean>? = null, location: Output<String>? = null, name: Output<String>? = null, reservationCapacityInGbPerDay: Output<Int>? = null, resourceGroupName: Output<String>? = null, retentionInDays: Output<Int>? = null, sku: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard

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.

Link copied to clipboard
val cmkForQueryForced: Output<Boolean>? = null

Is Customer Managed Storage mandatory for query management?

Link copied to clipboard
val dailyQuotaGb: Output<Double>? = null

The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.

Link copied to clipboard
val dataCollectionRuleId: Output<String>? = null

The ID of the Data Collection Rule to use for this workspace.

Link copied to clipboard

An identity block as defined below.

Link copied to clipboard

Whether to remove the data in the Log Analytics Workspace immediately after 30 days.

Link copied to clipboard
val internetIngestionEnabled: Output<Boolean>? = null

Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to true.

Link copied to clipboard
val internetQueryEnabled: Output<Boolean>? = null

Should the Log Analytics Workspace support querying over the Public Internet? Defaults to true.

Link copied to clipboard

Specifies if the log Analytics workspace should enforce authentication using Azure AD. Defaults to false.

Link copied to clipboard
val location: Output<String>? = null

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

Link copied to clipboard
val name: Output<String>? = null

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.

Link copied to clipboard
val reservationCapacityInGbPerDay: Output<Int>? = null

The capacity reservation level in GB for this workspace. Possible values are 100, 200, 300, 400, 500, 1000, 2000 and 5000.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

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

Link copied to clipboard
val retentionInDays: Output<Int>? = null

The workspace data retention in days. Possible values are between 30 and 730.

Link copied to clipboard
val sku: Output<String>? = null

Specifies the SKU of the Log Analytics Workspace. Possible values are PerNode, Premium, Standard, Standalone, Unlimited, CapacityReservation, PerGB2018, and LACluster. Defaults to PerGB2018.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags to assign to the resource.

Functions

Link copied to clipboard
open override fun toJava(): AnalyticsWorkspaceArgs