// *** 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;
using Pulumi;

namespace TencentCloudIAC.PulumiPackage.Tencentcloud.Kubernetes
{
    public static class GetClusterCommonNames
    {
        /// <summary>
        /// Provide a datasource to query cluster CommonNames.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var foo = Output.Create(Tencentcloud.Kubernetes.GetClusterCommonNames.InvokeAsync(new Tencentcloud.Kubernetes.GetClusterCommonNamesArgs
        ///         {
        ///             ClusterId = "cls-12345678",
        ///             SubaccountUins = 
        ///             {
        ///                 "1234567890",
        ///                 "0987654321",
        ///             },
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetClusterCommonNamesResult> InvokeAsync(GetClusterCommonNamesArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetClusterCommonNamesResult>("tencentcloud:Kubernetes/getClusterCommonNames:getClusterCommonNames", args ?? new GetClusterCommonNamesArgs(), options.WithDefaults());

        /// <summary>
        /// Provide a datasource to query cluster CommonNames.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var foo = Output.Create(Tencentcloud.Kubernetes.GetClusterCommonNames.InvokeAsync(new Tencentcloud.Kubernetes.GetClusterCommonNamesArgs
        ///         {
        ///             ClusterId = "cls-12345678",
        ///             SubaccountUins = 
        ///             {
        ///                 "1234567890",
        ///                 "0987654321",
        ///             },
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetClusterCommonNamesResult> Invoke(GetClusterCommonNamesInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetClusterCommonNamesResult>("tencentcloud:Kubernetes/getClusterCommonNames:getClusterCommonNames", args ?? new GetClusterCommonNamesInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetClusterCommonNamesArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Cluster ID.
        /// </summary>
        [Input("clusterId")]
        public string? ClusterId { get; set; }

        /// <summary>
        /// Used for save result.
        /// </summary>
        [Input("resultOutputFile")]
        public string? ResultOutputFile { get; set; }

        [Input("roleIds")]
        private List<string>? _roleIds;

        /// <summary>
        /// List of Role ID. Up to 50 sub-accounts can be passed in at a time.
        /// </summary>
        public List<string> RoleIds
        {
            get => _roleIds ?? (_roleIds = new List<string>());
            set => _roleIds = value;
        }

        [Input("subaccountUins")]
        private List<string>? _subaccountUins;

        /// <summary>
        /// List of sub-account. Up to 50 sub-accounts can be passed in at a time.
        /// </summary>
        public List<string> SubaccountUins
        {
            get => _subaccountUins ?? (_subaccountUins = new List<string>());
            set => _subaccountUins = value;
        }

        public GetClusterCommonNamesArgs()
        {
        }
    }

    public sealed class GetClusterCommonNamesInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Cluster ID.
        /// </summary>
        [Input("clusterId")]
        public Input<string>? ClusterId { get; set; }

        /// <summary>
        /// Used for save result.
        /// </summary>
        [Input("resultOutputFile")]
        public Input<string>? ResultOutputFile { get; set; }

        [Input("roleIds")]
        private InputList<string>? _roleIds;

        /// <summary>
        /// List of Role ID. Up to 50 sub-accounts can be passed in at a time.
        /// </summary>
        public InputList<string> RoleIds
        {
            get => _roleIds ?? (_roleIds = new InputList<string>());
            set => _roleIds = value;
        }

        [Input("subaccountUins")]
        private InputList<string>? _subaccountUins;

        /// <summary>
        /// List of sub-account. Up to 50 sub-accounts can be passed in at a time.
        /// </summary>
        public InputList<string> SubaccountUins
        {
            get => _subaccountUins ?? (_subaccountUins = new InputList<string>());
            set => _subaccountUins = value;
        }

        public GetClusterCommonNamesInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetClusterCommonNamesResult
    {
        public readonly string? ClusterId;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// List of the CommonName in the certificate of the client corresponding to the sub-account UIN.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetClusterCommonNamesListResult> Lists;
        public readonly string? ResultOutputFile;
        public readonly ImmutableArray<string> RoleIds;
        public readonly ImmutableArray<string> SubaccountUins;

        [OutputConstructor]
        private GetClusterCommonNamesResult(
            string? clusterId,

            string id,

            ImmutableArray<Outputs.GetClusterCommonNamesListResult> lists,

            string? resultOutputFile,

            ImmutableArray<string> roleIds,

            ImmutableArray<string> subaccountUins)
        {
            ClusterId = clusterId;
            Id = id;
            Lists = lists;
            ResultOutputFile = resultOutputFile;
            RoleIds = roleIds;
            SubaccountUins = subaccountUins;
        }
    }
}
