getCluster

Use this data source to access information about an existing HDInsight Cluster.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.hdinsight.getCluster({
name: "example",
resourceGroupName: "example-resources",
});
export const httpsEndpoint = example.then(example => example.httpsEndpoint);
export const clusterId = example.then(example => example.clusterId);
import pulumi
import pulumi_azure as azure
example = azure.hdinsight.get_cluster(name="example",
resource_group_name="example-resources")
pulumi.export("httpsEndpoint", example.https_endpoint)
pulumi.export("clusterId", example.cluster_id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.HDInsight.GetCluster.Invoke(new()
{
Name = "example",
ResourceGroupName = "example-resources",
});
return new Dictionary<string, object?>
{
["httpsEndpoint"] = example.Apply(getClusterResult => getClusterResult.HttpsEndpoint),
["clusterId"] = example.Apply(getClusterResult => getClusterResult.ClusterId),
};
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/hdinsight"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := hdinsight.GetCluster(ctx, &hdinsight.GetClusterArgs{
Name: "example",
ResourceGroupName: "example-resources",
}, nil)
if err != nil {
return err
}
ctx.Export("httpsEndpoint", example.HttpsEndpoint)
ctx.Export("clusterId", example.ClusterId)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.hdinsight.HdinsightFunctions;
import com.pulumi.azure.hdinsight.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 = HdinsightFunctions.getCluster(GetClusterArgs.builder()
.name("example")
.resourceGroupName("example-resources")
.build());
ctx.export("httpsEndpoint", example.applyValue(getClusterResult -> getClusterResult.httpsEndpoint()));
ctx.export("clusterId", example.applyValue(getClusterResult -> getClusterResult.clusterId()));
}
}
variables:
example:
fn::invoke:
function: azure:hdinsight:getCluster
arguments:
name: example
resourceGroupName: example-resources
outputs:
httpsEndpoint: ${example.httpsEndpoint}
clusterId: ${example.clusterId}

Return

A collection of values returned by getCluster.

Parameters

argument

A collection of arguments for invoking getCluster.


suspend fun getCluster(name: String, resourceGroupName: String): GetClusterResult

Return

A collection of values returned by getCluster.

Parameters

name

Specifies the name of this HDInsight Cluster.

resourceGroupName

Specifies the name of the Resource Group in which this HDInsight Cluster exists.

See also


suspend fun getCluster(argument: suspend GetClusterPlainArgsBuilder.() -> Unit): GetClusterResult

Return

A collection of values returned by getCluster.

Parameters

argument

Builder for com.pulumi.azure.hdinsight.kotlin.inputs.GetClusterPlainArgs.

See also