# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables

class GetClusterResult:
    """
    A collection of values returned by getCluster.
    """
    def __init__(__self__, cluster_version=None, component_versions=None, edge_ssh_endpoint=None, gateways=None, https_endpoint=None, id=None, kind=None, location=None, name=None, resource_group_name=None, ssh_endpoint=None, tags=None, tier=None, tls_min_version=None):
        if cluster_version and not isinstance(cluster_version, str):
            raise TypeError("Expected argument 'cluster_version' to be a str")
        __self__.cluster_version = cluster_version
        """
        The version of HDInsights which is used on this HDInsight Cluster.
        """
        if component_versions and not isinstance(component_versions, dict):
            raise TypeError("Expected argument 'component_versions' to be a dict")
        __self__.component_versions = component_versions
        """
        A map of versions of software used on this HDInsights Cluster.
        """
        if edge_ssh_endpoint and not isinstance(edge_ssh_endpoint, str):
            raise TypeError("Expected argument 'edge_ssh_endpoint' to be a str")
        __self__.edge_ssh_endpoint = edge_ssh_endpoint
        """
        The SSH Endpoint of the Edge Node for this HDInsight Cluster, if an Edge Node exists.
        """
        if gateways and not isinstance(gateways, list):
            raise TypeError("Expected argument 'gateways' to be a list")
        __self__.gateways = gateways
        """
        A `gateway` block as defined below.
        """
        if https_endpoint and not isinstance(https_endpoint, str):
            raise TypeError("Expected argument 'https_endpoint' to be a str")
        __self__.https_endpoint = https_endpoint
        """
        The HTTPS Endpoint for this HDInsight Cluster.
        """
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        __self__.id = id
        """
        The provider-assigned unique ID for this managed resource.
        """
        if kind and not isinstance(kind, str):
            raise TypeError("Expected argument 'kind' to be a str")
        __self__.kind = kind
        """
        The kind of HDInsight Cluster this is, such as a Spark or Storm cluster.
        """
        if location and not isinstance(location, str):
            raise TypeError("Expected argument 'location' to be a str")
        __self__.location = location
        """
        The Azure Region in which this HDInsight Cluster exists.
        """
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        __self__.name = name
        if resource_group_name and not isinstance(resource_group_name, str):
            raise TypeError("Expected argument 'resource_group_name' to be a str")
        __self__.resource_group_name = resource_group_name
        if ssh_endpoint and not isinstance(ssh_endpoint, str):
            raise TypeError("Expected argument 'ssh_endpoint' to be a str")
        __self__.ssh_endpoint = ssh_endpoint
        """
        The SSH Endpoint for this HDInsight Cluster.
        """
        if tags and not isinstance(tags, dict):
            raise TypeError("Expected argument 'tags' to be a dict")
        __self__.tags = tags
        """
        A map of tags assigned to the HDInsight Cluster.
        """
        if tier and not isinstance(tier, str):
            raise TypeError("Expected argument 'tier' to be a str")
        __self__.tier = tier
        """
        The SKU / Tier of this HDInsight Cluster.
        """
        if tls_min_version and not isinstance(tls_min_version, str):
            raise TypeError("Expected argument 'tls_min_version' to be a str")
        __self__.tls_min_version = tls_min_version
class AwaitableGetClusterResult(GetClusterResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetClusterResult(
            cluster_version=self.cluster_version,
            component_versions=self.component_versions,
            edge_ssh_endpoint=self.edge_ssh_endpoint,
            gateways=self.gateways,
            https_endpoint=self.https_endpoint,
            id=self.id,
            kind=self.kind,
            location=self.location,
            name=self.name,
            resource_group_name=self.resource_group_name,
            ssh_endpoint=self.ssh_endpoint,
            tags=self.tags,
            tier=self.tier,
            tls_min_version=self.tls_min_version)

def get_cluster(name=None,resource_group_name=None,opts=None):
    """
    Use this data source to access information about an existing HDInsight Cluster.

    ## Example Usage

    ```python
    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)
    ```


    :param str name: Specifies the name of this HDInsight Cluster.
    :param str resource_group_name: Specifies the name of the Resource Group in which this HDInsight Cluster exists.
    """
    __args__ = dict()


    __args__['name'] = name
    __args__['resourceGroupName'] = resource_group_name
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = utilities.get_version()
    __ret__ = pulumi.runtime.invoke('azure:hdinsight/getCluster:getCluster', __args__, opts=opts).value

    return AwaitableGetClusterResult(
        cluster_version=__ret__.get('clusterVersion'),
        component_versions=__ret__.get('componentVersions'),
        edge_ssh_endpoint=__ret__.get('edgeSshEndpoint'),
        gateways=__ret__.get('gateways'),
        https_endpoint=__ret__.get('httpsEndpoint'),
        id=__ret__.get('id'),
        kind=__ret__.get('kind'),
        location=__ret__.get('location'),
        name=__ret__.get('name'),
        resource_group_name=__ret__.get('resourceGroupName'),
        ssh_endpoint=__ret__.get('sshEndpoint'),
        tags=__ret__.get('tags'),
        tier=__ret__.get('tier'),
        tls_min_version=__ret__.get('tlsMinVersion'))
