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

com.pulumi.azure.kusto.kotlin.DatabaseArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.kusto.kotlin

import com.pulumi.azure.kusto.DatabaseArgs.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

/**
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "my-kusto-rg",
 *     location: "West Europe",
 * });
 * const cluster = new azure.kusto.Cluster("cluster", {
 *     name: "kustocluster",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     sku: {
 *         name: "Standard_D13_v2",
 *         capacity: 2,
 *     },
 * });
 * const database = new azure.kusto.Database("database", {
 *     name: "my-kusto-database",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     clusterName: cluster.name,
 *     hotCachePeriod: "P7D",
 *     softDeletePeriod: "P31D",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="my-kusto-rg",
 *     location="West Europe")
 * cluster = azure.kusto.Cluster("cluster",
 *     name="kustocluster",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku={
 *         "name": "Standard_D13_v2",
 *         "capacity": 2,
 *     })
 * database = azure.kusto.Database("database",
 *     name="my-kusto-database",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     cluster_name=cluster.name,
 *     hot_cache_period="P7D",
 *     soft_delete_period="P31D")
 * ```
 * ```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 = "my-kusto-rg",
 *         Location = "West Europe",
 *     });
 *     var cluster = new Azure.Kusto.Cluster("cluster", new()
 *     {
 *         Name = "kustocluster",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Sku = new Azure.Kusto.Inputs.ClusterSkuArgs
 *         {
 *             Name = "Standard_D13_v2",
 *             Capacity = 2,
 *         },
 *     });
 *     var database = new Azure.Kusto.Database("database", new()
 *     {
 *         Name = "my-kusto-database",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         ClusterName = cluster.Name,
 *         HotCachePeriod = "P7D",
 *         SoftDeletePeriod = "P31D",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/kusto"
 * 	"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("my-kusto-rg"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		cluster, err := kusto.NewCluster(ctx, "cluster", &kusto.ClusterArgs{
 * 			Name:              pulumi.String("kustocluster"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			Sku: &kusto.ClusterSkuArgs{
 * 				Name:     pulumi.String("Standard_D13_v2"),
 * 				Capacity: pulumi.Int(2),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = kusto.NewDatabase(ctx, "database", &kusto.DatabaseArgs{
 * 			Name:              pulumi.String("my-kusto-database"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 			ClusterName:       cluster.Name,
 * 			HotCachePeriod:    pulumi.String("P7D"),
 * 			SoftDeletePeriod:  pulumi.String("P31D"),
 * 		})
 * 		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.kusto.Cluster;
 * import com.pulumi.azure.kusto.ClusterArgs;
 * import com.pulumi.azure.kusto.inputs.ClusterSkuArgs;
 * import com.pulumi.azure.kusto.Database;
 * import com.pulumi.azure.kusto.DatabaseArgs;
 * 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("my-kusto-rg")
 *             .location("West Europe")
 *             .build());
 *         var cluster = new Cluster("cluster", ClusterArgs.builder()
 *             .name("kustocluster")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .sku(ClusterSkuArgs.builder()
 *                 .name("Standard_D13_v2")
 *                 .capacity(2)
 *                 .build())
 *             .build());
 *         var database = new Database("database", DatabaseArgs.builder()
 *             .name("my-kusto-database")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .clusterName(cluster.name())
 *             .hotCachePeriod("P7D")
 *             .softDeletePeriod("P31D")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: my-kusto-rg
 *       location: West Europe
 *   cluster:
 *     type: azure:kusto:Cluster
 *     properties:
 *       name: kustocluster
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       sku:
 *         name: Standard_D13_v2
 *         capacity: 2
 *   database:
 *     type: azure:kusto:Database
 *     properties:
 *       name: my-kusto-database
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       clusterName: ${cluster.name}
 *       hotCachePeriod: P7D
 *       softDeletePeriod: P31D
 * ```
 * 
 * ## Import
 * Kusto Clusters can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:kusto/database:Database example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/databases/database1
 * ```
 * @property clusterName Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
 * @property hotCachePeriod The time the data that should be kept in cache for fast queries as ISO 8601 timespan. Default is unlimited. For more information see: [ISO 8601 Timespan](https://en.wikipedia.org/wiki/ISO_8601#Durations)
 * @property location The location where the Kusto Database should be created. Changing this forces a new resource to be created.
 * @property name The name of the Kusto Database to create. Changing this forces a new resource to be created.
 * @property resourceGroupName Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
 * @property softDeletePeriod The time the data should be kept before it stops being accessible to queries as ISO 8601 timespan. Default is unlimited. For more information see: [ISO 8601 Timespan](https://en.wikipedia.org/wiki/ISO_8601#Durations)
 */
