com.pulumi.azure.datashare.DatasetKustoCluster Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azure.datashare;
import com.pulumi.azure.Utilities;
import com.pulumi.azure.datashare.DatasetKustoClusterArgs;
import com.pulumi.azure.datashare.inputs.DatasetKustoClusterState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import javax.annotation.Nullable;
/**
* Manages a Data Share Kusto Cluster Dataset.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Data Share Kusto Cluster Datasets can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:datashare/datasetKustoCluster:DatasetKustoCluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataShare/accounts/account1/shares/share1/dataSets/dataSet1
* ```
*
*/
@ResourceType(type="azure:datashare/datasetKustoCluster:DatasetKustoCluster")
public class DatasetKustoCluster extends com.pulumi.resources.CustomResource {
/**
* The name of the Data Share Dataset.
*
*/
@Export(name="displayName", refs={String.class}, tree="[0]")
private Output displayName;
/**
* @return The name of the Data Share Dataset.
*
*/
public Output displayName() {
return this.displayName;
}
/**
* 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.
*
*/
@Export(name="kustoClusterId", refs={String.class}, tree="[0]")
private Output kustoClusterId;
/**
* @return 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.
*
*/
public Output kustoClusterId() {
return this.kustoClusterId;
}
/**
* The location of the Kusto Cluster.
*
*/
@Export(name="kustoClusterLocation", refs={String.class}, tree="[0]")
private Output kustoClusterLocation;
/**
* @return The location of the Kusto Cluster.
*
*/
public Output kustoClusterLocation() {
return this.kustoClusterLocation;
}
/**
* 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.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return 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.
*
*/
public Output name() {
return this.name;
}
/**
* 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.
*
*/
@Export(name="shareId", refs={String.class}, tree="[0]")
private Output shareId;
/**
* @return 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.
*
*/
public Output shareId() {
return this.shareId;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public DatasetKustoCluster(java.lang.String name) {
this(name, DatasetKustoClusterArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public DatasetKustoCluster(java.lang.String name, DatasetKustoClusterArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public DatasetKustoCluster(java.lang.String name, DatasetKustoClusterArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:datashare/datasetKustoCluster:DatasetKustoCluster", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private DatasetKustoCluster(java.lang.String name, Output id, @Nullable DatasetKustoClusterState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:datashare/datasetKustoCluster:DatasetKustoCluster", name, state, makeResourceOptions(options, id), false);
}
private static DatasetKustoClusterArgs makeArgs(DatasetKustoClusterArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? DatasetKustoClusterArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static DatasetKustoCluster get(java.lang.String name, Output id, @Nullable DatasetKustoClusterState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new DatasetKustoCluster(name, id, state, options);
}
}