<filename>sdk/dotnet/Tencentcloud/Gaap/GetRealservers.cs<gh_stars>0// *** 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.Gaap
{
    public static class GetRealservers
    {
        /// <summary>
        /// Use this data source to query gaap realservers.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var fooRealserver = new Tencentcloud.Gaap.Realserver("fooRealserver", new Tencentcloud.Gaap.RealserverArgs
        ///         {
        ///             Ip = "1.1.1.1",
        ///         });
        ///         var fooRealservers = fooRealserver.Ip.Apply(ip =&gt; Tencentcloud.Gaap.GetRealservers.Invoke(new Tencentcloud.Gaap.GetRealserversInvokeArgs
        ///         {
        ///             Ip = ip,
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetRealserversResult> InvokeAsync(GetRealserversArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetRealserversResult>("tencentcloud:Gaap/getRealservers:getRealservers", args ?? new GetRealserversArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to query gaap realservers.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var fooRealserver = new Tencentcloud.Gaap.Realserver("fooRealserver", new Tencentcloud.Gaap.RealserverArgs
        ///         {
        ///             Ip = "1.1.1.1",
        ///         });
        ///         var fooRealservers = fooRealserver.Ip.Apply(ip =&gt; Tencentcloud.Gaap.GetRealservers.Invoke(new Tencentcloud.Gaap.GetRealserversInvokeArgs
        ///         {
        ///             Ip = ip,
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetRealserversResult> Invoke(GetRealserversInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetRealserversResult>("tencentcloud:Gaap/getRealservers:getRealservers", args ?? new GetRealserversInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetRealserversArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Domain of the GAAP realserver to be queried, conflict with `ip`.
        /// </summary>
        [Input("domain")]
        public string? Domain { get; set; }

        /// <summary>
        /// IP of the GAAP realserver to be queried, conflict with `domain`.
        /// </summary>
        [Input("ip")]
        public string? Ip { get; set; }

        /// <summary>
        /// Name of the GAAP realserver to be queried, the maximum length is 30.
        /// </summary>
        [Input("name")]
        public string? Name { get; set; }

        /// <summary>
        /// ID of the project within the GAAP realserver to be queried, default value is `-1`, no set means all projects.
        /// </summary>
        [Input("projectId")]
        public int? ProjectId { get; set; }

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

        [Input("tags")]
        private Dictionary<string, object>? _tags;

        /// <summary>
        /// Tags of the GAAP proxy to be queried. Support up to 5, display the information as long as it matches one.
        /// </summary>
        public Dictionary<string, object> Tags
        {
            get => _tags ?? (_tags = new Dictionary<string, object>());
            set => _tags = value;
        }

        public GetRealserversArgs()
        {
        }
    }

    public sealed class GetRealserversInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Domain of the GAAP realserver to be queried, conflict with `ip`.
        /// </summary>
        [Input("domain")]
        public Input<string>? Domain { get; set; }

        /// <summary>
        /// IP of the GAAP realserver to be queried, conflict with `domain`.
        /// </summary>
        [Input("ip")]
        public Input<string>? Ip { get; set; }

        /// <summary>
        /// Name of the GAAP realserver to be queried, the maximum length is 30.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// ID of the project within the GAAP realserver to be queried, default value is `-1`, no set means all projects.
        /// </summary>
        [Input("projectId")]
        public Input<int>? ProjectId { get; set; }

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

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// Tags of the GAAP proxy to be queried. Support up to 5, display the information as long as it matches one.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        public GetRealserversInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetRealserversResult
    {
        /// <summary>
        /// Domain of the GAAP realserver.
        /// </summary>
        public readonly string? Domain;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// IP of the GAAP realserver.
        /// </summary>
        public readonly string? Ip;
        /// <summary>
        /// Name of the GAAP realserver.
        /// </summary>
        public readonly string? Name;
        /// <summary>
        /// ID of the project within the GAAP realserver.
        /// </summary>
        public readonly int? ProjectId;
        /// <summary>
        /// An information list of GAAP realserver. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetRealserversRealserverResult> GaapRealservers;
        public readonly string? ResultOutputFile;
        /// <summary>
        /// Tags of the GAAP realserver.
        /// </summary>
        public readonly ImmutableDictionary<string, object>? Tags;

        [OutputConstructor]
        private GetRealserversResult(
            string? domain,

            string id,

            string? ip,

            string? name,

            int? projectId,

            ImmutableArray<Outputs.GetRealserversRealserverResult> realservers,

            string? resultOutputFile,

            ImmutableDictionary<string, object>? tags)
        {
            Domain = domain;
            Id = id;
            Ip = ip;
            Name = name;
            ProjectId = projectId;
            GaapRealservers = realservers;
            ResultOutputFile = resultOutputFile;
            Tags = tags;
        }
    }
}
