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

com.pulumi.azurenative.kusto.kotlin.ReadWriteDatabaseArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.kusto.kotlin

import com.pulumi.azurenative.kusto.ReadWriteDatabaseArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Class representing a read write database.
 * Azure REST API version: 2022-12-29. Prior API version in Azure Native 1.x: 2021-01-01.
 * ## Example Usage
 * ### Kusto ReadOnly database update
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var readWriteDatabase = new AzureNative.Kusto.ReadWriteDatabase("readWriteDatabase", new()
 *     {
 *         ClusterName = "kustoCluster",
 *         DatabaseName = "kustoReadOnlyDatabase",
 *         ResourceGroupName = "kustorptest",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	kusto "github.com/pulumi/pulumi-azure-native-sdk/kusto/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := kusto.NewReadWriteDatabase(ctx, "readWriteDatabase", &kusto.ReadWriteDatabaseArgs{
 * 			ClusterName:       pulumi.String("kustoCluster"),
 * 			DatabaseName:      pulumi.String("kustoReadOnlyDatabase"),
 * 			ResourceGroupName: pulumi.String("kustorptest"),
 * 		})
 * 		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.kusto.ReadWriteDatabase;
 * import com.pulumi.azurenative.kusto.ReadWriteDatabaseArgs;
 * 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 readWriteDatabase = new ReadWriteDatabase("readWriteDatabase", ReadWriteDatabaseArgs.builder()
 *             .clusterName("kustoCluster")
 *             .databaseName("kustoReadOnlyDatabase")
 *             .resourceGroupName("kustorptest")
 *             .build());
 *     }
 * }
 * ```
 * ### Kusto ReadWrite database create or update
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var readWriteDatabase = new AzureNative.Kusto.ReadWriteDatabase("readWriteDatabase", new()
 *     {
 *         CallerRole = "Admin",
 *         ClusterName = "kustoCluster",
 *         DatabaseName = "KustoDatabase8",
 *         Kind = "ReadWrite",
 *         Location = "westus",
 *         ResourceGroupName = "kustorptest",
 *         SoftDeletePeriod = "P1D",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	kusto "github.com/pulumi/pulumi-azure-native-sdk/kusto/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := kusto.NewReadWriteDatabase(ctx, "readWriteDatabase", &kusto.ReadWriteDatabaseArgs{
 * 			CallerRole:        pulumi.String("Admin"),
 * 			ClusterName:       pulumi.String("kustoCluster"),
 * 			DatabaseName:      pulumi.String("KustoDatabase8"),
 * 			Kind:              pulumi.String("ReadWrite"),
 * 			Location:          pulumi.String("westus"),
 * 			ResourceGroupName: pulumi.String("kustorptest"),
 * 			SoftDeletePeriod:  pulumi.String("P1D"),
 * 		})
 * 		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.kusto.ReadWriteDatabase;
 * import com.pulumi.azurenative.kusto.ReadWriteDatabaseArgs;
 * 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 readWriteDatabase = new ReadWriteDatabase("readWriteDatabase", ReadWriteDatabaseArgs.builder()
 *             .callerRole("Admin")
 *             .clusterName("kustoCluster")
 *             .databaseName("KustoDatabase8")
 *             .kind("ReadWrite")
 *             .location("westus")
 *             .resourceGroupName("kustorptest")
 *             .softDeletePeriod("P1D")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:kusto:ReadWriteDatabase kustoCluster/KustoDatabase8 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}
 * ```
 * @property callerRole By default, any user who run operation on a database become an Admin on it. This property allows the caller to exclude the caller from Admins list.
 * @property clusterName The name of the Kusto cluster.
 * @property databaseName The name of the database in the Kusto cluster.
 * @property hotCachePeriod The time the data should be kept in cache for fast queries in TimeSpan.
 * @property kind Kind of the database
 * Expected value is 'ReadWrite'.
 * @property location Resource location.
 * @property resourceGroupName The name of the resource group containing the Kusto cluster.
 * @property softDeletePeriod The time the data should be kept before it stops being accessible to queries in TimeSpan.
 */
