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

com.pulumi.azurenative.operationalinsights.kotlin.WorkspaceArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.operationalinsights.kotlin

import com.pulumi.azurenative.operationalinsights.WorkspaceArgs.builder
import com.pulumi.azurenative.operationalinsights.kotlin.enums.PublicNetworkAccessType
import com.pulumi.azurenative.operationalinsights.kotlin.inputs.IdentityArgs
import com.pulumi.azurenative.operationalinsights.kotlin.inputs.IdentityArgsBuilder
import com.pulumi.azurenative.operationalinsights.kotlin.inputs.WorkspaceCappingArgs
import com.pulumi.azurenative.operationalinsights.kotlin.inputs.WorkspaceCappingArgsBuilder
import com.pulumi.azurenative.operationalinsights.kotlin.inputs.WorkspaceFeaturesArgs
import com.pulumi.azurenative.operationalinsights.kotlin.inputs.WorkspaceFeaturesArgsBuilder
import com.pulumi.azurenative.operationalinsights.kotlin.inputs.WorkspaceSkuArgs
import com.pulumi.azurenative.operationalinsights.kotlin.inputs.WorkspaceSkuArgsBuilder
import com.pulumi.core.Either
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.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * The top level Workspace resource container.
 * Azure REST API version: 2022-10-01. Prior API version in Azure Native 1.x: 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.
 * ## Example Usage
 * ### WorkspacesCreate
 * ```csharp
 * 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",
 *     });
 * });
 * ```
 * ```go
 * 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
 * 	})
 * }
 * ```
 * ```java
 * 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.
 * ```sh
 * $ pulumi import azure-native:operationalinsights:Workspace AzTest2170 /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}
 * ```
 * @property defaultDataCollectionRuleResourceId 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}.
 * @property features Workspace features.
 * @property forceCmkForQuery Indicates whether customer managed storage is mandatory for query management.
 * @property identity The identity of the resource.
 * @property location The geo-location where the resource lives
 * @property publicNetworkAccessForIngestion The network access type for accessing Log Analytics ingestion.
 * @property publicNetworkAccessForQuery The network access type for accessing Log Analytics query.
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property retentionInDays The workspace data retention in days. Allowed values are per pricing plan. See pricing tiers documentation for details.
 * @property sku The SKU of the workspace.
 * @property tags Resource tags.
 * @property workspaceCapping The daily volume cap for ingestion.
 * @property workspaceName The name of the workspace.
 */
public data class WorkspaceArgs(
    public val defaultDataCollectionRuleResourceId: Output? = null,
    public val features: Output? = null,
    public val forceCmkForQuery: Output? = null,
    public val identity: Output? = null,
    public val location: Output? = null,
    public val publicNetworkAccessForIngestion: Output>? =
        null,
    public val publicNetworkAccessForQuery: Output>? = null,
    public val resourceGroupName: Output? = null,
    public val retentionInDays: Output? = null,
    public val sku: Output? = null,
    public val tags: Output>? = null,
    public val workspaceCapping: Output? = null,
    public val workspaceName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.operationalinsights.WorkspaceArgs =
        com.pulumi.azurenative.operationalinsights.WorkspaceArgs.builder()
            .defaultDataCollectionRuleResourceId(
                defaultDataCollectionRuleResourceId?.applyValue({ args0 ->
                    args0
                }),
            )
            .features(features?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .forceCmkForQuery(forceCmkForQuery?.applyValue({ args0 -> args0 }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .publicNetworkAccessForIngestion(
                publicNetworkAccessForIngestion?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .publicNetworkAccessForQuery(
                publicNetworkAccessForQuery?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .retentionInDays(retentionInDays?.applyValue({ args0 -> args0 }))
            .sku(sku?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .workspaceCapping(workspaceCapping?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .workspaceName(workspaceName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [WorkspaceArgs].
 */
@PulumiTagMarker
public class WorkspaceArgsBuilder internal constructor() {
    private var defaultDataCollectionRuleResourceId: Output? = null

    private var features: Output? = null

    private var forceCmkForQuery: Output? = null

    private var identity: Output? = null

    private var location: Output? = null

    private var publicNetworkAccessForIngestion: Output>? =
        null

    private var publicNetworkAccessForQuery: Output>? = null

    private var resourceGroupName: Output? = null

    private var retentionInDays: Output? = null

    private var sku: Output? = null

    private var tags: Output>? = null

    private var workspaceCapping: Output? = null

    private var workspaceName: Output? = null

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

    /**
     * @param value Workspace features.
     */
    @JvmName("vxfcgxcnrhyeqnhh")
    public suspend fun features(`value`: Output) {
        this.features = value
    }

    /**
     * @param value Indicates whether customer managed storage is mandatory for query management.
     */
    @JvmName("ffvevkxapogmxkix")
    public suspend fun forceCmkForQuery(`value`: Output) {
        this.forceCmkForQuery = value
    }

    /**
     * @param value The identity of the resource.
     */
    @JvmName("dioygeerdjrbkfhj")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value The geo-location where the resource lives
     */
    @JvmName("glfiddexqvrdpuwj")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The network access type for accessing Log Analytics ingestion.
     */
    @JvmName("ushuurebtgpdtbpo")
    public suspend fun publicNetworkAccessForIngestion(`value`: Output>) {
        this.publicNetworkAccessForIngestion = value
    }

    /**
     * @param value The network access type for accessing Log Analytics query.
     */
    @JvmName("pqpcqwllxyhedynb")
    public suspend fun publicNetworkAccessForQuery(`value`: Output>) {
        this.publicNetworkAccessForQuery = value
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("afbweesfwwlsxtyk")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The workspace data retention in days. Allowed values are per pricing plan. See pricing tiers documentation for details.
     */
    @JvmName("bmpwlxgivlcdjvky")
    public suspend fun retentionInDays(`value`: Output) {
        this.retentionInDays = value
    }

    /**
     * @param value The SKU of the workspace.
     */
    @JvmName("xdqymtmdaolwitkl")
    public suspend fun sku(`value`: Output) {
        this.sku = value
    }

    /**
     * @param value Resource tags.
     */
    @JvmName("aovlpcfocuhscntx")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The daily volume cap for ingestion.
     */
    @JvmName("tfkmqkbdahprutof")
    public suspend fun workspaceCapping(`value`: Output) {
        this.workspaceCapping = value
    }

    /**
     * @param value The name of the workspace.
     */
    @JvmName("ndkvnaootluhqbue")
    public suspend fun workspaceName(`value`: Output) {
        this.workspaceName = value
    }

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

    /**
     * @param value Workspace features.
     */
    @JvmName("imekooqciioaftct")
    public suspend fun features(`value`: WorkspaceFeaturesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.features = mapped
    }

    /**
     * @param argument Workspace features.
     */
    @JvmName("ljtxvtllbsyetvmx")
    public suspend fun features(argument: suspend WorkspaceFeaturesArgsBuilder.() -> Unit) {
        val toBeMapped = WorkspaceFeaturesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.features = mapped
    }

    /**
     * @param value Indicates whether customer managed storage is mandatory for query management.
     */
    @JvmName("ygfmamrdjpmivpft")
    public suspend fun forceCmkForQuery(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.forceCmkForQuery = mapped
    }

    /**
     * @param value The identity of the resource.
     */
    @JvmName("htlfjwxkchydtvmy")
    public suspend fun identity(`value`: IdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument The identity of the resource.
     */
    @JvmName("gcfwdemyevcdddrt")
    public suspend fun identity(argument: suspend IdentityArgsBuilder.() -> Unit) {
        val toBeMapped = IdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value The geo-location where the resource lives
     */
    @JvmName("otlrdxfovbvnjyvn")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The network access type for accessing Log Analytics ingestion.
     */
    @JvmName("dnsaeajpclliluhf")
    public suspend fun publicNetworkAccessForIngestion(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicNetworkAccessForIngestion = mapped
    }

    /**
     * @param value The network access type for accessing Log Analytics ingestion.
     */
    @JvmName("ipeuicdkxrenttnx")
    public fun publicNetworkAccessForIngestion(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.publicNetworkAccessForIngestion = mapped
    }

    /**
     * @param value The network access type for accessing Log Analytics ingestion.
     */
    @JvmName("fmuikqpssolwfgxc")
    public fun publicNetworkAccessForIngestion(`value`: PublicNetworkAccessType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.publicNetworkAccessForIngestion = mapped
    }

    /**
     * @param value The network access type for accessing Log Analytics query.
     */
    @JvmName("ubnxsqpipugfrwsq")
    public suspend fun publicNetworkAccessForQuery(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicNetworkAccessForQuery = mapped
    }

    /**
     * @param value The network access type for accessing Log Analytics query.
     */
    @JvmName("mukjipwniwfmkqnb")
    public fun publicNetworkAccessForQuery(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.publicNetworkAccessForQuery = mapped
    }

    /**
     * @param value The network access type for accessing Log Analytics query.
     */
    @JvmName("iqoctuhggjhgvxov")
    public fun publicNetworkAccessForQuery(`value`: PublicNetworkAccessType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.publicNetworkAccessForQuery = mapped
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("pounjfexrjdtmhiq")
    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. Allowed values are per pricing plan. See pricing tiers documentation for details.
     */
    @JvmName("ynssrgpcnchlntnf")
    public suspend fun retentionInDays(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.retentionInDays = mapped
    }

    /**
     * @param value The SKU of the workspace.
     */
    @JvmName("cknbkxkoaydbdoeg")
    public suspend fun sku(`value`: WorkspaceSkuArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sku = mapped
    }

    /**
     * @param argument The SKU of the workspace.
     */
    @JvmName("cglgpfmampbrndxy")
    public suspend fun sku(argument: suspend WorkspaceSkuArgsBuilder.() -> Unit) {
        val toBeMapped = WorkspaceSkuArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sku = mapped
    }

    /**
     * @param value Resource tags.
     */
    @JvmName("csolyxvnbiecfsdy")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Resource tags.
     */
    @JvmName("nlmxmfxmjcuoeuwr")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The daily volume cap for ingestion.
     */
    @JvmName("sqhueixoeakdmpin")
    public suspend fun workspaceCapping(`value`: WorkspaceCappingArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workspaceCapping = mapped
    }

    /**
     * @param argument The daily volume cap for ingestion.
     */
    @JvmName("fqnikpwdsuufqfcc")
    public suspend fun workspaceCapping(argument: suspend WorkspaceCappingArgsBuilder.() -> Unit) {
        val toBeMapped = WorkspaceCappingArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.workspaceCapping = mapped
    }

    /**
     * @param value The name of the workspace.
     */
    @JvmName("graobgorrtsuofpq")
    public suspend fun workspaceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workspaceName = mapped
    }

    internal fun build(): WorkspaceArgs = WorkspaceArgs(
        defaultDataCollectionRuleResourceId = defaultDataCollectionRuleResourceId,
        features = features,
        forceCmkForQuery = forceCmkForQuery,
        identity = identity,
        location = location,
        publicNetworkAccessForIngestion = publicNetworkAccessForIngestion,
        publicNetworkAccessForQuery = publicNetworkAccessForQuery,
        resourceGroupName = resourceGroupName,
        retentionInDays = retentionInDays,
        sku = sku,
        tags = tags,
        workspaceCapping = workspaceCapping,
        workspaceName = workspaceName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy