Database

Manages a Kusto (also known as Azure Data Explorer) Database

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var rg = new Azure.Core.ResourceGroup("rg", new Azure.Core.ResourceGroupArgs
        {
            Location = "East US",
        });
        var cluster = new Azure.Kusto.Cluster("cluster", new Azure.Kusto.ClusterArgs
        {
            Location = rg.Location,
            ResourceGroupName = rg.Name,
            Sku = new Azure.Kusto.Inputs.ClusterSkuArgs
            {
                Name = "Standard_D13_v2",
                Capacity = 2,
            },
        });
        var database = new Azure.Kusto.Database("database", new Azure.Kusto.DatabaseArgs
        {
            ResourceGroupName = rg.Name,
            Location = rg.Location,
            ClusterName = cluster.Name,
            HotCachePeriod = "P7D",
            SoftDeletePeriod = "P31D",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/kusto"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        rg, err := core.NewResourceGroup(ctx, "rg", &core.ResourceGroupArgs{
            Location: pulumi.String("East US"),
        })
        if err != nil {
            return err
        }
        cluster, err := kusto.NewCluster(ctx, "cluster", &kusto.ClusterArgs{
            Location:          rg.Location,
            ResourceGroupName: rg.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{
            ResourceGroupName: rg.Name,
            Location:          rg.Location,
            ClusterName:       cluster.Name,
            HotCachePeriod:    pulumi.String("P7D"),
            SoftDeletePeriod:  pulumi.String("P31D"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

rg = azure.core.ResourceGroup("rg", location="East US")
cluster = azure.kusto.Cluster("cluster",
    location=rg.location,
    resource_group_name=rg.name,
    sku={
        "name": "Standard_D13_v2",
        "capacity": 2,
    })
database = azure.kusto.Database("database",
    resource_group_name=rg.name,
    location=rg.location,
    cluster_name=cluster.name,
    hot_cache_period="P7D",
    soft_delete_period="P31D")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const rg = new azure.core.ResourceGroup("rg", {location: "East US"});
const cluster = new azure.kusto.Cluster("cluster", {
    location: rg.location,
    resourceGroupName: rg.name,
    sku: {
        name: "Standard_D13_v2",
        capacity: 2,
    },
});
const database = new azure.kusto.Database("database", {
    resourceGroupName: rg.name,
    location: rg.location,
    clusterName: cluster.name,
    hotCachePeriod: "P7D",
    softDeletePeriod: "P31D",
});

Create a Database Resource

def Database(resource_name, opts=None, cluster_name=None, hot_cache_period=None, location=None, name=None, resource_group_name=None, soft_delete_period=None, __props__=None);
func NewDatabase(ctx *Context, name string, args DatabaseArgs, opts ...ResourceOption) (*Database, error)
public Database(string name, DatabaseArgs args, CustomResourceOptions? opts = null)
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.
opts ResourceOptions
A bag of options that control this 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.

Database Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Database resource accepts the following input properties:

ClusterName string

Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.

ResourceGroupName string

Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.

HotCachePeriod string

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.

SoftDeletePeriod string

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

ClusterName string

Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.

ResourceGroupName string

Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.

HotCachePeriod string

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.

SoftDeletePeriod string

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

clusterName string

Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.

resourceGroupName string

Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.

hotCachePeriod string

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.

softDeletePeriod string

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_name str

Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.

hot_cache_period str

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_period str

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:

Id string
The provider-assigned unique ID for this managed resource.
Size double

The size of the database in bytes.

Id string
The provider-assigned unique ID for this managed resource.
Size float64

The size of the database in bytes.

id string
The provider-assigned unique ID for this managed resource.
size number

The size of the database in bytes.

id str
The provider-assigned unique ID for this managed resource.
size float

The size of the database in bytes.

Look up an 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
static get(resource_name, id, opts=None, cluster_name=None, hot_cache_period=None, location=None, name=None, resource_group_name=None, size=None, soft_delete_period=None, __props__=None);
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)
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.

The following state arguments are supported:

ClusterName string

Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.

HotCachePeriod string

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.

ResourceGroupName string

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.

SoftDeletePeriod string

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

ClusterName string

Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.

HotCachePeriod string

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.

ResourceGroupName string

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.

SoftDeletePeriod string

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

clusterName string

Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.

hotCachePeriod string

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.

resourceGroupName string

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.

softDeletePeriod string

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_period str

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_name str

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_period str

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

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.