We recommend using Azure Native.
azure.datashare.DatasetKustoDatabase
Explore with Pulumi AI
Manages a Data Share Kusto Database Dataset.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
{
Location = "West Europe",
});
var exampleAccount = new Azure.DataShare.Account("exampleAccount", new()
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
Identity = new Azure.DataShare.Inputs.AccountIdentityArgs
{
Type = "SystemAssigned",
},
});
var exampleShare = new Azure.DataShare.Share("exampleShare", new()
{
AccountId = exampleAccount.Id,
Kind = "InPlace",
});
var exampleCluster = new Azure.Kusto.Cluster("exampleCluster", new()
{
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()
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
ClusterName = exampleCluster.Name,
});
var exampleAssignment = new Azure.Authorization.Assignment("exampleAssignment", new()
{
Scope = exampleCluster.Id,
RoleDefinitionName = "Contributor",
PrincipalId = exampleAccount.Identity.Apply(identity => identity.PrincipalId),
});
var exampleDatasetKustoDatabase = new Azure.DataShare.DatasetKustoDatabase("exampleDatasetKustoDatabase", new()
{
ShareId = exampleShare.Id,
KustoDatabaseId = exampleDatabase.Id,
}, new CustomResourceOptions
{
DependsOn = new[]
{
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.StringPtrOutput),
})
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 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.datashare.Account;
import com.pulumi.azure.datashare.AccountArgs;
import com.pulumi.azure.datashare.inputs.AccountIdentityArgs;
import com.pulumi.azure.datashare.Share;
import com.pulumi.azure.datashare.ShareArgs;
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.authorization.Assignment;
import com.pulumi.azure.authorization.AssignmentArgs;
import com.pulumi.azure.datashare.DatasetKustoDatabase;
import com.pulumi.azure.datashare.DatasetKustoDatabaseArgs;
import com.pulumi.resources.CustomResourceOptions;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.identity(AccountIdentityArgs.builder()
.type("SystemAssigned")
.build())
.build());
var exampleShare = new Share("exampleShare", ShareArgs.builder()
.accountId(exampleAccount.id())
.kind("InPlace")
.build());
var exampleCluster = new Cluster("exampleCluster", ClusterArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku(ClusterSkuArgs.builder()
.name("Dev(No SLA)_Standard_D11_v2")
.capacity(1)
.build())
.build());
var exampleDatabase = new Database("exampleDatabase", DatabaseArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.clusterName(exampleCluster.name())
.build());
var exampleAssignment = new Assignment("exampleAssignment", AssignmentArgs.builder()
.scope(exampleCluster.id())
.roleDefinitionName("Contributor")
.principalId(exampleAccount.identity().applyValue(identity -> identity.principalId()))
.build());
var exampleDatasetKustoDatabase = new DatasetKustoDatabase("exampleDatasetKustoDatabase", DatasetKustoDatabaseArgs.builder()
.shareId(exampleShare.id())
.kustoDatabaseId(exampleDatabase.id())
.build(), CustomResourceOptions.builder()
.dependsOn(exampleAssignment)
.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 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:
- Kusto
Database stringId 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.
- 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 stringId 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.
- 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 StringId 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.
- 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 stringId 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.
- 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_ strid 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.
- 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.
- kusto
Database StringId 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.
- 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:
- Display
Name string The name of the Data Share Dataset.
- Id string
The provider-assigned unique ID for this managed resource.
- Kusto
Cluster stringLocation The location of the Kusto Cluster.
- Display
Name string The name of the Data Share Dataset.
- Id string
The provider-assigned unique ID for this managed resource.
- Kusto
Cluster stringLocation The location of the Kusto Cluster.
- display
Name String The name of the Data Share Dataset.
- id String
The provider-assigned unique ID for this managed resource.
- kusto
Cluster StringLocation The location of the Kusto Cluster.
- display
Name string The name of the Data Share Dataset.
- id string
The provider-assigned unique ID for this managed resource.
- kusto
Cluster stringLocation 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_ strlocation The location of the Kusto Cluster.
- display
Name String The name of the Data Share Dataset.
- id String
The provider-assigned unique ID for this managed resource.
- kusto
Cluster StringLocation The location of the Kusto Cluster.
Look up 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.
- Display
Name string The name of the Data Share Dataset.
- Kusto
Cluster stringLocation The location of the Kusto Cluster.
- Kusto
Database stringId 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.
- 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 string The name of the Data Share Dataset.
- Kusto
Cluster stringLocation The location of the Kusto Cluster.
- Kusto
Database stringId 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.
- 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 String The name of the Data Share Dataset.
- kusto
Cluster StringLocation The location of the Kusto Cluster.
- kusto
Database StringId 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.
- 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 string The name of the Data Share Dataset.
- kusto
Cluster stringLocation The location of the Kusto Cluster.
- kusto
Database stringId 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.
- 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_ strlocation The location of the Kusto Cluster.
- kusto_
database_ strid 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.
- 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.
- display
Name String The name of the Data Share Dataset.
- kusto
Cluster StringLocation The location of the Kusto Cluster.
- kusto
Database StringId 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.
- 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
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.