get Cluster
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);
Content copied to clipboard
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)
Content copied to clipboard
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),
};
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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()));
}
}
Content copied to clipboard
variables:
example:
fn::invoke:
function: azure:hdinsight:getCluster
arguments:
name: example
resourceGroupName: example-resources
outputs:
httpsEndpoint: ${example.httpsEndpoint}
clusterId: ${example.clusterId}
Content copied to clipboard
Return
A collection of values returned by getCluster.
Parameters
argument
A collection of arguments for invoking getCluster.
Return
A collection of values returned by getCluster.
Parameters
name
Specifies the name of this HDInsight Cluster.
resource Group Name
Specifies the name of the Resource Group in which this HDInsight Cluster exists.
See also
Return
A collection of values returned by getCluster.
Parameters
argument
Builder for com.pulumi.azure.hdinsight.kotlin.inputs.GetClusterPlainArgs.