We recommend using Azure Native.
azure.datashare.DatasetKustoCluster
Explore with Pulumi AI
Manages a Data Share Kusto Cluster Dataset.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleAccount = new azure.datashare.Account("example", {
name: "example-dsa",
location: example.location,
resourceGroupName: example.name,
identity: {
type: "SystemAssigned",
},
});
const exampleShare = new azure.datashare.Share("example", {
name: "example_ds",
accountId: exampleAccount.id,
kind: "InPlace",
});
const exampleCluster = new azure.kusto.Cluster("example", {
name: "examplekc",
location: example.location,
resourceGroupName: example.name,
sku: {
name: "Dev(No SLA)_Standard_D11_v2",
capacity: 1,
},
});
const exampleAssignment = new azure.authorization.Assignment("example", {
scope: exampleCluster.id,
roleDefinitionName: "Contributor",
principalId: exampleAccount.identity.apply(identity => identity.principalId),
});
const exampleDatasetKustoCluster = new azure.datashare.DatasetKustoCluster("example", {
name: "example-dskc",
shareId: exampleShare.id,
kustoClusterId: exampleCluster.id,
}, {
dependsOn: [exampleAssignment],
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_account = azure.datashare.Account("example",
name="example-dsa",
location=example.location,
resource_group_name=example.name,
identity={
"type": "SystemAssigned",
})
example_share = azure.datashare.Share("example",
name="example_ds",
account_id=example_account.id,
kind="InPlace")
example_cluster = azure.kusto.Cluster("example",
name="examplekc",
location=example.location,
resource_group_name=example.name,
sku={
"name": "Dev(No SLA)_Standard_D11_v2",
"capacity": 1,
})
example_assignment = azure.authorization.Assignment("example",
scope=example_cluster.id,
role_definition_name="Contributor",
principal_id=example_account.identity.principal_id)
example_dataset_kusto_cluster = azure.datashare.DatasetKustoCluster("example",
name="example-dskc",
share_id=example_share.id,
kusto_cluster_id=example_cluster.id,
opts = pulumi.ResourceOptions(depends_on=[example_assignment]))
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/datashare"
"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("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleAccount, err := datashare.NewAccount(ctx, "example", &datashare.AccountArgs{
Name: pulumi.String("example-dsa"),
Location: example.Location,
ResourceGroupName: example.Name,
Identity: &datashare.AccountIdentityArgs{
Type: pulumi.String("SystemAssigned"),
},
})
if err != nil {
return err
}
exampleShare, err := datashare.NewShare(ctx, "example", &datashare.ShareArgs{
Name: pulumi.String("example_ds"),
AccountId: exampleAccount.ID(),
Kind: pulumi.String("InPlace"),
})
if err != nil {
return err
}
exampleCluster, err := kusto.NewCluster(ctx, "example", &kusto.ClusterArgs{
Name: pulumi.String("examplekc"),
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
}
exampleAssignment, err := authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{
Scope: exampleCluster.ID(),
RoleDefinitionName: pulumi.String("Contributor"),
PrincipalId: pulumi.String(exampleAccount.Identity.ApplyT(func(identity datashare.AccountIdentity) (*string, error) {
return &identity.PrincipalId, nil
}).(pulumi.StringPtrOutput)),
})
if err != nil {
return err
}
_, err = datashare.NewDatasetKustoCluster(ctx, "example", &datashare.DatasetKustoClusterArgs{
Name: pulumi.String("example-dskc"),
ShareId: exampleShare.ID(),
KustoClusterId: exampleCluster.ID(),
}, pulumi.DependsOn([]pulumi.Resource{
exampleAssignment,
}))
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 = "example-resources",
Location = "West Europe",
});
var exampleAccount = new Azure.DataShare.Account("example", new()
{
Name = "example-dsa",
Location = example.Location,
ResourceGroupName = example.Name,
Identity = new Azure.DataShare.Inputs.AccountIdentityArgs
{
Type = "SystemAssigned",
},
});
var exampleShare = new Azure.DataShare.Share("example", new()
{
Name = "example_ds",
AccountId = exampleAccount.Id,
Kind = "InPlace",
});
var exampleCluster = new Azure.Kusto.Cluster("example", new()
{
Name = "examplekc",
Location = example.Location,
ResourceGroupName = example.Name,
Sku = new Azure.Kusto.Inputs.ClusterSkuArgs
{
Name = "Dev(No SLA)_Standard_D11_v2",
Capacity = 1,
},
});
var exampleAssignment = new Azure.Authorization.Assignment("example", new()
{
Scope = exampleCluster.Id,
RoleDefinitionName = "Contributor",
PrincipalId = exampleAccount.Identity.Apply(identity => identity.PrincipalId),
});
var exampleDatasetKustoCluster = new Azure.DataShare.DatasetKustoCluster("example", new()
{
Name = "example-dskc",
ShareId = exampleShare.Id,
KustoClusterId = exampleCluster.Id,
}, new CustomResourceOptions
{
DependsOn =
{
exampleAssignment,
},
});
});
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.authorization.Assignment;
import com.pulumi.azure.authorization.AssignmentArgs;
import com.pulumi.azure.datashare.DatasetKustoCluster;
import com.pulumi.azure.datashare.DatasetKustoClusterArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("example-dsa")
.location(example.location())
.resourceGroupName(example.name())
.identity(AccountIdentityArgs.builder()
.type("SystemAssigned")
.build())
.build());
var exampleShare = new Share("exampleShare", ShareArgs.builder()
.name("example_ds")
.accountId(exampleAccount.id())
.kind("InPlace")
.build());
var exampleCluster = new Cluster("exampleCluster", ClusterArgs.builder()
.name("examplekc")
.location(example.location())
.resourceGroupName(example.name())
.sku(ClusterSkuArgs.builder()
.name("Dev(No SLA)_Standard_D11_v2")
.capacity(1)
.build())
.build());
var exampleAssignment = new Assignment("exampleAssignment", AssignmentArgs.builder()
.scope(exampleCluster.id())
.roleDefinitionName("Contributor")
.principalId(exampleAccount.identity().applyValue(identity -> identity.principalId()))
.build());
var exampleDatasetKustoCluster = new DatasetKustoCluster("exampleDatasetKustoCluster", DatasetKustoClusterArgs.builder()
.name("example-dskc")
.shareId(exampleShare.id())
.kustoClusterId(exampleCluster.id())
.build(), CustomResourceOptions.builder()
.dependsOn(exampleAssignment)
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleAccount:
type: azure:datashare:Account
name: example
properties:
name: example-dsa
location: ${example.location}
resourceGroupName: ${example.name}
identity:
type: SystemAssigned
exampleShare:
type: azure:datashare:Share
name: example
properties:
name: example_ds
accountId: ${exampleAccount.id}
kind: InPlace
exampleCluster:
type: azure:kusto:Cluster
name: example
properties:
name: examplekc
location: ${example.location}
resourceGroupName: ${example.name}
sku:
name: Dev(No SLA)_Standard_D11_v2
capacity: 1
exampleAssignment:
type: azure:authorization:Assignment
name: example
properties:
scope: ${exampleCluster.id}
roleDefinitionName: Contributor
principalId: ${exampleAccount.identity.principalId}
exampleDatasetKustoCluster:
type: azure:datashare:DatasetKustoCluster
name: example
properties:
name: example-dskc
shareId: ${exampleShare.id}
kustoClusterId: ${exampleCluster.id}
options:
dependson:
- ${exampleAssignment}
Create DatasetKustoCluster Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DatasetKustoCluster(name: string, args: DatasetKustoClusterArgs, opts?: CustomResourceOptions);
@overload
def DatasetKustoCluster(resource_name: str,
args: DatasetKustoClusterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DatasetKustoCluster(resource_name: str,
opts: Optional[ResourceOptions] = None,
kusto_cluster_id: Optional[str] = None,
share_id: Optional[str] = None,
name: Optional[str] = None)
func NewDatasetKustoCluster(ctx *Context, name string, args DatasetKustoClusterArgs, opts ...ResourceOption) (*DatasetKustoCluster, error)
public DatasetKustoCluster(string name, DatasetKustoClusterArgs args, CustomResourceOptions? opts = null)
public DatasetKustoCluster(String name, DatasetKustoClusterArgs args)
public DatasetKustoCluster(String name, DatasetKustoClusterArgs args, CustomResourceOptions options)
type: azure:datashare:DatasetKustoCluster
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 DatasetKustoClusterArgs
- 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 DatasetKustoClusterArgs
- 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 DatasetKustoClusterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatasetKustoClusterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DatasetKustoClusterArgs
- 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 datasetKustoClusterResource = new Azure.DataShare.DatasetKustoCluster("datasetKustoClusterResource", new()
{
KustoClusterId = "string",
ShareId = "string",
Name = "string",
});
example, err := datashare.NewDatasetKustoCluster(ctx, "datasetKustoClusterResource", &datashare.DatasetKustoClusterArgs{
KustoClusterId: pulumi.String("string"),
ShareId: pulumi.String("string"),
Name: pulumi.String("string"),
})
var datasetKustoClusterResource = new DatasetKustoCluster("datasetKustoClusterResource", DatasetKustoClusterArgs.builder()
.kustoClusterId("string")
.shareId("string")
.name("string")
.build());
dataset_kusto_cluster_resource = azure.datashare.DatasetKustoCluster("datasetKustoClusterResource",
kusto_cluster_id="string",
share_id="string",
name="string")
const datasetKustoClusterResource = new azure.datashare.DatasetKustoCluster("datasetKustoClusterResource", {
kustoClusterId: "string",
shareId: "string",
name: "string",
});
type: azure:datashare:DatasetKustoCluster
properties:
kustoClusterId: string
name: string
shareId: string
DatasetKustoCluster 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 DatasetKustoCluster resource accepts the following input properties:
- Kusto
Cluster stringId - The resource ID of the Kusto Cluster to be shared with the receiver. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- string
- The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- Name string
- The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- Kusto
Cluster stringId - The resource ID of the Kusto Cluster to be shared with the receiver. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- string
- The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- Name string
- The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- kusto
Cluster StringId - The resource ID of the Kusto Cluster to be shared with the receiver. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- String
- The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- name String
- The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- kusto
Cluster stringId - The resource ID of the Kusto Cluster to be shared with the receiver. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- string
- The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- name string
- The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- kusto_
cluster_ strid - The resource ID of the Kusto Cluster to be shared with the receiver. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- str
- The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- name str
- The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- kusto
Cluster StringId - The resource ID of the Kusto Cluster to be shared with the receiver. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- String
- The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- name String
- The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the DatasetKustoCluster 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 DatasetKustoCluster Resource
Get an existing DatasetKustoCluster 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?: DatasetKustoClusterState, opts?: CustomResourceOptions): DatasetKustoCluster
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
display_name: Optional[str] = None,
kusto_cluster_id: Optional[str] = None,
kusto_cluster_location: Optional[str] = None,
name: Optional[str] = None,
share_id: Optional[str] = None) -> DatasetKustoCluster
func GetDatasetKustoCluster(ctx *Context, name string, id IDInput, state *DatasetKustoClusterState, opts ...ResourceOption) (*DatasetKustoCluster, error)
public static DatasetKustoCluster Get(string name, Input<string> id, DatasetKustoClusterState? state, CustomResourceOptions? opts = null)
public static DatasetKustoCluster get(String name, Output<String> id, DatasetKustoClusterState 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 stringId - The resource ID of the Kusto Cluster to be shared with the receiver. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- Kusto
Cluster stringLocation - The location of the Kusto Cluster.
- Name string
- The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- string
- The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- Display
Name string - The name of the Data Share Dataset.
- Kusto
Cluster stringId - The resource ID of the Kusto Cluster to be shared with the receiver. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- Kusto
Cluster stringLocation - The location of the Kusto Cluster.
- Name string
- The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- string
- The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- display
Name String - The name of the Data Share Dataset.
- kusto
Cluster StringId - The resource ID of the Kusto Cluster to be shared with the receiver. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- kusto
Cluster StringLocation - The location of the Kusto Cluster.
- name String
- The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- String
- The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- display
Name string - The name of the Data Share Dataset.
- kusto
Cluster stringId - The resource ID of the Kusto Cluster to be shared with the receiver. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- kusto
Cluster stringLocation - The location of the Kusto Cluster.
- name string
- The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- string
- The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- display_
name str - The name of the Data Share Dataset.
- kusto_
cluster_ strid - The resource ID of the Kusto Cluster to be shared with the receiver. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- kusto_
cluster_ strlocation - The location of the Kusto Cluster.
- name str
- The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- str
- The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- display
Name String - The name of the Data Share Dataset.
- kusto
Cluster StringId - The resource ID of the Kusto Cluster to be shared with the receiver. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- kusto
Cluster StringLocation - The location of the Kusto Cluster.
- name String
- The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
- String
- The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
Import
Data Share Kusto Cluster Datasets can be imported using the resource id
, e.g.
$ pulumi import azure:datashare/datasetKustoCluster:DatasetKustoCluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataShare/accounts/account1/shares/share1/dataSets/dataSet1
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.