All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.operationalinsights.kotlin.AnalyticsWorkspaceArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.operationalinsights.kotlin

import com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs.builder
import com.pulumi.azure.operationalinsights.kotlin.inputs.AnalyticsWorkspaceIdentityArgs
import com.pulumi.azure.operationalinsights.kotlin.inputs.AnalyticsWorkspaceIdentityArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Double
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Log Analytics (formally Operational Insights) Workspace.
 * ## Example Usage
 * 
 * ```typescript
 * 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,
 * });
 * ```
 * ```python
 * 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)
 * ```
 * ```csharp
 * 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,
 *     });
 * });
 * ```
 * ```go
 * 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 {
 * 		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
 * 	})
 * }
 * ```
 * ```java
 * 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());
 *     }
 * }
 * ```
 * ```yaml
 * 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
 * ```
 * 
 * ## Import
 * Log Analytics Workspaces can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:operationalinsights/analyticsWorkspace:AnalyticsWorkspace workspace1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1
 * ```
 * @property allowResourceOnlyPermissions 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`.
 * @property cmkForQueryForced Is Customer Managed Storage mandatory for query management?
 * @property dailyQuotaGb The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
 * > **NOTE:** When `sku` is set to `Free` this field should not be set and has a default value of `0.5`.
 * @property dataCollectionRuleId The ID of the Data Collection Rule to use for this workspace.
 * @property identity An `identity` block as defined below.
 * @property immediateDataPurgeOn30DaysEnabled Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
 * @property internetIngestionEnabled Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to `true`.
 * @property internetQueryEnabled Should the Log Analytics Workspace support querying over the Public Internet? Defaults to `true`.
 * @property localAuthenticationDisabled Specifies if the log Analytics workspace should enforce authentication using Azure AD. Defaults to `false`.
 * @property location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
 * @property name 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.
 * @property reservationCapacityInGbPerDay The capacity reservation level in GB for this workspace. Possible values are `100`, `200`, `300`, `400`, `500`, `1000`, `2000` and `5000`.
 * > **NOTE:** `reservation_capacity_in_gb_per_day` can only be used when the `sku` is set to `CapacityReservation`.
 * @property resourceGroupName The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
 * @property retentionInDays The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
 * @property sku 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](https://aka.ms/PricingTierWarning).
 * > **NOTE:** Changing `sku` forces a new Log Analytics Workspace to be created, except when changing between `PerGB2018` and `CapacityReservation`. However, changing `sku` to `CapacityReservation` or changing `reservation_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](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#commitment-tiers) for further information.
 * @property tags A mapping of tags to assign to the resource.
 * > **NOTE:** If a `azure.operationalinsights.AnalyticsWorkspace` is connected to a `azure.loganalytics.Cluster` via a `azure.loganalytics.LinkedService` you will not be able to modify the workspaces `sku` field until the link between the workspace and the cluster has been broken by deleting the `azure.loganalytics.LinkedService` resource. All other fields are modifiable while the workspace is linked to a cluster.
 */
public data class AnalyticsWorkspaceArgs(
    public val allowResourceOnlyPermissions: Output? = null,
    public val cmkForQueryForced: Output? = null,
    public val dailyQuotaGb: Output? = null,
    public val dataCollectionRuleId: Output? = null,
    public val identity: Output? = null,
    public val immediateDataPurgeOn30DaysEnabled: Output? = null,
    public val internetIngestionEnabled: Output? = null,
    public val internetQueryEnabled: Output? = null,
    public val localAuthenticationDisabled: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val reservationCapacityInGbPerDay: Output? = null,
    public val resourceGroupName: Output? = null,
    public val retentionInDays: Output? = null,
    public val sku: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs =
        com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs.builder()
            .allowResourceOnlyPermissions(allowResourceOnlyPermissions?.applyValue({ args0 -> args0 }))
            .cmkForQueryForced(cmkForQueryForced?.applyValue({ args0 -> args0 }))
            .dailyQuotaGb(dailyQuotaGb?.applyValue({ args0 -> args0 }))
            .dataCollectionRuleId(dataCollectionRuleId?.applyValue({ args0 -> args0 }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .immediateDataPurgeOn30DaysEnabled(
                immediateDataPurgeOn30DaysEnabled?.applyValue({ args0 ->
                    args0
                }),
            )
            .internetIngestionEnabled(internetIngestionEnabled?.applyValue({ args0 -> args0 }))
            .internetQueryEnabled(internetQueryEnabled?.applyValue({ args0 -> args0 }))
            .localAuthenticationDisabled(localAuthenticationDisabled?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .reservationCapacityInGbPerDay(reservationCapacityInGbPerDay?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .retentionInDays(retentionInDays?.applyValue({ args0 -> args0 }))
            .sku(sku?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [AnalyticsWorkspaceArgs].
 */
@PulumiTagMarker
public class AnalyticsWorkspaceArgsBuilder internal constructor() {
    private var allowResourceOnlyPermissions: Output? = null

    private var cmkForQueryForced: Output? = null

    private var dailyQuotaGb: Output? = null

    private var dataCollectionRuleId: Output? = null

    private var identity: Output? = null

    private var immediateDataPurgeOn30DaysEnabled: Output? = null

    private var internetIngestionEnabled: Output? = null

    private var internetQueryEnabled: Output? = null

    private var localAuthenticationDisabled: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var reservationCapacityInGbPerDay: Output? = null

    private var resourceGroupName: Output? = null

    private var retentionInDays: Output? = null

    private var sku: Output? = null

    private var tags: Output>? = null

    /**
     * @param value 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`.
     */
    @JvmName("ivchjbqsedsqaqeh")
    public suspend fun allowResourceOnlyPermissions(`value`: Output) {
        this.allowResourceOnlyPermissions = value
    }

    /**
     * @param value Is Customer Managed Storage mandatory for query management?
     */
    @JvmName("afgehdnnbccfnssj")
    public suspend fun cmkForQueryForced(`value`: Output) {
        this.cmkForQueryForced = value
    }

    /**
     * @param value The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
     * > **NOTE:** When `sku` is set to `Free` this field should not be set and has a default value of `0.5`.
     */
    @JvmName("iwrfsapcxjpkmpuo")
    public suspend fun dailyQuotaGb(`value`: Output) {
        this.dailyQuotaGb = value
    }

    /**
     * @param value The ID of the Data Collection Rule to use for this workspace.
     */
    @JvmName("jjrnmelhlerkqdyy")
    public suspend fun dataCollectionRuleId(`value`: Output) {
        this.dataCollectionRuleId = value
    }

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("dmextftatqbrvegw")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
     */
    @JvmName("qxalnlohbjfkuoso")
    public suspend fun immediateDataPurgeOn30DaysEnabled(`value`: Output) {
        this.immediateDataPurgeOn30DaysEnabled = value
    }

    /**
     * @param value Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to `true`.
     */
    @JvmName("pgitonjiyytoadrk")
    public suspend fun internetIngestionEnabled(`value`: Output) {
        this.internetIngestionEnabled = value
    }

    /**
     * @param value Should the Log Analytics Workspace support querying over the Public Internet? Defaults to `true`.
     */
    @JvmName("asgkvytiyccqlppu")
    public suspend fun internetQueryEnabled(`value`: Output) {
        this.internetQueryEnabled = value
    }

    /**
     * @param value Specifies if the log Analytics workspace should enforce authentication using Azure AD. Defaults to `false`.
     */
    @JvmName("wxslhpnanuqouhce")
    public suspend fun localAuthenticationDisabled(`value`: Output) {
        this.localAuthenticationDisabled = value
    }

    /**
     * @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    @JvmName("tuighskymbcrouqw")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value 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.
     */
    @JvmName("fcfawtwayfligita")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The capacity reservation level in GB for this workspace. Possible values are `100`, `200`, `300`, `400`, `500`, `1000`, `2000` and `5000`.
     * > **NOTE:** `reservation_capacity_in_gb_per_day` can only be used when the `sku` is set to `CapacityReservation`.
     */
    @JvmName("ktpdrddeyxthwnke")
    public suspend fun reservationCapacityInGbPerDay(`value`: Output) {
        this.reservationCapacityInGbPerDay = value
    }

    /**
     * @param value The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
     */
    @JvmName("aolwokuhsmyhiiny")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
     */
    @JvmName("ypyidmiovlklxves")
    public suspend fun retentionInDays(`value`: Output) {
        this.retentionInDays = value
    }

    /**
     * @param value 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](https://aka.ms/PricingTierWarning).
     * > **NOTE:** Changing `sku` forces a new Log Analytics Workspace to be created, except when changing between `PerGB2018` and `CapacityReservation`. However, changing `sku` to `CapacityReservation` or changing `reservation_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](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#commitment-tiers) for further information.
     */
    @JvmName("vxbduviqvnbvqwvn")
    public suspend fun sku(`value`: Output) {
        this.sku = value
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     * > **NOTE:** If a `azure.operationalinsights.AnalyticsWorkspace` is connected to a `azure.loganalytics.Cluster` via a `azure.loganalytics.LinkedService` you will not be able to modify the workspaces `sku` field until the link between the workspace and the cluster has been broken by deleting the `azure.loganalytics.LinkedService` resource. All other fields are modifiable while the workspace is linked to a cluster.
     */
    @JvmName("mgdtbcpnkiyqnbwm")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value 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`.
     */
    @JvmName("tcokauseowifgehk")
    public suspend fun allowResourceOnlyPermissions(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowResourceOnlyPermissions = mapped
    }

    /**
     * @param value Is Customer Managed Storage mandatory for query management?
     */
    @JvmName("lmflvtunxlqeskxk")
    public suspend fun cmkForQueryForced(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cmkForQueryForced = mapped
    }

    /**
     * @param value The workspace daily quota for ingestion in GB. Defaults to -1 (unlimited) if omitted.
     * > **NOTE:** When `sku` is set to `Free` this field should not be set and has a default value of `0.5`.
     */
    @JvmName("nravvdisrlhvcljk")
    public suspend fun dailyQuotaGb(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dailyQuotaGb = mapped
    }

    /**
     * @param value The ID of the Data Collection Rule to use for this workspace.
     */
    @JvmName("jpcanixvopheuqac")
    public suspend fun dataCollectionRuleId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataCollectionRuleId = mapped
    }

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("cygipydijuinmqjr")
    public suspend fun identity(`value`: AnalyticsWorkspaceIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument An `identity` block as defined below.
     */
    @JvmName("hqxlpvgyaeyqsjkj")
    public suspend fun identity(argument: suspend AnalyticsWorkspaceIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = AnalyticsWorkspaceIdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
     */
    @JvmName("gfbqoglcjqbgsbgi")
    public suspend fun immediateDataPurgeOn30DaysEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.immediateDataPurgeOn30DaysEnabled = mapped
    }

    /**
     * @param value Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to `true`.
     */
    @JvmName("gvwrelduexfmqsmy")
    public suspend fun internetIngestionEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.internetIngestionEnabled = mapped
    }

    /**
     * @param value Should the Log Analytics Workspace support querying over the Public Internet? Defaults to `true`.
     */
    @JvmName("xgkvfierybhgfbxn")
    public suspend fun internetQueryEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.internetQueryEnabled = mapped
    }

    /**
     * @param value Specifies if the log Analytics workspace should enforce authentication using Azure AD. Defaults to `false`.
     */
    @JvmName("kvhkberhpelpmgsw")
    public suspend fun localAuthenticationDisabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.localAuthenticationDisabled = mapped
    }

    /**
     * @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    @JvmName("lkrqhrkawmlfbeio")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("thlapykiqhqpysil")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The capacity reservation level in GB for this workspace. Possible values are `100`, `200`, `300`, `400`, `500`, `1000`, `2000` and `5000`.
     * > **NOTE:** `reservation_capacity_in_gb_per_day` can only be used when the `sku` is set to `CapacityReservation`.
     */
    @JvmName("ohkfhxytrqixriwk")
    public suspend fun reservationCapacityInGbPerDay(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.reservationCapacityInGbPerDay = mapped
    }

    /**
     * @param value The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
     */
    @JvmName("iqfcymxyqjyfxtjd")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
     */
    @JvmName("nsvmkgfqxpfamwhr")
    public suspend fun retentionInDays(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.retentionInDays = mapped
    }

    /**
     * @param value 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](https://aka.ms/PricingTierWarning).
     * > **NOTE:** Changing `sku` forces a new Log Analytics Workspace to be created, except when changing between `PerGB2018` and `CapacityReservation`. However, changing `sku` to `CapacityReservation` or changing `reservation_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](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#commitment-tiers) for further information.
     */
    @JvmName("lfspdfbuefmkuylo")
    public suspend fun sku(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sku = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     * > **NOTE:** If a `azure.operationalinsights.AnalyticsWorkspace` is connected to a `azure.loganalytics.Cluster` via a `azure.loganalytics.LinkedService` you will not be able to modify the workspaces `sku` field until the link between the workspace and the cluster has been broken by deleting the `azure.loganalytics.LinkedService` resource. All other fields are modifiable while the workspace is linked to a cluster.
     */
    @JvmName("warptvifldiqcrov")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags to assign to the resource.
     * > **NOTE:** If a `azure.operationalinsights.AnalyticsWorkspace` is connected to a `azure.loganalytics.Cluster` via a `azure.loganalytics.LinkedService` you will not be able to modify the workspaces `sku` field until the link between the workspace and the cluster has been broken by deleting the `azure.loganalytics.LinkedService` resource. All other fields are modifiable while the workspace is linked to a cluster.
     */
    @JvmName("badinbapvywupfnk")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): AnalyticsWorkspaceArgs = AnalyticsWorkspaceArgs(
        allowResourceOnlyPermissions = allowResourceOnlyPermissions,
        cmkForQueryForced = cmkForQueryForced,
        dailyQuotaGb = dailyQuotaGb,
        dataCollectionRuleId = dataCollectionRuleId,
        identity = identity,
        immediateDataPurgeOn30DaysEnabled = immediateDataPurgeOn30DaysEnabled,
        internetIngestionEnabled = internetIngestionEnabled,
        internetQueryEnabled = internetQueryEnabled,
        localAuthenticationDisabled = localAuthenticationDisabled,
        location = location,
        name = name,
        reservationCapacityInGbPerDay = reservationCapacityInGbPerDay,
        resourceGroupName = resourceGroupName,
        retentionInDays = retentionInDays,
        sku = sku,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy