WorkspaceArgs

data class WorkspaceArgs(val defaultDataCollectionRuleResourceId: Output<String>? = null, val features: Output<WorkspaceFeaturesArgs>? = null, val forceCmkForQuery: Output<Boolean>? = null, val identity: Output<IdentityArgs>? = null, val location: Output<String>? = null, val publicNetworkAccessForIngestion: Output<Either<String, PublicNetworkAccessType>>? = null, val publicNetworkAccessForQuery: Output<Either<String, PublicNetworkAccessType>>? = null, val resourceGroupName: Output<String>? = null, val retentionInDays: Output<Int>? = null, val sku: Output<WorkspaceSkuArgs>? = null, val tags: Output<Map<String, String>>? = null, val workspaceCapping: Output<WorkspaceCappingArgs>? = null, val workspaceName: Output<String>? = null) : ConvertibleToJava<WorkspaceArgs>

The top level Workspace resource container. Uses Azure REST API version 2023-09-01. In version 2.x of the Azure Native provider, it used API version 2022-10-01. Other available API versions: 2015-11-01-preview, 2020-03-01-preview, 2020-08-01, 2020-10-01, 2021-06-01, 2021-12-01-preview, 2022-10-01, 2025-02-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native operationalinsights [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

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}

Constructors

Link copied to clipboard
constructor(defaultDataCollectionRuleResourceId: Output<String>? = null, features: Output<WorkspaceFeaturesArgs>? = null, forceCmkForQuery: Output<Boolean>? = null, identity: Output<IdentityArgs>? = null, location: Output<String>? = null, publicNetworkAccessForIngestion: Output<Either<String, PublicNetworkAccessType>>? = null, publicNetworkAccessForQuery: Output<Either<String, PublicNetworkAccessType>>? = null, resourceGroupName: Output<String>? = null, retentionInDays: Output<Int>? = null, sku: Output<WorkspaceSkuArgs>? = null, tags: Output<Map<String, String>>? = null, workspaceCapping: Output<WorkspaceCappingArgs>? = null, workspaceName: Output<String>? = null)

Properties

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 features: Output<WorkspaceFeaturesArgs>? = null

Workspace features.

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

Indicates whether customer managed storage is mandatory for query management.

Link copied to clipboard
val identity: Output<IdentityArgs>? = null

The identity of the resource.

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

The geo-location where the resource lives

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 resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

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

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

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

The SKU of the workspace.

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

Resource tags.

Link copied to clipboard

The daily volume cap for ingestion.

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

The name of the workspace.

Functions

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