Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.6.0 published on Friday, May 20, 2022 by Pulumi

DatasetKustoDatabase

Manages a Data Share Kusto Database Dataset.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
        {
            Location = "West Europe",
        });
        var exampleAccount = new Azure.DataShare.Account("exampleAccount", new Azure.DataShare.AccountArgs
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            Identity = new Azure.DataShare.Inputs.AccountIdentityArgs
            {
                Type = "SystemAssigned",
            },
        });
        var exampleShare = new Azure.DataShare.Share("exampleShare", new Azure.DataShare.ShareArgs
        {
            AccountId = exampleAccount.Id,
            Kind = "InPlace",
        });
        var exampleCluster = new Azure.Kusto.Cluster("exampleCluster", new Azure.Kusto.ClusterArgs
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            Sku = new Azure.Kusto.Inputs.ClusterSkuArgs
            {
                Name = "Dev(No SLA)_Standard_D11_v2",
                Capacity = 1,
            },
        });
        var exampleDatabase = new Azure.Kusto.Database("exampleDatabase", new Azure.Kusto.DatabaseArgs
        {
            ResourceGroupName = exampleResourceGroup.Name,
            Location = exampleResourceGroup.Location,
            ClusterName = exampleCluster.Name,
        });
        var exampleAssignment = new Azure.Authorization.Assignment("exampleAssignment", new Azure.Authorization.AssignmentArgs
        {
            Scope = exampleCluster.Id,
            RoleDefinitionName = "Contributor",
            PrincipalId = exampleAccount.Identity.Apply(identity => identity.PrincipalId),
        });
        var exampleDatasetKustoDatabase = new Azure.DataShare.DatasetKustoDatabase("exampleDatasetKustoDatabase", new Azure.DataShare.DatasetKustoDatabaseArgs
        {
            ShareId = exampleShare.Id,
            KustoDatabaseId = exampleDatabase.Id,
        }, new CustomResourceOptions
        {
            DependsOn = 
            {
                exampleAssignment,
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/authorization"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/datashare"
	"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 {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleAccount, err := datashare.NewAccount(ctx, "exampleAccount", &datashare.AccountArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			Identity: &datashare.AccountIdentityArgs{
				Type: pulumi.String("SystemAssigned"),
			},
		})
		if err != nil {
			return err
		}
		exampleShare, err := datashare.NewShare(ctx, "exampleShare", &datashare.ShareArgs{
			AccountId: exampleAccount.ID(),
			Kind:      pulumi.String("InPlace"),
		})
		if err != nil {
			return err
		}
		exampleCluster, err := kusto.NewCluster(ctx, "exampleCluster", &kusto.ClusterArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			Sku: &kusto.ClusterSkuArgs{
				Name:     pulumi.String("Dev(No SLA)_Standard_D11_v2"),
				Capacity: pulumi.Int(1),
			},
		})
		if err != nil {
			return err
		}
		exampleDatabase, err := kusto.NewDatabase(ctx, "exampleDatabase", &kusto.DatabaseArgs{
			ResourceGroupName: exampleResourceGroup.Name,
			Location:          exampleResourceGroup.Location,
			ClusterName:       exampleCluster.Name,
		})
		if err != nil {
			return err
		}
		exampleAssignment, err := authorization.NewAssignment(ctx, "exampleAssignment", &authorization.AssignmentArgs{
			Scope:              exampleCluster.ID(),
			RoleDefinitionName: pulumi.String("Contributor"),
			PrincipalId: exampleAccount.Identity.ApplyT(func(identity datashare.AccountIdentity) (string, error) {
				return identity.PrincipalId, nil
			}).(pulumi.StringOutput),
		})
		if err != nil {
			return err
		}
		_, err = datashare.NewDatasetKustoDatabase(ctx, "exampleDatasetKustoDatabase", &datashare.DatasetKustoDatabaseArgs{
			ShareId:         exampleShare.ID(),
			KustoDatabaseId: exampleDatabase.ID(),
		}, pulumi.DependsOn([]pulumi.Resource{
			exampleAssignment,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
            .location("West Europe")
            .build());

        var exampleAccount = new Account("exampleAccount", AccountArgs.builder()        
            .location(exampleResourceGroup.getLocation())
            .resourceGroupName(exampleResourceGroup.getName())
            .identity(AccountIdentity.builder()
                .type("SystemAssigned")
                .build())
            .build());

        var exampleShare = new Share("exampleShare", ShareArgs.builder()        
            .accountId(exampleAccount.getId())
            .kind("InPlace")
            .build());

        var exampleCluster = new Cluster("exampleCluster", ClusterArgs.builder()        
            .location(exampleResourceGroup.getLocation())
            .resourceGroupName(exampleResourceGroup.getName())
            .sku(ClusterSku.builder()
                .name("Dev(No SLA)_Standard_D11_v2")
                .capacity(1)
                .build())
            .build());

        var exampleDatabase = new Database("exampleDatabase", DatabaseArgs.builder()        
            .resourceGroupName(exampleResourceGroup.getName())
            .location(exampleResourceGroup.getLocation())
            .clusterName(exampleCluster.getName())
            .build());

        var exampleAssignment = new Assignment("exampleAssignment", AssignmentArgs.builder()        
            .scope(exampleCluster.getId())
            .roleDefinitionName("Contributor")
            .principalId(exampleAccount.getIdentity().apply(identity -> identity.getPrincipalId()))
            .build());

        var exampleDatasetKustoDatabase = new DatasetKustoDatabase("exampleDatasetKustoDatabase", DatasetKustoDatabaseArgs.builder()        
            .shareId(exampleShare.getId())
            .kustoDatabaseId(exampleDatabase.getId())
            .build());

        }
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_account = azure.datashare.Account("exampleAccount",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    identity=azure.datashare.AccountIdentityArgs(
        type="SystemAssigned",
    ))
example_share = azure.datashare.Share("exampleShare",
    account_id=example_account.id,
    kind="InPlace")
example_cluster = azure.kusto.Cluster("exampleCluster",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku=azure.kusto.ClusterSkuArgs(
        name="Dev(No SLA)_Standard_D11_v2",
        capacity=1,
    ))
example_database = azure.kusto.Database("exampleDatabase",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    cluster_name=example_cluster.name)
example_assignment = azure.authorization.Assignment("exampleAssignment",
    scope=example_cluster.id,
    role_definition_name="Contributor",
    principal_id=example_account.identity.principal_id)
example_dataset_kusto_database = azure.datashare.DatasetKustoDatabase("exampleDatasetKustoDatabase",
    share_id=example_share.id,
    kusto_database_id=example_database.id,
    opts=pulumi.ResourceOptions(depends_on=[example_assignment]))
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAccount = new azure.datashare.Account("exampleAccount", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    identity: {
        type: "SystemAssigned",
    },
});
const exampleShare = new azure.datashare.Share("exampleShare", {
    accountId: exampleAccount.id,
    kind: "InPlace",
});
const exampleCluster = new azure.kusto.Cluster("exampleCluster", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    sku: {
        name: "Dev(No SLA)_Standard_D11_v2",
        capacity: 1,
    },
});
const exampleDatabase = new azure.kusto.Database("exampleDatabase", {
    resourceGroupName: exampleResourceGroup.name,
    location: exampleResourceGroup.location,
    clusterName: exampleCluster.name,
});
const exampleAssignment = new azure.authorization.Assignment("exampleAssignment", {
    scope: exampleCluster.id,
    roleDefinitionName: "Contributor",
    principalId: exampleAccount.identity.apply(identity => identity.principalId),
});
const exampleDatasetKustoDatabase = new azure.datashare.DatasetKustoDatabase("exampleDatasetKustoDatabase", {
    shareId: exampleShare.id,
    kustoDatabaseId: exampleDatabase.id,
}, {
    dependsOn: [exampleAssignment],
});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
  exampleAccount:
    type: azure:datashare:Account
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      identity:
        type: SystemAssigned
  exampleShare:
    type: azure:datashare:Share
    properties:
      accountId: ${exampleAccount.id}
      kind: InPlace
  exampleCluster:
    type: azure:kusto:Cluster
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      sku:
        name: Dev(No SLA)_Standard_D11_v2
        capacity: 1
  exampleDatabase:
    type: azure:kusto:Database
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      location: ${exampleResourceGroup.location}
      clusterName: ${exampleCluster.name}
  exampleAssignment:
    type: azure:authorization:Assignment
    properties:
      scope: ${exampleCluster.id}
      roleDefinitionName: Contributor
      principalId: ${exampleAccount.identity.principalId}
  exampleDatasetKustoDatabase:
    type: azure:datashare:DatasetKustoDatabase
    properties:
      shareId: ${exampleShare.id}
      kustoDatabaseId: ${exampleDatabase.id}
    options:
      dependson:
        - ${exampleAssignment}

Create a DatasetKustoDatabase Resource

new DatasetKustoDatabase(name: string, args: DatasetKustoDatabaseArgs, opts?: CustomResourceOptions);
@overload
def DatasetKustoDatabase(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         kusto_database_id: Optional[str] = None,
                         name: Optional[str] = None,
                         share_id: Optional[str] = None)
@overload
def DatasetKustoDatabase(resource_name: str,
                         args: DatasetKustoDatabaseArgs,
                         opts: Optional[ResourceOptions] = None)
func NewDatasetKustoDatabase(ctx *Context, name string, args DatasetKustoDatabaseArgs, opts ...ResourceOption) (*DatasetKustoDatabase, error)
public DatasetKustoDatabase(string name, DatasetKustoDatabaseArgs args, CustomResourceOptions? opts = null)
public DatasetKustoDatabase(String name, DatasetKustoDatabaseArgs args)
public DatasetKustoDatabase(String name, DatasetKustoDatabaseArgs args, CustomResourceOptions options)
type: azure:datashare:DatasetKustoDatabase
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DatasetKustoDatabaseArgs
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 DatasetKustoDatabaseArgs
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 DatasetKustoDatabaseArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DatasetKustoDatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DatasetKustoDatabaseArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

DatasetKustoDatabase Resource Properties

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

