# 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 GetKubernetesServiceVersionsResult:
    """
    A collection of values returned by getKubernetesServiceVersions.
    """
    def __init__(__self__, latest_version=None, location=None, version_prefix=None, versions=None, id=None):
        if latest_version and not isinstance(latest_version, str):
            raise TypeError("Expected argument 'latest_version' to be a str")
        __self__.latest_version = latest_version
        """
        The most recent version available.
        """
        if location and not isinstance(location, str):
            raise TypeError("Expected argument 'location' to be a str")
        __self__.location = location
        if version_prefix and not isinstance(version_prefix, str):
            raise TypeError("Expected argument 'version_prefix' to be a str")
        __self__.version_prefix = version_prefix
        if versions and not isinstance(versions, list):
            raise TypeError("Expected argument 'versions' to be a list")
        __self__.versions = versions
        """
        The list of all supported versions.
        """
        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 AwaitableGetKubernetesServiceVersionsResult(GetKubernetesServiceVersionsResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetKubernetesServiceVersionsResult(
            latest_version=self.latest_version,
            location=self.location,
            version_prefix=self.version_prefix,
            versions=self.versions,
            id=self.id)

def get_kubernetes_service_versions(location=None,version_prefix=None,opts=None):
    """
    Use this data source to retrieve the version of Kubernetes supported by Azure Kubernetes Service.
    
    :param str location: Specifies the location in which to query for versions.
    :param str version_prefix: A prefix filter for the versions of Kubernetes which should be returned; for example `1.` will return `1.9` to `1.14`, whereas `1.12` will return `1.12.2`.

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

    __args__['location'] = location
    __args__['versionPrefix'] = version_prefix
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = utilities.get_version()
    __ret__ = pulumi.runtime.invoke('azure:containerservice/getKubernetesServiceVersions:getKubernetesServiceVersions', __args__, opts=opts).value

    return AwaitableGetKubernetesServiceVersionsResult(
        latest_version=__ret__.get('latestVersion'),
        location=__ret__.get('location'),
        version_prefix=__ret__.get('versionPrefix'),
        versions=__ret__.get('versions'),
        id=__ret__.get('id'))
