Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.kusto.kotlin.AttachedDatabaseConfigurationArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.kusto.kotlin
import com.pulumi.azure.kusto.AttachedDatabaseConfigurationArgs.builder
import com.pulumi.azure.kusto.kotlin.inputs.AttachedDatabaseConfigurationSharingArgs
import com.pulumi.azure.kusto.kotlin.inputs.AttachedDatabaseConfigurationSharingArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Manages a Kusto (also known as Azure Data Explorer) Attached Database Configuration
* ## 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 followerCluster = new azure.kusto.Cluster("follower_cluster", {
* name: "cluster1",
* location: example.location,
* resourceGroupName: example.name,
* sku: {
* name: "Dev(No SLA)_Standard_D11_v2",
* capacity: 1,
* },
* });
* const followedCluster = new azure.kusto.Cluster("followed_cluster", {
* name: "cluster2",
* location: example.location,
* resourceGroupName: example.name,
* sku: {
* name: "Dev(No SLA)_Standard_D11_v2",
* capacity: 1,
* },
* });
* const followedDatabase = new azure.kusto.Database("followed_database", {
* name: "my-followed-database",
* resourceGroupName: example.name,
* location: example.location,
* clusterName: followerCluster.name,
* });
* const exampleDatabase = new azure.kusto.Database("example", {
* name: "example",
* resourceGroupName: example.name,
* location: example.location,
* clusterName: followerCluster.name,
* });
* const exampleAttachedDatabaseConfiguration = new azure.kusto.AttachedDatabaseConfiguration("example", {
* name: "configuration1",
* resourceGroupName: example.name,
* location: example.location,
* clusterName: followerCluster.name,
* clusterResourceId: followedCluster.id,
* databaseName: exampleDatabase.name,
* sharing: {
* externalTablesToExcludes: ["ExternalTable2"],
* externalTablesToIncludes: ["ExternalTable1"],
* materializedViewsToExcludes: ["MaterializedViewTable2"],
* materializedViewsToIncludes: ["MaterializedViewTable1"],
* tablesToExcludes: ["Table2"],
* tablesToIncludes: ["Table1"],
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="my-kusto-rg",
* location="West Europe")
* follower_cluster = azure.kusto.Cluster("follower_cluster",
* name="cluster1",
* location=example.location,
* resource_group_name=example.name,
* sku={
* "name": "Dev(No SLA)_Standard_D11_v2",
* "capacity": 1,
* })
* followed_cluster = azure.kusto.Cluster("followed_cluster",
* name="cluster2",
* location=example.location,
* resource_group_name=example.name,
* sku={
* "name": "Dev(No SLA)_Standard_D11_v2",
* "capacity": 1,
* })
* followed_database = azure.kusto.Database("followed_database",
* name="my-followed-database",
* resource_group_name=example.name,
* location=example.location,
* cluster_name=follower_cluster.name)
* example_database = azure.kusto.Database("example",
* name="example",
* resource_group_name=example.name,
* location=example.location,
* cluster_name=follower_cluster.name)
* example_attached_database_configuration = azure.kusto.AttachedDatabaseConfiguration("example",
* name="configuration1",
* resource_group_name=example.name,
* location=example.location,
* cluster_name=follower_cluster.name,
* cluster_resource_id=followed_cluster.id,
* database_name=example_database.name,
* sharing={
* "external_tables_to_excludes": ["ExternalTable2"],
* "external_tables_to_includes": ["ExternalTable1"],
* "materialized_views_to_excludes": ["MaterializedViewTable2"],
* "materialized_views_to_includes": ["MaterializedViewTable1"],
* "tables_to_excludes": ["Table2"],
* "tables_to_includes": ["Table1"],
* })
* ```
* ```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 followerCluster = new Azure.Kusto.Cluster("follower_cluster", new()
* {
* Name = "cluster1",
* Location = example.Location,
* ResourceGroupName = example.Name,
* Sku = new Azure.Kusto.Inputs.ClusterSkuArgs
* {
* Name = "Dev(No SLA)_Standard_D11_v2",
* Capacity = 1,
* },
* });
* var followedCluster = new Azure.Kusto.Cluster("followed_cluster", new()
* {
* Name = "cluster2",
* Location = example.Location,
* ResourceGroupName = example.Name,
* Sku = new Azure.Kusto.Inputs.ClusterSkuArgs
* {
* Name = "Dev(No SLA)_Standard_D11_v2",
* Capacity = 1,
* },
* });
* var followedDatabase = new Azure.Kusto.Database("followed_database", new()
* {
* Name = "my-followed-database",
* ResourceGroupName = example.Name,
* Location = example.Location,
* ClusterName = followerCluster.Name,
* });
* var exampleDatabase = new Azure.Kusto.Database("example", new()
* {
* Name = "example",
* ResourceGroupName = example.Name,
* Location = example.Location,
* ClusterName = followerCluster.Name,
* });
* var exampleAttachedDatabaseConfiguration = new Azure.Kusto.AttachedDatabaseConfiguration("example", new()
* {
* Name = "configuration1",
* ResourceGroupName = example.Name,
* Location = example.Location,
* ClusterName = followerCluster.Name,
* ClusterResourceId = followedCluster.Id,
* DatabaseName = exampleDatabase.Name,
* Sharing = new Azure.Kusto.Inputs.AttachedDatabaseConfigurationSharingArgs
* {
* ExternalTablesToExcludes = new[]
* {
* "ExternalTable2",
* },
* ExternalTablesToIncludes = new[]
* {
* "ExternalTable1",
* },
* MaterializedViewsToExcludes = new[]
* {
* "MaterializedViewTable2",
* },
* MaterializedViewsToIncludes = new[]
* {
* "MaterializedViewTable1",
* },
* TablesToExcludes = new[]
* {
* "Table2",
* },
* TablesToIncludes = new[]
* {
* "Table1",
* },
* },
* });
* });
* ```
* ```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
* }
* followerCluster, err := kusto.NewCluster(ctx, "follower_cluster", &kusto.ClusterArgs{
* Name: pulumi.String("cluster1"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* Sku: &kusto.ClusterSkuArgs{
* Name: pulumi.String("Dev(No SLA)_Standard_D11_v2"),
* Capacity: pulumi.Int(1),
* },
* })
* if err != nil {
* return err
* }
* followedCluster, err := kusto.NewCluster(ctx, "followed_cluster", &kusto.ClusterArgs{
* Name: pulumi.String("cluster2"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* Sku: &kusto.ClusterSkuArgs{
* Name: pulumi.String("Dev(No SLA)_Standard_D11_v2"),
* Capacity: pulumi.Int(1),
* },
* })
* if err != nil {
* return err
* }
* _, err = kusto.NewDatabase(ctx, "followed_database", &kusto.DatabaseArgs{
* Name: pulumi.String("my-followed-database"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* ClusterName: followerCluster.Name,
* })
* if err != nil {
* return err
* }
* exampleDatabase, err := kusto.NewDatabase(ctx, "example", &kusto.DatabaseArgs{
* Name: pulumi.String("example"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* ClusterName: followerCluster.Name,
* })
* if err != nil {
* return err
* }
* _, err = kusto.NewAttachedDatabaseConfiguration(ctx, "example", &kusto.AttachedDatabaseConfigurationArgs{
* Name: pulumi.String("configuration1"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* ClusterName: followerCluster.Name,
* ClusterResourceId: followedCluster.ID(),
* DatabaseName: exampleDatabase.Name,
* Sharing: &kusto.AttachedDatabaseConfigurationSharingArgs{
* ExternalTablesToExcludes: pulumi.StringArray{
* pulumi.String("ExternalTable2"),
* },
* ExternalTablesToIncludes: pulumi.StringArray{
* pulumi.String("ExternalTable1"),
* },
* MaterializedViewsToExcludes: pulumi.StringArray{
* pulumi.String("MaterializedViewTable2"),
* },
* MaterializedViewsToIncludes: pulumi.StringArray{
* pulumi.String("MaterializedViewTable1"),
* },
* TablesToExcludes: pulumi.StringArray{
* pulumi.String("Table2"),
* },
* TablesToIncludes: pulumi.StringArray{
* pulumi.String("Table1"),
* },
* },
* })
* 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 com.pulumi.azure.kusto.AttachedDatabaseConfiguration;
* import com.pulumi.azure.kusto.AttachedDatabaseConfigurationArgs;
* import com.pulumi.azure.kusto.inputs.AttachedDatabaseConfigurationSharingArgs;
* 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 followerCluster = new Cluster("followerCluster", ClusterArgs.builder()
* .name("cluster1")
* .location(example.location())
* .resourceGroupName(example.name())
* .sku(ClusterSkuArgs.builder()
* .name("Dev(No SLA)_Standard_D11_v2")
* .capacity(1)
* .build())
* .build());
* var followedCluster = new Cluster("followedCluster", ClusterArgs.builder()
* .name("cluster2")
* .location(example.location())
* .resourceGroupName(example.name())
* .sku(ClusterSkuArgs.builder()
* .name("Dev(No SLA)_Standard_D11_v2")
* .capacity(1)
* .build())
* .build());
* var followedDatabase = new Database("followedDatabase", DatabaseArgs.builder()
* .name("my-followed-database")
* .resourceGroupName(example.name())
* .location(example.location())
* .clusterName(followerCluster.name())
* .build());
* var exampleDatabase = new Database("exampleDatabase", DatabaseArgs.builder()
* .name("example")
* .resourceGroupName(example.name())
* .location(example.location())
* .clusterName(followerCluster.name())
* .build());
* var exampleAttachedDatabaseConfiguration = new AttachedDatabaseConfiguration("exampleAttachedDatabaseConfiguration", AttachedDatabaseConfigurationArgs.builder()
* .name("configuration1")
* .resourceGroupName(example.name())
* .location(example.location())
* .clusterName(followerCluster.name())
* .clusterResourceId(followedCluster.id())
* .databaseName(exampleDatabase.name())
* .sharing(AttachedDatabaseConfigurationSharingArgs.builder()
* .externalTablesToExcludes("ExternalTable2")
* .externalTablesToIncludes("ExternalTable1")
* .materializedViewsToExcludes("MaterializedViewTable2")
* .materializedViewsToIncludes("MaterializedViewTable1")
* .tablesToExcludes("Table2")
* .tablesToIncludes("Table1")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: my-kusto-rg
* location: West Europe
* followerCluster:
* type: azure:kusto:Cluster
* name: follower_cluster
* properties:
* name: cluster1
* location: ${example.location}
* resourceGroupName: ${example.name}
* sku:
* name: Dev(No SLA)_Standard_D11_v2
* capacity: 1
* followedCluster:
* type: azure:kusto:Cluster
* name: followed_cluster
* properties:
* name: cluster2
* location: ${example.location}
* resourceGroupName: ${example.name}
* sku:
* name: Dev(No SLA)_Standard_D11_v2
* capacity: 1
* followedDatabase:
* type: azure:kusto:Database
* name: followed_database
* properties:
* name: my-followed-database
* resourceGroupName: ${example.name}
* location: ${example.location}
* clusterName: ${followerCluster.name}
* exampleDatabase:
* type: azure:kusto:Database
* name: example
* properties:
* name: example
* resourceGroupName: ${example.name}
* location: ${example.location}
* clusterName: ${followerCluster.name}
* exampleAttachedDatabaseConfiguration:
* type: azure:kusto:AttachedDatabaseConfiguration
* name: example
* properties:
* name: configuration1
* resourceGroupName: ${example.name}
* location: ${example.location}
* clusterName: ${followerCluster.name}
* clusterResourceId: ${followedCluster.id}
* databaseName: ${exampleDatabase.name}
* sharing:
* externalTablesToExcludes:
* - ExternalTable2
* externalTablesToIncludes:
* - ExternalTable1
* materializedViewsToExcludes:
* - MaterializedViewTable2
* materializedViewsToIncludes:
* - MaterializedViewTable1
* tablesToExcludes:
* - Table2
* tablesToIncludes:
* - Table1
* ```
*
* ## Import
* Kusto Attached Database Configurations can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:kusto/attachedDatabaseConfiguration:AttachedDatabaseConfiguration example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/attachedDatabaseConfigurations/configuration1
* ```
* @property clusterName Specifies the name of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created.
* @property clusterResourceId The resource id of the cluster where the databases you would like to attach reside. Changing this forces a new resource to be created.
* @property databaseName The name of the database which you would like to attach, use * if you want to follow all current and future databases. Changing this forces a new resource to be created.
* @property defaultPrincipalModificationKind The default principals modification kind. Valid values are: `None` (default), `Replace` and `Union`. Defaults to `None`.
* @property location Specifies the location of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created.
* @property name The name of the Kusto Attached Database Configuration to create. Changing this forces a new resource to be created.
* @property resourceGroupName Specifies the resource group of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created.
* @property sharing A `sharing` block as defined below.
*/
public data class AttachedDatabaseConfigurationArgs(
public val clusterName: Output? = null,
public val clusterResourceId: Output? = null,
public val databaseName: Output? = null,
public val defaultPrincipalModificationKind: Output? = null,
public val location: Output? = null,
public val name: Output? = null,
public val resourceGroupName: Output? = null,
public val sharing: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.kusto.AttachedDatabaseConfigurationArgs =
com.pulumi.azure.kusto.AttachedDatabaseConfigurationArgs.builder()
.clusterName(clusterName?.applyValue({ args0 -> args0 }))
.clusterResourceId(clusterResourceId?.applyValue({ args0 -> args0 }))
.databaseName(databaseName?.applyValue({ args0 -> args0 }))
.defaultPrincipalModificationKind(defaultPrincipalModificationKind?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.sharing(sharing?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [AttachedDatabaseConfigurationArgs].
*/
@PulumiTagMarker
public class AttachedDatabaseConfigurationArgsBuilder internal constructor() {
private var clusterName: Output? = null
private var clusterResourceId: Output? = null
private var databaseName: Output? = null
private var defaultPrincipalModificationKind: Output? = null
private var location: Output? = null
private var name: Output? = null
private var resourceGroupName: Output? = null
private var sharing: Output? = null
/**
* @param value Specifies the name of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created.
*/
@JvmName("yywtvjtlitectwmi")
public suspend fun clusterName(`value`: Output) {
this.clusterName = value
}
/**
* @param value The resource id of the cluster where the databases you would like to attach reside. Changing this forces a new resource to be created.
*/
@JvmName("yhiaytkcumchjgmu")
public suspend fun clusterResourceId(`value`: Output) {
this.clusterResourceId = value
}
/**
* @param value The name of the database which you would like to attach, use * if you want to follow all current and future databases. Changing this forces a new resource to be created.
*/
@JvmName("oyfvisetvnqrnksu")
public suspend fun databaseName(`value`: Output) {
this.databaseName = value
}
/**
* @param value The default principals modification kind. Valid values are: `None` (default), `Replace` and `Union`. Defaults to `None`.
*/
@JvmName("sxvykuvymwoiwarj")
public suspend fun defaultPrincipalModificationKind(`value`: Output) {
this.defaultPrincipalModificationKind = value
}
/**
* @param value Specifies the location of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created.
*/
@JvmName("xhgmfiictjtohnxg")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The name of the Kusto Attached Database Configuration to create. Changing this forces a new resource to be created.
*/
@JvmName("hpbisldbbdmlxkoq")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Specifies the resource group of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created.
*/
@JvmName("wjctsugunaagemct")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value A `sharing` block as defined below.
*/
@JvmName("sxakqomurehljwvy")
public suspend fun sharing(`value`: Output) {
this.sharing = value
}
/**
* @param value Specifies the name of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created.
*/
@JvmName("uhpwclofsmuesomg")
public suspend fun clusterName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.clusterName = mapped
}
/**
* @param value The resource id of the cluster where the databases you would like to attach reside. Changing this forces a new resource to be created.
*/
@JvmName("hpffxubxmxdjxyoi")
public suspend fun clusterResourceId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.clusterResourceId = mapped
}
/**
* @param value The name of the database which you would like to attach, use * if you want to follow all current and future databases. Changing this forces a new resource to be created.
*/
@JvmName("qupvgnprcgdasjqv")
public suspend fun databaseName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.databaseName = mapped
}
/**
* @param value The default principals modification kind. Valid values are: `None` (default), `Replace` and `Union`. Defaults to `None`.
*/
@JvmName("cvqtmtipemtkisxh")
public suspend fun defaultPrincipalModificationKind(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.defaultPrincipalModificationKind = mapped
}
/**
* @param value Specifies the location of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created.
*/
@JvmName("vsbqkpsteestqmts")
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 Attached Database Configuration to create. Changing this forces a new resource to be created.
*/
@JvmName("hsaoevkuvoahvein")
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 of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created.
*/
@JvmName("ayqqoawlbsnlpqjc")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value A `sharing` block as defined below.
*/
@JvmName("clceusnlkgfqeegq")
public suspend fun sharing(`value`: AttachedDatabaseConfigurationSharingArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sharing = mapped
}
/**
* @param argument A `sharing` block as defined below.
*/
@JvmName("jrroyexpotfnoalt")
public suspend fun sharing(argument: suspend AttachedDatabaseConfigurationSharingArgsBuilder.() -> Unit) {
val toBeMapped = AttachedDatabaseConfigurationSharingArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.sharing = mapped
}
internal fun build(): AttachedDatabaseConfigurationArgs = AttachedDatabaseConfigurationArgs(
clusterName = clusterName,
clusterResourceId = clusterResourceId,
databaseName = databaseName,
defaultPrincipalModificationKind = defaultPrincipalModificationKind,
location = location,
name = name,
resourceGroupName = resourceGroupName,
sharing = sharing,
)
}