// *** 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.Clb
{
    public static class GetListeners
    {
        /// <summary>
        /// Use this data source to query detailed information of CLB listener
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var foo = Output.Create(Tencentcloud.Clb.GetListeners.InvokeAsync(new Tencentcloud.Clb.GetListenersArgs
        ///         {
        ///             ClbId = "lb-k2zjp9lv",
        ///             ListenerId = "lbl-mwr6vbtv",
        ///             Port = 80,
        ///             Protocol = "TCP",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetListenersResult> InvokeAsync(GetListenersArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetListenersResult>("tencentcloud:Clb/getListeners:getListeners", args ?? new GetListenersArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to query detailed information of CLB listener
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var foo = Output.Create(Tencentcloud.Clb.GetListeners.InvokeAsync(new Tencentcloud.Clb.GetListenersArgs
        ///         {
        ///             ClbId = "lb-k2zjp9lv",
        ///             ListenerId = "lbl-mwr6vbtv",
        ///             Port = 80,
        ///             Protocol = "TCP",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetListenersResult> Invoke(GetListenersInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetListenersResult>("tencentcloud:Clb/getListeners:getListeners", args ?? new GetListenersInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetListenersArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Id of the CLB to be queried.
        /// </summary>
        [Input("clbId", required: true)]
        public string ClbId { get; set; } = null!;

        /// <summary>
        /// Id of the listener to be queried.
        /// </summary>
        [Input("listenerId")]
        public string? ListenerId { get; set; }

        /// <summary>
        /// Port of the CLB listener.
        /// </summary>
        [Input("port")]
        public int? Port { get; set; }

        /// <summary>
        /// Type of protocol within the listener, and available values are `TCP`, `UDP`, `HTTP`, `HTTPS` and `TCP_SSL`.
        /// </summary>
        [Input("protocol")]
        public string? Protocol { get; set; }

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

        public GetListenersArgs()
        {
        }
    }

    public sealed class GetListenersInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Id of the CLB to be queried.
        /// </summary>
        [Input("clbId", required: true)]
        public Input<string> ClbId { get; set; } = null!;

        /// <summary>
        /// Id of the listener to be queried.
        /// </summary>
        [Input("listenerId")]
        public Input<string>? ListenerId { get; set; }

        /// <summary>
        /// Port of the CLB listener.
        /// </summary>
        [Input("port")]
        public Input<int>? Port { get; set; }

        /// <summary>
        /// Type of protocol within the listener, and available values are `TCP`, `UDP`, `HTTP`, `HTTPS` and `TCP_SSL`.
        /// </summary>
        [Input("protocol")]
        public Input<string>? Protocol { get; set; }

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

        public GetListenersInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetListenersResult
    {
        /// <summary>
        /// ID of the CLB.
        /// </summary>
        public readonly string ClbId;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// ID of the listener.
        /// </summary>
        public readonly string? ListenerId;
        /// <summary>
        /// A list of listeners of cloud load balancers. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetListenersListenerListResult> ListenerLists;
        /// <summary>
        /// Port of the CLB listener.
        /// </summary>
        public readonly int? Port;
        /// <summary>
        /// Protocol of the listener. Available values are `HTTP`, `HTTPS`, `TCP`, `UDP`, `TCP_SSL`.
        /// </summary>
        public readonly string? Protocol;
        public readonly string? ResultOutputFile;

        [OutputConstructor]
        private GetListenersResult(
            string clbId,

            string id,

            string? listenerId,

            ImmutableArray<Outputs.GetListenersListenerListResult> listenerLists,

            int? port,

            string? protocol,

            string? resultOutputFile)
        {
            ClbId = clbId;
            Id = id;
            ListenerId = listenerId;
            ListenerLists = listenerLists;
            Port = port;
            Protocol = protocol;
            ResultOutputFile = resultOutputFile;
        }
    }
}
