# 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__, additional_zones=None, addons_configs=None, authenticator_groups_configs=None, cluster_autoscalings=None, cluster_ipv4_cidr=None, database_encryptions=None, default_max_pods_per_node=None, description=None, enable_binary_authorization=None, enable_intranode_visibility=None, enable_kubernetes_alpha=None, enable_legacy_abac=None, enable_shielded_nodes=None, enable_tpu=None, endpoint=None, initial_node_count=None, instance_group_urls=None, ip_allocation_policies=None, location=None, logging_service=None, maintenance_policies=None, master_auths=None, master_authorized_networks_configs=None, master_version=None, min_master_version=None, monitoring_service=None, name=None, network=None, network_policies=None, node_configs=None, node_locations=None, node_pools=None, node_version=None, pod_security_policy_configs=None, private_cluster_configs=None, project=None, region=None, release_channels=None, remove_default_node_pool=None, resource_labels=None, resource_usage_export_configs=None, services_ipv4_cidr=None, subnetwork=None, tpu_ipv4_cidr_block=None, vertical_pod_autoscalings=None, workload_identity_configs=None, zone=None, id=None):
        if additional_zones and not isinstance(additional_zones, list):
            raise TypeError("Expected argument 'additional_zones' to be a list")
        __self__.additional_zones = additional_zones
        if addons_configs and not isinstance(addons_configs, list):
            raise TypeError("Expected argument 'addons_configs' to be a list")
        __self__.addons_configs = addons_configs
        if authenticator_groups_configs and not isinstance(authenticator_groups_configs, list):
            raise TypeError("Expected argument 'authenticator_groups_configs' to be a list")
        __self__.authenticator_groups_configs = authenticator_groups_configs
        if cluster_autoscalings and not isinstance(cluster_autoscalings, list):
            raise TypeError("Expected argument 'cluster_autoscalings' to be a list")
        __self__.cluster_autoscalings = cluster_autoscalings
        if cluster_ipv4_cidr and not isinstance(cluster_ipv4_cidr, str):
            raise TypeError("Expected argument 'cluster_ipv4_cidr' to be a str")
        __self__.cluster_ipv4_cidr = cluster_ipv4_cidr
        if database_encryptions and not isinstance(database_encryptions, list):
            raise TypeError("Expected argument 'database_encryptions' to be a list")
        __self__.database_encryptions = database_encryptions
        if default_max_pods_per_node and not isinstance(default_max_pods_per_node, float):
            raise TypeError("Expected argument 'default_max_pods_per_node' to be a float")
        __self__.default_max_pods_per_node = default_max_pods_per_node
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        __self__.description = description
        if enable_binary_authorization and not isinstance(enable_binary_authorization, bool):
            raise TypeError("Expected argument 'enable_binary_authorization' to be a bool")
        __self__.enable_binary_authorization = enable_binary_authorization
        if enable_intranode_visibility and not isinstance(enable_intranode_visibility, bool):
            raise TypeError("Expected argument 'enable_intranode_visibility' to be a bool")
        __self__.enable_intranode_visibility = enable_intranode_visibility
        if enable_kubernetes_alpha and not isinstance(enable_kubernetes_alpha, bool):
            raise TypeError("Expected argument 'enable_kubernetes_alpha' to be a bool")
        __self__.enable_kubernetes_alpha = enable_kubernetes_alpha
        if enable_legacy_abac and not isinstance(enable_legacy_abac, bool):
            raise TypeError("Expected argument 'enable_legacy_abac' to be a bool")
        __self__.enable_legacy_abac = enable_legacy_abac
        if enable_shielded_nodes and not isinstance(enable_shielded_nodes, bool):
            raise TypeError("Expected argument 'enable_shielded_nodes' to be a bool")
        __self__.enable_shielded_nodes = enable_shielded_nodes
        if enable_tpu and not isinstance(enable_tpu, bool):
            raise TypeError("Expected argument 'enable_tpu' to be a bool")
        __self__.enable_tpu = enable_tpu
        if endpoint and not isinstance(endpoint, str):
            raise TypeError("Expected argument 'endpoint' to be a str")
        __self__.endpoint = endpoint
        if initial_node_count and not isinstance(initial_node_count, float):
            raise TypeError("Expected argument 'initial_node_count' to be a float")
        __self__.initial_node_count = initial_node_count
        if instance_group_urls and not isinstance(instance_group_urls, list):
            raise TypeError("Expected argument 'instance_group_urls' to be a list")
        __self__.instance_group_urls = instance_group_urls
        if ip_allocation_policies and not isinstance(ip_allocation_policies, list):
            raise TypeError("Expected argument 'ip_allocation_policies' to be a list")
        __self__.ip_allocation_policies = ip_allocation_policies
        if location and not isinstance(location, str):
            raise TypeError("Expected argument 'location' to be a str")
        __self__.location = location
        if logging_service and not isinstance(logging_service, str):
            raise TypeError("Expected argument 'logging_service' to be a str")
        __self__.logging_service = logging_service
        if maintenance_policies and not isinstance(maintenance_policies, list):
            raise TypeError("Expected argument 'maintenance_policies' to be a list")
        __self__.maintenance_policies = maintenance_policies
        if master_auths and not isinstance(master_auths, list):
            raise TypeError("Expected argument 'master_auths' to be a list")
        __self__.master_auths = master_auths
        if master_authorized_networks_configs and not isinstance(master_authorized_networks_configs, list):
            raise TypeError("Expected argument 'master_authorized_networks_configs' to be a list")
        __self__.master_authorized_networks_configs = master_authorized_networks_configs
        if master_version and not isinstance(master_version, str):
            raise TypeError("Expected argument 'master_version' to be a str")
        __self__.master_version = master_version
        if min_master_version and not isinstance(min_master_version, str):
            raise TypeError("Expected argument 'min_master_version' to be a str")
        __self__.min_master_version = min_master_version
        if monitoring_service and not isinstance(monitoring_service, str):
            raise TypeError("Expected argument 'monitoring_service' to be a str")
        __self__.monitoring_service = monitoring_service
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        __self__.name = name
        if network and not isinstance(network, str):
            raise TypeError("Expected argument 'network' to be a str")
        __self__.network = network
        if network_policies and not isinstance(network_policies, list):
            raise TypeError("Expected argument 'network_policies' to be a list")
        __self__.network_policies = network_policies
        if node_configs and not isinstance(node_configs, list):
            raise TypeError("Expected argument 'node_configs' to be a list")
        __self__.node_configs = node_configs
        if node_locations and not isinstance(node_locations, list):
            raise TypeError("Expected argument 'node_locations' to be a list")
        __self__.node_locations = node_locations
        if node_pools and not isinstance(node_pools, list):
            raise TypeError("Expected argument 'node_pools' to be a list")
        __self__.node_pools = node_pools
        if node_version and not isinstance(node_version, str):
            raise TypeError("Expected argument 'node_version' to be a str")
        __self__.node_version = node_version
        if pod_security_policy_configs and not isinstance(pod_security_policy_configs, list):
            raise TypeError("Expected argument 'pod_security_policy_configs' to be a list")
        __self__.pod_security_policy_configs = pod_security_policy_configs
        if private_cluster_configs and not isinstance(private_cluster_configs, list):
            raise TypeError("Expected argument 'private_cluster_configs' to be a list")
        __self__.private_cluster_configs = private_cluster_configs
        if project and not isinstance(project, str):
            raise TypeError("Expected argument 'project' to be a str")
        __self__.project = project
        if region and not isinstance(region, str):
            raise TypeError("Expected argument 'region' to be a str")
        __self__.region = region
        if release_channels and not isinstance(release_channels, list):
            raise TypeError("Expected argument 'release_channels' to be a list")
        __self__.release_channels = release_channels
        if remove_default_node_pool and not isinstance(remove_default_node_pool, bool):
            raise TypeError("Expected argument 'remove_default_node_pool' to be a bool")
        __self__.remove_default_node_pool = remove_default_node_pool
        if resource_labels and not isinstance(resource_labels, dict):
            raise TypeError("Expected argument 'resource_labels' to be a dict")
        __self__.resource_labels = resource_labels
        if resource_usage_export_configs and not isinstance(resource_usage_export_configs, list):
            raise TypeError("Expected argument 'resource_usage_export_configs' to be a list")
        __self__.resource_usage_export_configs = resource_usage_export_configs
        if services_ipv4_cidr and not isinstance(services_ipv4_cidr, str):
            raise TypeError("Expected argument 'services_ipv4_cidr' to be a str")
        __self__.services_ipv4_cidr = services_ipv4_cidr
        if subnetwork and not isinstance(subnetwork, str):
            raise TypeError("Expected argument 'subnetwork' to be a str")
        __self__.subnetwork = subnetwork
        if tpu_ipv4_cidr_block and not isinstance(tpu_ipv4_cidr_block, str):
            raise TypeError("Expected argument 'tpu_ipv4_cidr_block' to be a str")
        __self__.tpu_ipv4_cidr_block = tpu_ipv4_cidr_block
        if vertical_pod_autoscalings and not isinstance(vertical_pod_autoscalings, list):
            raise TypeError("Expected argument 'vertical_pod_autoscalings' to be a list")
        __self__.vertical_pod_autoscalings = vertical_pod_autoscalings
        if workload_identity_configs and not isinstance(workload_identity_configs, list):
            raise TypeError("Expected argument 'workload_identity_configs' to be a list")
        __self__.workload_identity_configs = workload_identity_configs
        if zone and not isinstance(zone, str):
            raise TypeError("Expected argument 'zone' to be a str")
        __self__.zone = zone
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        __self__.id = id
        """
        id is the provider-assigned unique ID for this managed resource.
        """