Inputs

The DatasetKustoDatabase resource accepts the following input properties:

KustoDatabaseId string

The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.

ShareId string

The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.

Name string

The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.

KustoDatabaseId string

The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.

ShareId string

The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.

Name string

The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.

kustoDatabaseId String

The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.

shareId String

The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.

name String

The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.

kustoDatabaseId string

The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.

shareId string

The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.

name string

The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.

kusto_database_id str

The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.

share_id str

The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.

name str

The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.

kustoDatabaseId String

The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.

shareId String

The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.

name String

The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.

Outputs

All input properties are implicitly available as output properties. Additionally, the DatasetKustoDatabase resource produces the following output properties:

DisplayName string

The name of the Data Share Dataset.

Id string

The provider-assigned unique ID for this managed resource.

KustoClusterLocation string

The location of the Kusto Cluster.

DisplayName string

The name of the Data Share Dataset.

Id string

The provider-assigned unique ID for this managed resource.

KustoClusterLocation string

The location of the Kusto Cluster.

displayName String

The name of the Data Share Dataset.

id String

The provider-assigned unique ID for this managed resource.

kustoClusterLocation String

The location of the Kusto Cluster.

displayName string

The name of the Data Share Dataset.

id string

The provider-assigned unique ID for this managed resource.

kustoClusterLocation string

The location of the Kusto Cluster.

display_name str

The name of the Data Share Dataset.

id str

The provider-assigned unique ID for this managed resource.

kusto_cluster_location str

The location of the Kusto Cluster.

displayName String

The name of the Data Share Dataset.

id String

The provider-assigned unique ID for this managed resource.

kustoClusterLocation String

The location of the Kusto Cluster.

Look up an Existing DatasetKustoDatabase Resource

Get an existing DatasetKustoDatabase 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?: DatasetKustoDatabaseState, opts?: CustomResourceOptions): DatasetKustoDatabase
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        display_name: Optional[str] = None,
        kusto_cluster_location: Optional[str] = None,
        kusto_database_id: Optional[str] = None,
        name: Optional[str] = None,
        share_id: Optional[str] = None) -> DatasetKustoDatabase
func GetDatasetKustoDatabase(ctx *Context, name string, id IDInput, state *DatasetKustoDatabaseState, opts ...ResourceOption) (*DatasetKustoDatabase, error)
public static DatasetKustoDatabase Get(string name, Input<string> id, DatasetKustoDatabaseState? state, CustomResourceOptions? opts = null)
public static DatasetKustoDatabase get(String name, Output<String> id, DatasetKustoDatabaseState 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.
The following state arguments are supported:
DisplayName string

The name of the Data Share Dataset.

KustoClusterLocation string

The location of the Kusto Cluster.

KustoDatabaseId string

The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.

Name string

The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.

ShareId string

The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.

DisplayName string

The name of the Data Share Dataset.

KustoClusterLocation string

The location of the Kusto Cluster.

KustoDatabaseId string

The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.

Name string

The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.

ShareId string

The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.

displayName String

The name of the Data Share Dataset.

kustoClusterLocation String

The location of the Kusto Cluster.

kustoDatabaseId String

The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.

name String

The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.

shareId String

The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.

displayName string

The name of the Data Share Dataset.

kustoClusterLocation string

The location of the Kusto Cluster.

kustoDatabaseId string

The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.

name string

The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.

shareId string

The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.

display_name str

The name of the Data Share Dataset.

kusto_cluster_location str

The location of the Kusto Cluster.

kusto_database_id str

The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.

name str

The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.

share_id str

The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.

displayName String

The name of the Data Share Dataset.

kustoClusterLocation String

The location of the Kusto Cluster.

kustoDatabaseId String

The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.

name String

The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.

shareId String

The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.

Import

Data Share Kusto Database Datasets can be imported using the resource id, e.g.

 $ pulumi import azure:datashare/datasetKustoDatabase:DatasetKustoDatabase example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataShare/accounts/account1/shares/share1/dataSets/dataSet1

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.