public data class ReadWriteDatabaseArgs(
    public val callerRole: Output? = null,
    public val clusterName: Output? = null,
    public val databaseName: Output? = null,
    public val hotCachePeriod: Output? = null,
    public val kind: Output? = null,
    public val location: Output? = null,
    public val resourceGroupName: Output? = null,
    public val softDeletePeriod: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.kusto.ReadWriteDatabaseArgs =
        com.pulumi.azurenative.kusto.ReadWriteDatabaseArgs.builder()
            .callerRole(callerRole?.applyValue({ args0 -> args0 }))
            .clusterName(clusterName?.applyValue({ args0 -> args0 }))
            .databaseName(databaseName?.applyValue({ args0 -> args0 }))
            .hotCachePeriod(hotCachePeriod?.applyValue({ args0 -> args0 }))
            .kind(kind?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .softDeletePeriod(softDeletePeriod?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ReadWriteDatabaseArgs].
 */
@PulumiTagMarker
public class ReadWriteDatabaseArgsBuilder internal constructor() {
    private var callerRole: Output? = null

    private var clusterName: Output? = null

    private var databaseName: Output? = null

    private var hotCachePeriod: Output? = null

    private var kind: Output? = null

    private var location: Output? = null

    private var resourceGroupName: Output? = null

    private var softDeletePeriod: Output? = null

    /**
     * @param value By default, any user who run operation on a database become an Admin on it. This property allows the caller to exclude the caller from Admins list.
     */
    @JvmName("fcpaqouspdkhguxw")
    public suspend fun callerRole(`value`: Output) {
        this.callerRole = value
    }

    /**
     * @param value The name of the Kusto cluster.
     */
    @JvmName("tknrxnbdeexfvsbq")
    public suspend fun clusterName(`value`: Output) {
        this.clusterName = value
    }

    /**
     * @param value The name of the database in the Kusto cluster.
     */
    @JvmName("jvwhfniekjuaqvlw")
    public suspend fun databaseName(`value`: Output) {
        this.databaseName = value
    }

    /**
     * @param value The time the data should be kept in cache for fast queries in TimeSpan.
     */
    @JvmName("tmwsmdlryvhbgriu")
    public suspend fun hotCachePeriod(`value`: Output) {
        this.hotCachePeriod = value
    }

    /**
     * @param value Kind of the database
     * Expected value is 'ReadWrite'.
     */
    @JvmName("renylhihvncesnku")
    public suspend fun kind(`value`: Output) {
        this.kind = value
    }

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

    /**
     * @param value The name of the resource group containing the Kusto cluster.
     */
    @JvmName("lvbitevjsoioxvdy")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The time the data should be kept before it stops being accessible to queries in TimeSpan.
     */
    @JvmName("xdwhbdgarintprfu")
    public suspend fun softDeletePeriod(`value`: Output) {
        this.softDeletePeriod = value
    }

    /**
     * @param value By default, any user who run operation on a database become an Admin on it. This property allows the caller to exclude the caller from Admins list.
     */
    @JvmName("iflfcdjgksbfvylf")
    public suspend fun callerRole(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.callerRole = mapped
    }

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

    /**
     * @param value The name of the database in the Kusto cluster.
     */
    @JvmName("fjerjuyntxslxabm")
    public suspend fun databaseName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.databaseName = mapped
    }

    /**
     * @param value The time the data should be kept in cache for fast queries in TimeSpan.
     */
    @JvmName("shcorpoefdetsrma")
    public suspend fun hotCachePeriod(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hotCachePeriod = mapped
    }

    /**
     * @param value Kind of the database
     * Expected value is 'ReadWrite'.
     */
    @JvmName("kfmafdfpmoftvyql")
    public suspend fun kind(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kind = mapped
    }

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

    /**
     * @param value The name of the resource group containing the Kusto cluster.
     */
    @JvmName("pidmfbyulsmtmcmk")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value The time the data should be kept before it stops being accessible to queries in TimeSpan.
     */
    @JvmName("hkugmmahidrqafwh")
    public suspend fun softDeletePeriod(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.softDeletePeriod = mapped
    }

    internal fun build(): ReadWriteDatabaseArgs = ReadWriteDatabaseArgs(
        callerRole = callerRole,
        clusterName = clusterName,
        databaseName = databaseName,
        hotCachePeriod = hotCachePeriod,
        kind = kind,
        location = location,
        resourceGroupName = resourceGroupName,
        softDeletePeriod = softDeletePeriod,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy