Workspace

class Workspace : KotlinCustomResource

The top level Workspace resource container. Uses Azure REST API version 2022-10-01. In version 1.x of the Azure Native provider, it used API version 2020-10-01. Other available API versions: 2015-11-01-preview, 2020-08-01, 2020-10-01, 2021-06-01, 2021-12-01-preview, 2023-09-01, 2025-02-01.

Example Usage

WorkspacesCreate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var workspace = new AzureNative.OperationalInsights.Workspace("workspace", new()
{
Location = "australiasoutheast",
ResourceGroupName = "oiautorest6685",
RetentionInDays = 30,
Sku = new AzureNative.OperationalInsights.Inputs.WorkspaceSkuArgs
{
Name = AzureNative.OperationalInsights.WorkspaceSkuNameEnum.PerGB2018,
},
Tags =
{
{ "tag1", "val1" },
},
WorkspaceName = "oiautorest6685",
});
});
package main
import (
operationalinsights "github.com/pulumi/pulumi-azure-native-sdk/operationalinsights/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := operationalinsights.NewWorkspace(ctx, "workspace", &operationalinsights.WorkspaceArgs{
Location: pulumi.String("australiasoutheast"),
ResourceGroupName: pulumi.String("oiautorest6685"),
RetentionInDays: pulumi.Int(30),
Sku: &operationalinsights.WorkspaceSkuArgs{
Name: pulumi.String(operationalinsights.WorkspaceSkuNameEnumPerGB2018),
},
Tags: pulumi.StringMap{
"tag1": pulumi.String("val1"),
},
WorkspaceName: pulumi.String("oiautorest6685"),
})
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.azurenative.operationalinsights.Workspace;
import com.pulumi.azurenative.operationalinsights.WorkspaceArgs;
import com.pulumi.azurenative.operationalinsights.inputs.WorkspaceSkuArgs;
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 workspace = new Workspace("workspace", WorkspaceArgs.builder()
.location("australiasoutheast")
.resourceGroupName("oiautorest6685")
.retentionInDays(30)
.sku(WorkspaceSkuArgs.builder()
.name("PerGB2018")
.build())
.tags(Map.of("tag1", "val1"))
.workspaceName("oiautorest6685")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:operationalinsights:Workspace AzTest2170 /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}

Properties

Link copied to clipboard
val createdDate: Output<String>

Workspace creation date.

Link copied to clipboard
val customerId: Output<String>

This is a read-only property. Represents the ID associated with the workspace.

Link copied to clipboard

The resource ID of the default Data Collection Rule to use for this workspace. Expected format is - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dcrName}.

Link copied to clipboard
val etag: Output<String>?

The etag of the workspace.

Link copied to clipboard

Workspace features.

Link copied to clipboard

Indicates whether customer managed storage is mandatory for query management.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The identity of the resource.

Link copied to clipboard
val location: Output<String>

The geo-location where the resource lives

Link copied to clipboard
val modifiedDate: Output<String>

Workspace modification date.

Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard

List of linked private link scope resources.

Link copied to clipboard

The provisioning state of the workspace.

Link copied to clipboard

The network access type for accessing Log Analytics ingestion.

Link copied to clipboard

The network access type for accessing Log Analytics query.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val retentionInDays: Output<Int>?

The workspace data retention in days. Allowed values are per pricing plan. See pricing tiers documentation for details.

Link copied to clipboard

The SKU of the workspace.

Link copied to clipboard

Metadata pertaining to creation and last modification of the resource.

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

Resource tags.

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

The daily volume cap for ingestion.