<reponame>rhysmdnz/pulumi-alicloud-rhys-hacks// *** 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! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AliCloud.CS
{
    public static class GetKubernetesVersion
    {
        /// <summary>
        /// This data source provides the details of the Kubernetes version supported by ACK.
        /// 
        /// &gt; **NOTE:** Available in 1.170.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.CS.GetKubernetesVersion.Invoke(new()
        ///     {
        ///         ClusterType = "ManagedKubernetes",
        ///         KubernetesVersion = "1.22.3-aliyun.1",
        ///         Profile = "Default",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["metadata"] = @default.Apply(getKubernetesVersionResult =&gt; getKubernetesVersionResult).Apply(@default =&gt; @default.Apply(getKubernetesVersionResult =&gt; getKubernetesVersionResult.Metadatas)),
        ///     };
        /// });
        /// ```
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.CS.GetKubernetesVersion.Invoke(new()
        ///     {
        ///         ClusterType = "Kubernetes",
        ///         KubernetesVersion = "1.22.3-aliyun.1",
        ///         Profile = "Default",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["metadata"] = @default.Apply(getKubernetesVersionResult =&gt; getKubernetesVersionResult).Apply(@default =&gt; @default.Apply(getKubernetesVersionResult =&gt; getKubernetesVersionResult.Metadatas)),
        ///     };
        /// });
        /// ```
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.CS.GetKubernetesVersion.Invoke(new()
        ///     {
        ///         ClusterType = "ManagedKubernetes",
        ///         KubernetesVersion = "1.22.3-aliyun.1",
        ///         Profile = "Serverless",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["metadata"] = @default.Apply(getKubernetesVersionResult =&gt; getKubernetesVersionResult).Apply(@default =&gt; @default.Apply(getKubernetesVersionResult =&gt; getKubernetesVersionResult.Metadatas)),
        ///     };
        /// });
        /// ```
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.CS.GetKubernetesVersion.Invoke(new()
        ///     {
        ///         ClusterType = "ManagedKubernetes",
        ///         KubernetesVersion = "1.20.11-aliyunedge.1",
        ///         Profile = "Edge",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["metadata"] = @default.Apply(getKubernetesVersionResult =&gt; getKubernetesVersionResult).Apply(@default =&gt; @default.Apply(getKubernetesVersionResult =&gt; getKubernetesVersionResult.Metadatas)),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetKubernetesVersionResult> InvokeAsync(GetKubernetesVersionArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetKubernetesVersionResult>("alicloud:cs/getKubernetesVersion:getKubernetesVersion", args ?? new GetKubernetesVersionArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides the details of the Kubernetes version supported by ACK.
        /// 
        /// &gt; **NOTE:** Available in 1.170.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.CS.GetKubernetesVersion.Invoke(new()
        ///     {
        ///         ClusterType = "ManagedKubernetes",
        ///         KubernetesVersion = "1.22.3-aliyun.1",
        ///         Profile = "Default",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["metadata"] = @default.Apply(getKubernetesVersionResult =&gt; getKubernetesVersionResult).Apply(@default =&gt; @default.Apply(getKubernetesVersionResult =&gt; getKubernetesVersionResult.Metadatas)),
        ///     };
        /// });
        /// ```
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.CS.GetKubernetesVersion.Invoke(new()
        ///     {
        ///         ClusterType = "Kubernetes",
        ///         KubernetesVersion = "1.22.3-aliyun.1",
        ///         Profile = "Default",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["metadata"] = @default.Apply(getKubernetesVersionResult =&gt; getKubernetesVersionResult).Apply(@default =&gt; @default.Apply(getKubernetesVersionResult =&gt; getKubernetesVersionResult.Metadatas)),
        ///     };
        /// });
        /// ```
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.CS.GetKubernetesVersion.Invoke(new()
        ///     {
        ///         ClusterType = "ManagedKubernetes",
        ///         KubernetesVersion = "1.22.3-aliyun.1",
        ///         Profile = "Serverless",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["metadata"] = @default.Apply(getKubernetesVersionResult =&gt; getKubernetesVersionResult).Apply(@default =&gt; @default.Apply(getKubernetesVersionResult =&gt; getKubernetesVersionResult.Metadatas)),
        ///     };
        /// });
        /// ```
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.CS.GetKubernetesVersion.Invoke(new()
        ///     {
        ///         ClusterType = "ManagedKubernetes",
        ///         KubernetesVersion = "1.20.11-aliyunedge.1",
        ///         Profile = "Edge",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["metadata"] = @default.Apply(getKubernetesVersionResult =&gt; getKubernetesVersionResult).Apply(@default =&gt; @default.Apply(getKubernetesVersionResult =&gt; getKubernetesVersionResult.Metadatas)),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetKubernetesVersionResult> Invoke(GetKubernetesVersionInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetKubernetesVersionResult>("alicloud:cs/getKubernetesVersion:getKubernetesVersion", args ?? new GetKubernetesVersionInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetKubernetesVersionArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The type of cluster. Its valid value are `Kubernetes` and `ManagedKubernetes`.
        /// </summary>
        [Input("clusterType", required: true)]
        public string ClusterType { get; set; } = null!;

        /// <summary>
        /// The ACK released kubernetes version.
        /// </summary>
        [Input("kubernetesVersion")]
        public string? KubernetesVersion { get; set; }

        /// <summary>
        /// The profile of cluster. Its valid value are `Default`, `Serverless` and `Edge`.
        /// </summary>
        [Input("profile")]
        public string? Profile { get; set; }

        public GetKubernetesVersionArgs()
        {
        }
        public static new GetKubernetesVersionArgs Empty => new GetKubernetesVersionArgs();
    }

    public sealed class GetKubernetesVersionInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The type of cluster. Its valid value are `Kubernetes` and `ManagedKubernetes`.
        /// </summary>
        [Input("clusterType", required: true)]
        public Input<string> ClusterType { get; set; } = null!;

        /// <summary>
        /// The ACK released kubernetes version.
        /// </summary>
        [Input("kubernetesVersion")]
        public Input<string>? KubernetesVersion { get; set; }

        /// <summary>
        /// The profile of cluster. Its valid value are `Default`, `Serverless` and `Edge`.
        /// </summary>
        [Input("profile")]
        public Input<string>? Profile { get; set; }

        public GetKubernetesVersionInvokeArgs()
        {
        }
        public static new GetKubernetesVersionInvokeArgs Empty => new GetKubernetesVersionInvokeArgs();
    }


    [OutputType]
    public sealed class GetKubernetesVersionResult
    {
        public readonly string ClusterType;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string? KubernetesVersion;
        /// <summary>
        /// A list of metadata of kubernetes version.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetKubernetesVersionMetadataResult> Metadatas;
        public readonly string? Profile;

        [OutputConstructor]
        private GetKubernetesVersionResult(
            string clusterType,

            string id,

            string? kubernetesVersion,

            ImmutableArray<Outputs.GetKubernetesVersionMetadataResult> metadatas,

            string? profile)
        {
            ClusterType = clusterType;
            Id = id;
            KubernetesVersion = kubernetesVersion;
            Metadatas = metadatas;
            Profile = profile;
        }
    }
}
