![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azure.kusto.kotlin.KustoFunctions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.kusto.kotlin
import com.pulumi.azure.kusto.KustoFunctions.getClusterPlain
import com.pulumi.azure.kusto.KustoFunctions.getDatabasePlain
import com.pulumi.azure.kusto.kotlin.inputs.GetClusterPlainArgs
import com.pulumi.azure.kusto.kotlin.inputs.GetClusterPlainArgsBuilder
import com.pulumi.azure.kusto.kotlin.inputs.GetDatabasePlainArgs
import com.pulumi.azure.kusto.kotlin.inputs.GetDatabasePlainArgsBuilder
import com.pulumi.azure.kusto.kotlin.outputs.GetClusterResult
import com.pulumi.azure.kusto.kotlin.outputs.GetDatabaseResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.azure.kusto.kotlin.outputs.GetClusterResult.Companion.toKotlin as getClusterResultToKotlin
import com.pulumi.azure.kusto.kotlin.outputs.GetDatabaseResult.Companion.toKotlin as getDatabaseResultToKotlin
public object KustoFunctions {
/**
* Use this data source to access information about an existing Kusto (also known as Azure Data Explorer) Cluster
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.kusto.getCluster({
* name: "kustocluster",
* resourceGroupName: "test_resource_group",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.kusto.get_cluster(name="kustocluster",
* resource_group_name="test_resource_group")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.Kusto.GetCluster.Invoke(new()
* {
* Name = "kustocluster",
* ResourceGroupName = "test_resource_group",
* });
* });
* ```
* ```go
* package main
* import (
* "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 {
* _, err := kusto.LookupCluster(ctx, &kusto.LookupClusterArgs{
* Name: "kustocluster",
* ResourceGroupName: "test_resource_group",
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.kusto.KustoFunctions;
* import com.pulumi.azure.kusto.inputs.GetClusterArgs;
* 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) {
* final var example = KustoFunctions.getCluster(GetClusterArgs.builder()
* .name("kustocluster")
* .resourceGroupName("test_resource_group")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:kusto:getCluster
* Arguments:
* name: kustocluster
* resourceGroupName: test_resource_group
* ```
*
* @param argument A collection of arguments for invoking getCluster.
* @return A collection of values returned by getCluster.
*/
public suspend fun getCluster(argument: GetClusterPlainArgs): GetClusterResult =
getClusterResultToKotlin(getClusterPlain(argument.toJava()).await())
/**
* @see [getCluster].
* @param name Specifies the name of the Kusto Cluster.
* @param resourceGroupName The name of the Resource Group where the Kusto Cluster exists.
* @return A collection of values returned by getCluster.
*/
public suspend fun getCluster(name: String, resourceGroupName: String): GetClusterResult {
val argument = GetClusterPlainArgs(
name = name,
resourceGroupName = resourceGroupName,
)
return getClusterResultToKotlin(getClusterPlain(argument.toJava()).await())
}
/**
* @see [getCluster].
* @param argument Builder for [com.pulumi.azure.kusto.kotlin.inputs.GetClusterPlainArgs].
* @return A collection of values returned by getCluster.
*/
public suspend fun getCluster(argument: suspend GetClusterPlainArgsBuilder.() -> Unit): GetClusterResult {
val builder = GetClusterPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getClusterResultToKotlin(getClusterPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to access information about an existing Kusto Database
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.kusto.getDatabase({
* name: "my-kusto-database",
* resourceGroupName: "test_resource_group",
* clusterName: "test_cluster",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.kusto.get_database(name="my-kusto-database",
* resource_group_name="test_resource_group",
* cluster_name="test_cluster")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.Kusto.GetDatabase.Invoke(new()
* {
* Name = "my-kusto-database",
* ResourceGroupName = "test_resource_group",
* ClusterName = "test_cluster",
* });
* });
* ```
* ```go
* package main
* import (
* "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 {
* _, err := kusto.LookupDatabase(ctx, &kusto.LookupDatabaseArgs{
* Name: "my-kusto-database",
* ResourceGroupName: "test_resource_group",
* ClusterName: "test_cluster",
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.kusto.KustoFunctions;
* import com.pulumi.azure.kusto.inputs.GetDatabaseArgs;
* 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) {
* final var example = KustoFunctions.getDatabase(GetDatabaseArgs.builder()
* .name("my-kusto-database")
* .resourceGroupName("test_resource_group")
* .clusterName("test_cluster")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:kusto:getDatabase
* Arguments:
* name: my-kusto-database
* resourceGroupName: test_resource_group
* clusterName: test_cluster
* ```
*
* @param argument A collection of arguments for invoking getDatabase.
* @return A collection of values returned by getDatabase.
*/
public suspend fun getDatabase(argument: GetDatabasePlainArgs): GetDatabaseResult =
getDatabaseResultToKotlin(getDatabasePlain(argument.toJava()).await())
/**
* @see [getDatabase].
* @param clusterName The name of the Kusto Cluster this database is added to.
* @param name The name of the Kusto Database.
* @param resourceGroupName The Resource Group where the Kusto Database exists.
* @return A collection of values returned by getDatabase.
*/
public suspend fun getDatabase(
clusterName: String,
name: String,
resourceGroupName: String,
): GetDatabaseResult {
val argument = GetDatabasePlainArgs(
clusterName = clusterName,
name = name,
resourceGroupName = resourceGroupName,
)
return getDatabaseResultToKotlin(getDatabasePlain(argument.toJava()).await())
}
/**
* @see [getDatabase].
* @param argument Builder for [com.pulumi.azure.kusto.kotlin.inputs.GetDatabasePlainArgs].
* @return A collection of values returned by getDatabase.
*/
public suspend fun getDatabase(argument: suspend GetDatabasePlainArgsBuilder.() -> Unit): GetDatabaseResult {
val builder = GetDatabasePlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getDatabaseResultToKotlin(getDatabasePlain(builtArgument.toJava()).await())
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy