1. Packages
  2. Azure Classic
  3. API Docs
  4. hdinsight
  5. getCluster

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.hdinsight.getCluster

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    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)
    
    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
    	})
    }
    
    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 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}
    

    Using getCluster

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getCluster(args: GetClusterArgs, opts?: InvokeOptions): Promise<GetClusterResult>
    function getClusterOutput(args: GetClusterOutputArgs, opts?: InvokeOptions): Output<GetClusterResult>
    def get_cluster(name: Optional[str] = None,
                    resource_group_name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetClusterResult
    def get_cluster_output(name: Optional[pulumi.Input[str]] = None,
                    resource_group_name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetClusterResult]
    func GetCluster(ctx *Context, args *GetClusterArgs, opts ...InvokeOption) (*GetClusterResult, error)
    func GetClusterOutput(ctx *Context, args *GetClusterOutputArgs, opts ...InvokeOption) GetClusterResultOutput

    > Note: This function is named GetCluster in the Go SDK.

    public static class GetCluster 
    {
        public static Task<GetClusterResult> InvokeAsync(GetClusterArgs args, InvokeOptions? opts = null)
        public static Output<GetClusterResult> Invoke(GetClusterInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetClusterResult> getCluster(GetClusterArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:hdinsight/getCluster:getCluster
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Specifies the name of this HDInsight Cluster.
    ResourceGroupName string
    Specifies the name of the Resource Group in which this HDInsight Cluster exists.
    Name string
    Specifies the name of this HDInsight Cluster.
    ResourceGroupName string
    Specifies the name of the Resource Group in which this HDInsight Cluster exists.
    name String
    Specifies the name of this HDInsight Cluster.
    resourceGroupName String
    Specifies the name of the Resource Group in which this HDInsight Cluster exists.
    name string
    Specifies the name of this HDInsight Cluster.
    resourceGroupName string
    Specifies the name of the Resource Group in which this HDInsight Cluster exists.
    name str
    Specifies the name of this HDInsight Cluster.
    resource_group_name str
    Specifies the name of the Resource Group in which this HDInsight Cluster exists.
    name String
    Specifies the name of this HDInsight Cluster.
    resourceGroupName String
    Specifies the name of the Resource Group in which this HDInsight Cluster exists.

    getCluster Result

    The following output properties are available:

    ClusterId string
    The HDInsight Cluster ID.
    ClusterVersion string
    The version of HDInsights which is used on this HDInsight Cluster.
    ComponentVersions Dictionary<string, string>
    A map of versions of software used on this HDInsights Cluster.
    EdgeSshEndpoint string
    The SSH Endpoint of the Edge Node for this HDInsight Cluster, if an Edge Node exists.
    Gateways List<GetClusterGateway>
    A gateway block as defined below.
    HttpsEndpoint string
    The HTTPS Endpoint for this HDInsight Cluster.
    Id string
    The provider-assigned unique ID for this managed resource.
    KafkaRestProxyEndpoint string
    The Kafka Rest Proxy Endpoint for this HDInsight Cluster.
    Kind string
    The kind of HDInsight Cluster this is, such as a Spark or Storm cluster.
    Location string
    The Azure Region in which this HDInsight Cluster exists.
    Name string
    The HDInsight Cluster name.
    ResourceGroupName string
    SshEndpoint string
    The SSH Endpoint for this HDInsight Cluster.
    Tags Dictionary<string, string>
    A map of tags assigned to the HDInsight Cluster.
    Tier string
    The SKU / Tier of this HDInsight Cluster.
    TlsMinVersion string
    The minimal supported TLS version.
    ClusterId string
    The HDInsight Cluster ID.
    ClusterVersion string
    The version of HDInsights which is used on this HDInsight Cluster.
    ComponentVersions map[string]string
    A map of versions of software used on this HDInsights Cluster.
    EdgeSshEndpoint string
    The SSH Endpoint of the Edge Node for this HDInsight Cluster, if an Edge Node exists.
    Gateways []GetClusterGateway
    A gateway block as defined below.
    HttpsEndpoint string
    The HTTPS Endpoint for this HDInsight Cluster.
    Id string
    The provider-assigned unique ID for this managed resource.
    KafkaRestProxyEndpoint string
    The Kafka Rest Proxy Endpoint for this HDInsight Cluster.
    Kind string
    The kind of HDInsight Cluster this is, such as a Spark or Storm cluster.
    Location string
    The Azure Region in which this HDInsight Cluster exists.
    Name string
    The HDInsight Cluster name.
    ResourceGroupName string
    SshEndpoint string
    The SSH Endpoint for this HDInsight Cluster.
    Tags map[string]string
    A map of tags assigned to the HDInsight Cluster.
    Tier string
    The SKU / Tier of this HDInsight Cluster.
    TlsMinVersion string
    The minimal supported TLS version.
    clusterId String
    The HDInsight Cluster ID.
    clusterVersion String
    The version of HDInsights which is used on this HDInsight Cluster.
    componentVersions Map<String,String>
    A map of versions of software used on this HDInsights Cluster.
    edgeSshEndpoint String
    The SSH Endpoint of the Edge Node for this HDInsight Cluster, if an Edge Node exists.
    gateways List<GetClusterGateway>
    A gateway block as defined below.
    httpsEndpoint String
    The HTTPS Endpoint for this HDInsight Cluster.
    id String
    The provider-assigned unique ID for this managed resource.
    kafkaRestProxyEndpoint String
    The Kafka Rest Proxy Endpoint for this HDInsight Cluster.
    kind String
    The kind of HDInsight Cluster this is, such as a Spark or Storm cluster.
    location String
    The Azure Region in which this HDInsight Cluster exists.
    name String
    The HDInsight Cluster name.
    resourceGroupName String
    sshEndpoint String
    The SSH Endpoint for this HDInsight Cluster.
    tags Map<String,String>
    A map of tags assigned to the HDInsight Cluster.
    tier String
    The SKU / Tier of this HDInsight Cluster.
    tlsMinVersion String
    The minimal supported TLS version.
    clusterId string
    The HDInsight Cluster ID.
    clusterVersion string
    The version of HDInsights which is used on this HDInsight Cluster.
    componentVersions {[key: string]: string}
    A map of versions of software used on this HDInsights Cluster.
    edgeSshEndpoint string
    The SSH Endpoint of the Edge Node for this HDInsight Cluster, if an Edge Node exists.
    gateways GetClusterGateway[]
    A gateway block as defined below.
    httpsEndpoint string
    The HTTPS Endpoint for this HDInsight Cluster.
    id string
    The provider-assigned unique ID for this managed resource.
    kafkaRestProxyEndpoint string
    The Kafka Rest Proxy Endpoint for this HDInsight Cluster.
    kind string
    The kind of HDInsight Cluster this is, such as a Spark or Storm cluster.
    location string
    The Azure Region in which this HDInsight Cluster exists.
    name string
    The HDInsight Cluster name.
    resourceGroupName string
    sshEndpoint string
    The SSH Endpoint for this HDInsight Cluster.
    tags {[key: string]: string}
    A map of tags assigned to the HDInsight Cluster.
    tier string
    The SKU / Tier of this HDInsight Cluster.
    tlsMinVersion string
    The minimal supported TLS version.
    cluster_id str
    The HDInsight Cluster ID.
    cluster_version str
    The version of HDInsights which is used on this HDInsight Cluster.
    component_versions Mapping[str, str]
    A map of versions of software used on this HDInsights Cluster.
    edge_ssh_endpoint str
    The SSH Endpoint of the Edge Node for this HDInsight Cluster, if an Edge Node exists.
    gateways Sequence[GetClusterGateway]
    A gateway block as defined below.
    https_endpoint str
    The HTTPS Endpoint for this HDInsight Cluster.
    id str
    The provider-assigned unique ID for this managed resource.
    kafka_rest_proxy_endpoint str
    The Kafka Rest Proxy Endpoint for this HDInsight Cluster.
    kind str
    The kind of HDInsight Cluster this is, such as a Spark or Storm cluster.
    location str
    The Azure Region in which this HDInsight Cluster exists.
    name str
    The HDInsight Cluster name.
    resource_group_name str
    ssh_endpoint str
    The SSH Endpoint for this HDInsight Cluster.
    tags Mapping[str, str]
    A map of tags assigned to the HDInsight Cluster.
    tier str
    The SKU / Tier of this HDInsight Cluster.
    tls_min_version str
    The minimal supported TLS version.
    clusterId String
    The HDInsight Cluster ID.
    clusterVersion String
    The version of HDInsights which is used on this HDInsight Cluster.
    componentVersions Map<String>
    A map of versions of software used on this HDInsights Cluster.
    edgeSshEndpoint String
    The SSH Endpoint of the Edge Node for this HDInsight Cluster, if an Edge Node exists.
    gateways List<Property Map>
    A gateway block as defined below.
    httpsEndpoint String
    The HTTPS Endpoint for this HDInsight Cluster.
    id String
    The provider-assigned unique ID for this managed resource.
    kafkaRestProxyEndpoint String
    The Kafka Rest Proxy Endpoint for this HDInsight Cluster.
    kind String
    The kind of HDInsight Cluster this is, such as a Spark or Storm cluster.
    location String
    The Azure Region in which this HDInsight Cluster exists.
    name String
    The HDInsight Cluster name.
    resourceGroupName String
    sshEndpoint String
    The SSH Endpoint for this HDInsight Cluster.
    tags Map<String>
    A map of tags assigned to the HDInsight Cluster.
    tier String
    The SKU / Tier of this HDInsight Cluster.
    tlsMinVersion String
    The minimal supported TLS version.

    Supporting Types

    GetClusterGateway

    Enabled bool
    Is the Ambari Portal enabled?
    Password string
    The password used for the Ambari Portal.
    Username string
    The username used for the Ambari Portal.
    Enabled bool
    Is the Ambari Portal enabled?
    Password string
    The password used for the Ambari Portal.
    Username string
    The username used for the Ambari Portal.
    enabled Boolean
    Is the Ambari Portal enabled?
    password String
    The password used for the Ambari Portal.
    username String
    The username used for the Ambari Portal.
    enabled boolean
    Is the Ambari Portal enabled?
    password string
    The password used for the Ambari Portal.
    username string
    The username used for the Ambari Portal.
    enabled bool
    Is the Ambari Portal enabled?
    password str
    The password used for the Ambari Portal.
    username str
    The username used for the Ambari Portal.
    enabled Boolean
    Is the Ambari Portal enabled?
    password String
    The password used for the Ambari Portal.
    username String
    The username used for the Ambari Portal.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi