Azure Classic

v5.19.0 published on Friday, Sep 16, 2022 by Pulumi

DatasetKustoCluster

Manages a Data Share Kusto Cluster Dataset.

Example Usage

using System.Collections.Generic;
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 exampleAssignment = new Azure.Authorization.Assignment("exampleAssignment", new()
    {
        Scope = exampleCluster.Id,
        RoleDefinitionName = "Contributor",
        PrincipalId = exampleAccount.Identity.Apply(identity => identity.PrincipalId),
    });

    var exampleDatasetKustoCluster = new Azure.DataShare.DatasetKustoCluster("exampleDatasetKustoCluster", new()
    {
        ShareId = exampleShare.Id,
        KustoClusterId = exampleCluster.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
		}
		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.NewDatasetKustoCluster(ctx, "exampleDatasetKustoCluster", &datashare.DatasetKustoClusterArgs{
			ShareId:        exampleShare.ID(),
			KustoClusterId: exampleCluster.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.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 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 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()        
            .shareId(exampleShare.id())
            .kustoClusterId(exampleCluster.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_assignment = azure.authorization.Assignment("exampleAssignment",
    scope=example_cluster.id,
    role_definition_name="Contributor",
    principal_id=example_account.identity.principal_id)
example_dataset_kusto_cluster = azure.datashare.DatasetKustoCluster("exampleDatasetKustoCluster",
    share_id=example_share.id,
    kusto_cluster_id=example_cluster.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 exampleAssignment = new azure.authorization.Assignment("exampleAssignment", {
    scope: exampleCluster.id,
    roleDefinitionName: "Contributor",
    principalId: exampleAccount.identity.apply(identity => identity.principalId),
});
const exampleDatasetKustoCluster = new azure.datashare.DatasetKustoCluster("exampleDatasetKustoCluster", {
    shareId: exampleShare.id,
    kustoClusterId: exampleCluster.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
  exampleAssignment:
    type: azure:authorization:Assignment
    properties:
      scope: ${exampleCluster.id}
      roleDefinitionName: Contributor
      principalId: ${exampleAccount.identity.principalId}
  exampleDatasetKustoCluster:
    type: azure:datashare:DatasetKustoCluster
    properties:
      shareId: ${exampleShare.id}
      kustoClusterId: ${exampleCluster.id}
    options:
      dependson:
        - ${exampleAssignment}

Create a DatasetKustoCluster Resource

new DatasetKustoCluster(name: string, args: DatasetKustoClusterArgs, opts?: CustomResourceOptions);
@overload
def DatasetKustoCluster(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        kusto_cluster_id: Optional[str] = None,
                        name: Optional[str] = None,
                        share_id: Optional[str] = None)
@overload
def DatasetKustoCluster(resource_name: str,
                        args: DatasetKustoClusterArgs,
                        opts: Optional[ResourceOptions] = 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.

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.

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:

KustoClusterId string

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.

ShareId 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.

KustoClusterId string

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.

ShareId 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.

kustoClusterId String

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.

shareId 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.

kustoClusterId string

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.

shareId 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_id str

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.

share_id 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.

kustoClusterId String

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.

shareId 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:

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 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.
The following state arguments are supported:
DisplayName string

The name of the Data Share Dataset.

KustoClusterId string

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.

KustoClusterLocation string

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.

ShareId 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.

DisplayName string

The name of the Data Share Dataset.

KustoClusterId string

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.

KustoClusterLocation string

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.

ShareId 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.

displayName String

The name of the Data Share Dataset.

kustoClusterId String

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.

kustoClusterLocation String

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.

shareId 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.

displayName string

The name of the Data Share Dataset.

kustoClusterId string

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.

kustoClusterLocation string

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.

shareId 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_id str

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

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.

share_id 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.

displayName String

The name of the Data Share Dataset.

kustoClusterId String

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.

kustoClusterLocation String

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.

shareId 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

Package Details

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

This Pulumi package is based on the azurerm Terraform Provider.