We recommend using Azure Native.
azure.kusto.Database
Explore with Pulumi AI
Example Usage
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",
});
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")
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/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
})
}
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",
});
});
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());
}
}
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
Create Database Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Database(name: string, args: DatabaseArgs, opts?: CustomResourceOptions);
@overload
def Database(resource_name: str,
args: DatabaseArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Database(resource_name: str,
opts: Optional[ResourceOptions] = None,
cluster_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
hot_cache_period: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
soft_delete_period: Optional[str] = None)
func NewDatabase(ctx *Context, name string, args DatabaseArgs, opts ...ResourceOption) (*Database, error)
public Database(string name, DatabaseArgs args, CustomResourceOptions? opts = null)
public Database(String name, DatabaseArgs args)
public Database(String name, DatabaseArgs args, CustomResourceOptions options)
type: azure:kusto:Database
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DatabaseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DatabaseArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DatabaseArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatabaseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DatabaseArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var databaseResource = new Azure.Kusto.Database("databaseResource", new()
{
ClusterName = "string",
ResourceGroupName = "string",
HotCachePeriod = "string",
Location = "string",
Name = "string",
SoftDeletePeriod = "string",
});
example, err := kusto.NewDatabase(ctx, "databaseResource", &kusto.DatabaseArgs{
ClusterName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
HotCachePeriod: pulumi.String("string"),
Location: pulumi.String("string"),
Name: pulumi.String("string"),
SoftDeletePeriod: pulumi.String("string"),
})
var databaseResource = new Database("databaseResource", DatabaseArgs.builder()
.clusterName("string")
.resourceGroupName("string")
.hotCachePeriod("string")
.location("string")
.name("string")
.softDeletePeriod("string")
.build());
database_resource = azure.kusto.Database("databaseResource",
cluster_name="string",
resource_group_name="string",
hot_cache_period="string",
location="string",
name="string",
soft_delete_period="string")
const databaseResource = new azure.kusto.Database("databaseResource", {
clusterName: "string",
resourceGroupName: "string",
hotCachePeriod: "string",
location: "string",
name: "string",
softDeletePeriod: "string",
});
type: azure:kusto:Database
properties:
clusterName: string
hotCachePeriod: string
location: string
name: string
resourceGroupName: string
softDeletePeriod: string
Database Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Database resource accepts the following input properties:
- Cluster
Name string - Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
- Resource
Group stringName - Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
- Hot
Cache stringPeriod - 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
- Location string
- The location where the Kusto Database should be created. Changing this forces a new resource to be created.
- Name string
- The name of the Kusto Database to create. Changing this forces a new resource to be created.
- Soft
Delete stringPeriod - 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
- Cluster
Name string - Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
- Resource
Group stringName - Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
- Hot
Cache stringPeriod - 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
- Location string
- The location where the Kusto Database should be created. Changing this forces a new resource to be created.
- Name string
- The name of the Kusto Database to create. Changing this forces a new resource to be created.
- Soft
Delete stringPeriod - 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
- cluster
Name String - Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
- resource
Group StringName - Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
- hot
Cache StringPeriod - 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
- location String
- The location where the Kusto Database should be created. Changing this forces a new resource to be created.
- name String
- The name of the Kusto Database to create. Changing this forces a new resource to be created.
- soft
Delete StringPeriod - 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
- cluster
Name string - Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
- resource
Group stringName - Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
- hot
Cache stringPeriod - 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
- location string
- The location where the Kusto Database should be created. Changing this forces a new resource to be created.
- name string
- The name of the Kusto Database to create. Changing this forces a new resource to be created.
- soft
Delete stringPeriod - 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
- cluster_
name str - Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
- resource_
group_ strname - Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
- hot_
cache_ strperiod - 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
- location str
- The location where the Kusto Database should be created. Changing this forces a new resource to be created.
- name str
- The name of the Kusto Database to create. Changing this forces a new resource to be created.
- soft_
delete_ strperiod - 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
- cluster
Name String - Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
- resource
Group StringName - Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
- hot
Cache StringPeriod - 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
- location String
- The location where the Kusto Database should be created. Changing this forces a new resource to be created.
- name String
- The name of the Kusto Database to create. Changing this forces a new resource to be created.
- soft
Delete StringPeriod - 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
Outputs
All input properties are implicitly available as output properties. Additionally, the Database resource produces the following output properties:
Look up Existing Database Resource
Get an existing Database resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DatabaseState, opts?: CustomResourceOptions): Database
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cluster_name: Optional[str] = None,
hot_cache_period: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
resource_group_name: Optional[str] = None,
size: Optional[float] = None,
soft_delete_period: Optional[str] = None) -> Database
func GetDatabase(ctx *Context, name string, id IDInput, state *DatabaseState, opts ...ResourceOption) (*Database, error)
public static Database Get(string name, Input<string> id, DatabaseState? state, CustomResourceOptions? opts = null)
public static Database get(String name, Output<String> id, DatabaseState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Cluster
Name string - Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
- Hot
Cache stringPeriod - 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
- Location string
- The location where the Kusto Database should be created. Changing this forces a new resource to be created.
- Name string
- The name of the Kusto Database to create. Changing this forces a new resource to be created.
- Resource
Group stringName - Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
- Size double
- The size of the database in bytes.
- Soft
Delete stringPeriod - 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
- Cluster
Name string - Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
- Hot
Cache stringPeriod - 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
- Location string
- The location where the Kusto Database should be created. Changing this forces a new resource to be created.
- Name string
- The name of the Kusto Database to create. Changing this forces a new resource to be created.
- Resource
Group stringName - Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
- Size float64
- The size of the database in bytes.
- Soft
Delete stringPeriod - 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
- cluster
Name String - Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
- hot
Cache StringPeriod - 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
- location String
- The location where the Kusto Database should be created. Changing this forces a new resource to be created.
- name String
- The name of the Kusto Database to create. Changing this forces a new resource to be created.
- resource
Group StringName - Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
- size Double
- The size of the database in bytes.
- soft
Delete StringPeriod - 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
- cluster
Name string - Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
- hot
Cache stringPeriod - 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
- location string
- The location where the Kusto Database should be created. Changing this forces a new resource to be created.
- name string
- The name of the Kusto Database to create. Changing this forces a new resource to be created.
- resource
Group stringName - Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
- size number
- The size of the database in bytes.
- soft
Delete stringPeriod - 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
- cluster_
name str - Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
- hot_
cache_ strperiod - 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
- location str
- The location where the Kusto Database should be created. Changing this forces a new resource to be created.
- name str
- The name of the Kusto Database to create. Changing this forces a new resource to be created.
- resource_
group_ strname - Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
- size float
- The size of the database in bytes.
- soft_
delete_ strperiod - 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
- cluster
Name String - Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
- hot
Cache StringPeriod - 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
- location String
- The location where the Kusto Database should be created. Changing this forces a new resource to be created.
- name String
- The name of the Kusto Database to create. Changing this forces a new resource to be created.
- resource
Group StringName - Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
- size Number
- The size of the database in bytes.
- soft
Delete StringPeriod - 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
Import
Kusto Clusters can be imported using the resource id
, e.g.
$ pulumi import azure:kusto/database:Database example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/databases/database1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.