# 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 json
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__, aks_config=None, annotations=None, cluster_auth_endpoint=None, cluster_monitoring_input=None, cluster_registration_token=None, cluster_template_answers=None, cluster_template_id=None, cluster_template_questions=None, cluster_template_revision_id=None, default_pod_security_policy_template_id=None, default_project_id=None, description=None, driver=None, eks_config=None, enable_cluster_alerting=None, enable_cluster_monitoring=None, enable_network_policy=None, gke_config=None, id=None, k3s_config=None, kube_config=None, labels=None, name=None, rke_config=None, scheduled_cluster_scans=None, system_project_id=None):
        if aks_config and not isinstance(aks_config, dict):
            raise TypeError("Expected argument 'aks_config' to be a dict")
        __self__.aks_config = aks_config
        """
        (Computed) The Azure aks configuration for `aks` Clusters. Conflicts with `eks_config`, `gke_config` and `rke_config` (list maxitems:1)
        """
        if annotations and not isinstance(annotations, dict):
            raise TypeError("Expected argument 'annotations' to be a dict")
        __self__.annotations = annotations
        """
        (Computed) Annotations for Node Pool object (map)
        """
        if cluster_auth_endpoint and not isinstance(cluster_auth_endpoint, dict):
            raise TypeError("Expected argument 'cluster_auth_endpoint' to be a dict")
        __self__.cluster_auth_endpoint = cluster_auth_endpoint
        """
        (Computed) Enabling the [local cluster authorized endpoint](https://rancher.com/docs/rancher/v2.x/en/cluster-provisioning/rke-clusters/options/#local-cluster-auth-endpoint) allows direct communication with the cluster, bypassing the Rancher API proxy. (list maxitems:1)
        """
        if cluster_monitoring_input and not isinstance(cluster_monitoring_input, dict):
            raise TypeError("Expected argument 'cluster_monitoring_input' to be a dict")
        __self__.cluster_monitoring_input = cluster_monitoring_input
        """
        (Computed) Cluster monitoring config (list maxitems:1)
        """
        if cluster_registration_token and not isinstance(cluster_registration_token, dict):
            raise TypeError("Expected argument 'cluster_registration_token' to be a dict")
        __self__.cluster_registration_token = cluster_registration_token
        """
        (Computed) Cluster Registration Token generated for the cluster (list maxitems:1)
        """
        if cluster_template_answers and not isinstance(cluster_template_answers, dict):
            raise TypeError("Expected argument 'cluster_template_answers' to be a dict")
        __self__.cluster_template_answers = cluster_template_answers
        """
        (Computed) Cluster template answers (list maxitems:1)
        """
        if cluster_template_id and not isinstance(cluster_template_id, str):
            raise TypeError("Expected argument 'cluster_template_id' to be a str")
        __self__.cluster_template_id = cluster_template_id
        """
        (Computed) Cluster template ID (string)
        """
        if cluster_template_questions and not isinstance(cluster_template_questions, list):
            raise TypeError("Expected argument 'cluster_template_questions' to be a list")
        __self__.cluster_template_questions = cluster_template_questions
        """
        (Computed) Cluster template questions (list)
        """
        if cluster_template_revision_id and not isinstance(cluster_template_revision_id, str):
            raise TypeError("Expected argument 'cluster_template_revision_id' to be a str")
        __self__.cluster_template_revision_id = cluster_template_revision_id
        """
        (Computed) Cluster template revision ID (string)
        """
        if default_pod_security_policy_template_id and not isinstance(default_pod_security_policy_template_id, str):
            raise TypeError("Expected argument 'default_pod_security_policy_template_id' to be a str")
        __self__.default_pod_security_policy_template_id = default_pod_security_policy_template_id
        """
        (Optional/Computed) [Default pod security policy template id](https://rancher.com/docs/rancher/v2.x/en/cluster-provisioning/rke-clusters/options/#pod-security-policy-support) (string)
        """
        if default_project_id and not isinstance(default_project_id, str):
            raise TypeError("Expected argument 'default_project_id' to be a str")
        __self__.default_project_id = default_project_id
        """
        (Computed) Default project ID for the cluster (string)
        """
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        __self__.description = description
        """
        (Computed) The description for Cluster (string)
        """
        if driver and not isinstance(driver, str):
            raise TypeError("Expected argument 'driver' to be a str")
        __self__.driver = driver
        """
        (Computed) The driver used for the Cluster. `imported`, `azurekubernetesservice`, `amazonelasticcontainerservice`, `googlekubernetesengine` and `rancherKubernetesEngine` are supported (string)
        """
        if eks_config and not isinstance(eks_config, dict):
            raise TypeError("Expected argument 'eks_config' to be a dict")
        __self__.eks_config = eks_config
        """
        (Computed) The Amazon eks configuration for `eks` Clusters. Conflicts with `aks_config`, `gke_config` and `rke_config` (list maxitems:1)
        """
        if enable_cluster_alerting and not isinstance(enable_cluster_alerting, bool):
            raise TypeError("Expected argument 'enable_cluster_alerting' to be a bool")
        __self__.enable_cluster_alerting = enable_cluster_alerting
        if enable_cluster_monitoring and not isinstance(enable_cluster_monitoring, bool):
            raise TypeError("Expected argument 'enable_cluster_monitoring' to be a bool")
        __self__.enable_cluster_monitoring = enable_cluster_monitoring
        """
        (Computed) Enable built-in cluster monitoring. Default `false` (bool)
        """
        if enable_network_policy and not isinstance(enable_network_policy, bool):
            raise TypeError("Expected argument 'enable_network_policy' to be a bool")
        __self__.enable_network_policy = enable_network_policy
        """
        (Computed) Enable project network isolation. Default `false` (bool)
        """
        if gke_config and not isinstance(gke_config, dict):
            raise TypeError("Expected argument 'gke_config' to be a dict")
        __self__.gke_config = gke_config
        """
        (Computed) The Google gke configuration for `gke` Clusters. Conflicts with `aks_config`, `eks_config` and `rke_config` (list maxitems:1)
        """
        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 k3s_config and not isinstance(k3s_config, dict):
            raise TypeError("Expected argument 'k3s_config' to be a dict")
        __self__.k3s_config = k3s_config
        """
        (Computed) The K3S configuration for `k3s` imported Clusters. Conflicts with `aks_config`, `eks_config`, `gke_config` and `rke_config` (list maxitems:1)
        """
        if kube_config and not isinstance(kube_config, str):
            raise TypeError("Expected argument 'kube_config' to be a str")
        __self__.kube_config = kube_config
        """
        (Computed) Kube Config generated for the cluster (string)
        """
        if labels and not isinstance(labels, dict):
            raise TypeError("Expected argument 'labels' to be a dict")
        __self__.labels = labels
        """
        (Computed) Labels for Node Pool object (map)
        """
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        __self__.name = name
        if rke_config and not isinstance(rke_config, dict):
            raise TypeError("Expected argument 'rke_config' to be a dict")
        __self__.rke_config = rke_config
        """
        (Computed) The RKE configuration for `rke` Clusters. Conflicts with `aks_config`, `eks_config` and `gke_config` (list maxitems:1)
        """
        if scheduled_cluster_scans and not isinstance(scheduled_cluster_scans, list):
            raise TypeError("Expected argument 'scheduled_cluster_scans' to be a list")
        __self__.scheduled_cluster_scans = scheduled_cluster_scans
        if system_project_id and not isinstance(system_project_id, str):
            raise TypeError("Expected argument 'system_project_id' to be a str")
        __self__.system_project_id = system_project_id
        """
        (Computed) System project ID for the cluster (string)
        """
class AwaitableGetClusterResult(GetClusterResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetClusterResult(
            aks_config=self.aks_config,
            annotations=self.annotations,
            cluster_auth_endpoint=self.cluster_auth_endpoint,
            cluster_monitoring_input=self.cluster_monitoring_input,
            cluster_registration_token=self.cluster_registration_token,
            cluster_template_answers=self.cluster_template_answers,
            cluster_template_id=self.cluster_template_id,
            cluster_template_questions=self.cluster_template_questions,
            cluster_template_revision_id=self.cluster_template_revision_id,
            default_pod_security_policy_template_id=self.default_pod_security_policy_template_id,
            default_project_id=self.default_project_id,
            description=self.description,
            driver=self.driver,
            eks_config=self.eks_config,
            enable_cluster_alerting=self.enable_cluster_alerting,
            enable_cluster_monitoring=self.enable_cluster_monitoring,
            enable_network_policy=self.enable_network_policy,
            gke_config=self.gke_config,
            id=self.id,
            k3s_config=self.k3s_config,
            kube_config=self.kube_config,
            labels=self.labels,
            name=self.name,
            rke_config=self.rke_config,
            scheduled_cluster_scans=self.scheduled_cluster_scans,
            system_project_id=self.system_project_id)

def get_cluster(name=None,opts=None):
    """
    Use this data source to retrieve information about a Rancher v2 cluster.




    :param str name: The name of the Cluster (string)
    """
    __args__ = dict()


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

    return AwaitableGetClusterResult(
        aks_config=__ret__.get('aksConfig'),
        annotations=__ret__.get('annotations'),
        cluster_auth_endpoint=__ret__.get('clusterAuthEndpoint'),
        cluster_monitoring_input=__ret__.get('clusterMonitoringInput'),
        cluster_registration_token=__ret__.get('clusterRegistrationToken'),
        cluster_template_answers=__ret__.get('clusterTemplateAnswers'),
        cluster_template_id=__ret__.get('clusterTemplateId'),
        cluster_template_questions=__ret__.get('clusterTemplateQuestions'),
        cluster_template_revision_id=__ret__.get('clusterTemplateRevisionId'),
        default_pod_security_policy_template_id=__ret__.get('defaultPodSecurityPolicyTemplateId'),
        default_project_id=__ret__.get('defaultProjectId'),
        description=__ret__.get('description'),
        driver=__ret__.get('driver'),
        eks_config=__ret__.get('eksConfig'),
        enable_cluster_alerting=__ret__.get('enableClusterAlerting'),
        enable_cluster_monitoring=__ret__.get('enableClusterMonitoring'),
        enable_network_policy=__ret__.get('enableNetworkPolicy'),
        gke_config=__ret__.get('gkeConfig'),
        id=__ret__.get('id'),
        k3s_config=__ret__.get('k3sConfig'),
        kube_config=__ret__.get('kubeConfig'),
        labels=__ret__.get('labels'),
        name=__ret__.get('name'),
        rke_config=__ret__.get('rkeConfig'),
        scheduled_cluster_scans=__ret__.get('scheduledClusterScans'),
        system_project_id=__ret__.get('systemProjectId'))