class AwaitableGetClusterResult(GetClusterResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetClusterResult(
            additional_zones=self.additional_zones,
            addons_configs=self.addons_configs,
            authenticator_groups_configs=self.authenticator_groups_configs,
            cluster_autoscalings=self.cluster_autoscalings,
            cluster_ipv4_cidr=self.cluster_ipv4_cidr,
            database_encryptions=self.database_encryptions,
            default_max_pods_per_node=self.default_max_pods_per_node,
            description=self.description,
            enable_binary_authorization=self.enable_binary_authorization,
            enable_intranode_visibility=self.enable_intranode_visibility,
            enable_kubernetes_alpha=self.enable_kubernetes_alpha,
            enable_legacy_abac=self.enable_legacy_abac,
            enable_shielded_nodes=self.enable_shielded_nodes,
            enable_tpu=self.enable_tpu,
            endpoint=self.endpoint,
            initial_node_count=self.initial_node_count,
            instance_group_urls=self.instance_group_urls,
            ip_allocation_policies=self.ip_allocation_policies,
            location=self.location,
            logging_service=self.logging_service,
            maintenance_policies=self.maintenance_policies,
            master_auths=self.master_auths,
            master_authorized_networks_configs=self.master_authorized_networks_configs,
            master_version=self.master_version,
            min_master_version=self.min_master_version,
            monitoring_service=self.monitoring_service,
            name=self.name,
            network=self.network,
            network_policies=self.network_policies,
            node_configs=self.node_configs,
            node_locations=self.node_locations,
            node_pools=self.node_pools,
            node_version=self.node_version,
            pod_security_policy_configs=self.pod_security_policy_configs,
            private_cluster_configs=self.private_cluster_configs,
            project=self.project,
            region=self.region,
            release_channels=self.release_channels,
            remove_default_node_pool=self.remove_default_node_pool,
            resource_labels=self.resource_labels,
            resource_usage_export_configs=self.resource_usage_export_configs,
            services_ipv4_cidr=self.services_ipv4_cidr,
            subnetwork=self.subnetwork,
            tpu_ipv4_cidr_block=self.tpu_ipv4_cidr_block,
            vertical_pod_autoscalings=self.vertical_pod_autoscalings,
            workload_identity_configs=self.workload_identity_configs,
            zone=self.zone,
            id=self.id)

def get_cluster(location=None,name=None,project=None,region=None,zone=None,opts=None):
    """
    Get info about a GKE cluster from its name and location.
    
    :param str location: The location (zone or region) this cluster has been
           created in. One of `location`, `region`, `zone`, or a provider-level `zone` must
           be specified.
    :param str name: The name of the cluster.
    :param str project: The project in which the resource belongs. If it
           is not provided, the provider project is used.
    :param str region: The region this cluster has been created in. Deprecated
           in favour of `location`.
    :param str zone: The zone this cluster has been created in. Deprecated in
           favour of `location`.

    > This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/d/container_cluster.html.markdown.
    """
    __args__ = dict()

    __args__['location'] = location
    __args__['name'] = name
    __args__['project'] = project
    __args__['region'] = region
    __args__['zone'] = zone
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = utilities.get_version()
    __ret__ = pulumi.runtime.invoke('gcp:container/getCluster:getCluster', __args__, opts=opts).value

    return AwaitableGetClusterResult(
        additional_zones=__ret__.get('additionalZones'),
        addons_configs=__ret__.get('addonsConfigs'),
        authenticator_groups_configs=__ret__.get('authenticatorGroupsConfigs'),
        cluster_autoscalings=__ret__.get('clusterAutoscalings'),
        cluster_ipv4_cidr=__ret__.get('clusterIpv4Cidr'),
        database_encryptions=__ret__.get('databaseEncryptions'),
        default_max_pods_per_node=__ret__.get('defaultMaxPodsPerNode'),
        description=__ret__.get('description'),
        enable_binary_authorization=__ret__.get('enableBinaryAuthorization'),
        enable_intranode_visibility=__ret__.get('enableIntranodeVisibility'),
        enable_kubernetes_alpha=__ret__.get('enableKubernetesAlpha'),
        enable_legacy_abac=__ret__.get('enableLegacyAbac'),
        enable_shielded_nodes=__ret__.get('enableShieldedNodes'),
        enable_tpu=__ret__.get('enableTpu'),
        endpoint=__ret__.get('endpoint'),
        initial_node_count=__ret__.get('initialNodeCount'),
        instance_group_urls=__ret__.get('instanceGroupUrls'),
        ip_allocation_policies=__ret__.get('ipAllocationPolicies'),
        location=__ret__.get('location'),
        logging_service=__ret__.get('loggingService'),
        maintenance_policies=__ret__.get('maintenancePolicies'),
        master_auths=__ret__.get('masterAuths'),
        master_authorized_networks_configs=__ret__.get('masterAuthorizedNetworksConfigs'),
        master_version=__ret__.get('masterVersion'),
        min_master_version=__ret__.get('minMasterVersion'),
        monitoring_service=__ret__.get('monitoringService'),
        name=__ret__.get('name'),
        network=__ret__.get('network'),
        network_policies=__ret__.get('networkPolicies'),
        node_configs=__ret__.get('nodeConfigs'),
        node_locations=__ret__.get('nodeLocations'),
        node_pools=__ret__.get('nodePools'),
        node_version=__ret__.get('nodeVersion'),
        pod_security_policy_configs=__ret__.get('podSecurityPolicyConfigs'),
        private_cluster_configs=__ret__.get('privateClusterConfigs'),
        project=__ret__.get('project'),
        region=__ret__.get('region'),
        release_channels=__ret__.get('releaseChannels'),
        remove_default_node_pool=__ret__.get('removeDefaultNodePool'),
        resource_labels=__ret__.get('resourceLabels'),
        resource_usage_export_configs=__ret__.get('resourceUsageExportConfigs'),
        services_ipv4_cidr=__ret__.get('servicesIpv4Cidr'),
        subnetwork=__ret__.get('subnetwork'),
        tpu_ipv4_cidr_block=__ret__.get('tpuIpv4CidrBlock'),
        vertical_pod_autoscalings=__ret__.get('verticalPodAutoscalings'),
        workload_identity_configs=__ret__.get('workloadIdentityConfigs'),
        zone=__ret__.get('zone'),
        id=__ret__.get('id'))