public data class DatabaseArgs(
    public val clusterName: Output? = null,
    public val hotCachePeriod: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val softDeletePeriod: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.kusto.DatabaseArgs =
        com.pulumi.azure.kusto.DatabaseArgs.builder()
            .clusterName(clusterName?.applyValue({ args0 -> args0 }))
            .hotCachePeriod(hotCachePeriod?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .softDeletePeriod(softDeletePeriod?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DatabaseArgs].
 */
@PulumiTagMarker
public class DatabaseArgsBuilder internal constructor() {
    private var clusterName: Output? = null

    private var hotCachePeriod: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var softDeletePeriod: Output? = null

    /**
     * @param value Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
     */
    @JvmName("hkmrjbvscdssjhas")
    public suspend fun clusterName(`value`: Output) {
        this.clusterName = value
    }

    /**
     * @param value The time the data that should be kept in cache for fast queries as ISO 8601 timespan. Default is unlimited. For more information see: [ISO 8601 Timespan](https://en.wikipedia.org/wiki/ISO_8601#Durations)
     */
    @JvmName("dbrywwagqpjxqbrn")
    public suspend fun hotCachePeriod(`value`: Output) {
        this.hotCachePeriod = value
    }

    /**
     * @param value The location where the Kusto Database should be created. Changing this forces a new resource to be created.
     */
    @JvmName("cphwqlosikmkbmri")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The name of the Kusto Database to create. Changing this forces a new resource to be created.
     */
    @JvmName("ltcanmswoponmwjc")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
     */
    @JvmName("mhnccagaywwbxvrd")
    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 as ISO 8601 timespan. Default is unlimited. For more information see: [ISO 8601 Timespan](https://en.wikipedia.org/wiki/ISO_8601#Durations)
     */
    @JvmName("pptckneeredudoaa")
    public suspend fun softDeletePeriod(`value`: Output) {
        this.softDeletePeriod = value
    }

    /**
     * @param value Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
     */
    @JvmName("lqihddcmirtmwkrl")
    public suspend fun clusterName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clusterName = mapped
    }

    /**
     * @param value The time the data that should be kept in cache for fast queries as ISO 8601 timespan. Default is unlimited. For more information see: [ISO 8601 Timespan](https://en.wikipedia.org/wiki/ISO_8601#Durations)
     */
    @JvmName("uuvorlqrnrhbpuha")
    public suspend fun hotCachePeriod(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hotCachePeriod = mapped
    }

    /**
     * @param value The location where the Kusto Database should be created. Changing this forces a new resource to be created.
     */
    @JvmName("ywiovvlyfqsmywao")
    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 Kusto Database to create. Changing this forces a new resource to be created.
     */
    @JvmName("dcbjoeyyvaponvcg")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
     */
    @JvmName("yvfjvllaqyjfrxsk")
    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 as ISO 8601 timespan. Default is unlimited. For more information see: [ISO 8601 Timespan](https://en.wikipedia.org/wiki/ISO_8601#Durations)
     */
    @JvmName("textbjfcupbcexxs")
    public suspend fun softDeletePeriod(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.softDeletePeriod = mapped
    }

    internal fun build(): DatabaseArgs = DatabaseArgs(
        clusterName = clusterName,
        hotCachePeriod = hotCachePeriod,
        location = location,
        name = name,
        resourceGroupName = resourceGroupName,
        softDeletePeriod = softDeletePeriod,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy