<filename>sdk/dotnet/CS/GetKubernetesAddons.cs// *** 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 GetKubernetesAddons
    {
        /// <summary>
        /// This data source provides a list of available addons that the cluster can install.
        /// 
        /// &gt; **NOTE:** Available in 1.150.0+.
        /// &gt; **NOTE:** From version 1.166.0, support for returning custom configuration of kubernetes cluster addon.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.CS.GetKubernetesAddons.Invoke(new()
        ///     {
        ///         ClusterId = alicloud_cs_managed_kubernetes.Default[0].Id,
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["addons"] = @default.Apply(getKubernetesAddonsResult =&gt; getKubernetesAddonsResult).Apply(@default =&gt; @default.Apply(getKubernetesAddonsResult =&gt; getKubernetesAddonsResult.Addons)),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetKubernetesAddonsResult> InvokeAsync(GetKubernetesAddonsArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetKubernetesAddonsResult>("alicloud:cs/getKubernetesAddons:getKubernetesAddons", args ?? new GetKubernetesAddonsArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides a list of available addons that the cluster can install.
        /// 
        /// &gt; **NOTE:** Available in 1.150.0+.
        /// &gt; **NOTE:** From version 1.166.0, support for returning custom configuration of kubernetes cluster addon.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.CS.GetKubernetesAddons.Invoke(new()
        ///     {
        ///         ClusterId = alicloud_cs_managed_kubernetes.Default[0].Id,
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["addons"] = @default.Apply(getKubernetesAddonsResult =&gt; getKubernetesAddonsResult).Apply(@default =&gt; @default.Apply(getKubernetesAddonsResult =&gt; getKubernetesAddonsResult.Addons)),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetKubernetesAddonsResult> Invoke(GetKubernetesAddonsInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetKubernetesAddonsResult>("alicloud:cs/getKubernetesAddons:getKubernetesAddons", args ?? new GetKubernetesAddonsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetKubernetesAddonsArgs : global::Pulumi.InvokeArgs
    {
        [Input("addons")]
        private List<Inputs.GetKubernetesAddonsAddonArgs>? _addons;

        /// <summary>
        /// A list of addons.
        /// </summary>
        public List<Inputs.GetKubernetesAddonsAddonArgs> Addons
        {
            get => _addons ?? (_addons = new List<Inputs.GetKubernetesAddonsAddonArgs>());
            set => _addons = value;
        }

        /// <summary>
        /// The id of kubernetes cluster.
        /// </summary>
        [Input("clusterId", required: true)]
        public string ClusterId { get; set; } = null!;

        [Input("ids")]
        private List<string>? _ids;

        /// <summary>
        /// A list of addon IDs. The id of addon consists of the cluster id and the addon name, with the structure &lt;cluster_ud&gt;:&lt;addon_name&gt;.
        /// </summary>
        public List<string> Ids
        {
            get => _ids ?? (_ids = new List<string>());
            set => _ids = value;
        }

        /// <summary>
        /// A regex string to filter results by addon name.
        /// </summary>
        [Input("nameRegex")]
        public string? NameRegex { get; set; }

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

    public sealed class GetKubernetesAddonsInvokeArgs : global::Pulumi.InvokeArgs
    {
        [Input("addons")]
        private InputList<Inputs.GetKubernetesAddonsAddonInputArgs>? _addons;

        /// <summary>
        /// A list of addons.
        /// </summary>
        public InputList<Inputs.GetKubernetesAddonsAddonInputArgs> Addons
        {
            get => _addons ?? (_addons = new InputList<Inputs.GetKubernetesAddonsAddonInputArgs>());
            set => _addons = value;
        }

        /// <summary>
        /// The id of kubernetes cluster.
        /// </summary>
        [Input("clusterId", required: true)]
        public Input<string> ClusterId { get; set; } = null!;

        [Input("ids")]
        private InputList<string>? _ids;

        /// <summary>
        /// A list of addon IDs. The id of addon consists of the cluster id and the addon name, with the structure &lt;cluster_ud&gt;:&lt;addon_name&gt;.
        /// </summary>
        public InputList<string> Ids
        {
            get => _ids ?? (_ids = new InputList<string>());
            set => _ids = value;
        }

        /// <summary>
        /// A regex string to filter results by addon name.
        /// </summary>
        [Input("nameRegex")]
        public Input<string>? NameRegex { get; set; }

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


    [OutputType]
    public sealed class GetKubernetesAddonsResult
    {
        /// <summary>
        /// A list of addons.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetKubernetesAddonsAddonResult> Addons;
        /// <summary>
        /// The id of kubernetes cluster.
        /// </summary>
        public readonly string ClusterId;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<string> Ids;
        public readonly string? NameRegex;
        /// <summary>
        /// A list of addon names.
        /// </summary>
        public readonly ImmutableArray<string> Names;

        [OutputConstructor]
        private GetKubernetesAddonsResult(
            ImmutableArray<Outputs.GetKubernetesAddonsAddonResult> addons,

            string clusterId,

            string id,

            ImmutableArray<string> ids,

            string? nameRegex,

            ImmutableArray<string> names)
        {
            Addons = addons;
            ClusterId = clusterId;
            Id = id;
            Ids = ids;
            NameRegex = nameRegex;
            Names = names;
        }
    }
}
