// *** 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 GetDomainErrorPages
    {
        /// <summary>
        /// Use this data source to query custom GAAP HTTP domain error page info list.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var fooProxy = new Tencentcloud.Gaap.Proxy("fooProxy", new Tencentcloud.Gaap.ProxyArgs
        ///         {
        ///             Bandwidth = 10,
        ///             Concurrent = 2,
        ///             AccessRegion = "SouthChina",
        ///             RealserverRegion = "NorthChina",
        ///         });
        ///         var fooLayer7Listener = new Tencentcloud.Gaap.Layer7Listener("fooLayer7Listener", new Tencentcloud.Gaap.Layer7ListenerArgs
        ///         {
        ///             Protocol = "HTTP",
        ///             Port = 80,
        ///             ProxyId = "%s",
        ///         });
        ///         var fooHttpDomain = new Tencentcloud.Gaap.HttpDomain("fooHttpDomain", new Tencentcloud.Gaap.HttpDomainArgs
        ///         {
        ///             ListenerId = fooLayer7Listener.Id,
        ///             Domain = "www.qq.com",
        ///         });
        ///         var fooDomainErrorPage = new Tencentcloud.Gaap.DomainErrorPage("fooDomainErrorPage", new Tencentcloud.Gaap.DomainErrorPageArgs
        ///         {
        ///             ListenerId = fooLayer7Listener.Id,
        ///             Domain = fooHttpDomain.Domain,
        ///             ErrorCodes = 
        ///             {
        ///                 406,
        ///                 504,
        ///             },
        ///             NewErrorCode = 502,
        ///             Body = "bad request",
        ///             ClearHeaders = 
        ///             {
        ///                 "Content-Length",
        ///                 "X-TEST",
        ///             },
        ///             SetHeaders = 
        ///             {
        ///                 { "X-TEST", "test" },
        ///             },
        ///         });
        ///         var fooDomainErrorPages = Tencentcloud.Gaap.GetDomainErrorPages.Invoke(new Tencentcloud.Gaap.GetDomainErrorPagesInvokeArgs
        ///         {
        ///             ListenerId = fooDomainErrorPage.ListenerId,
        ///             Domain = fooDomainErrorPage.Domain,
        ///         });
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetDomainErrorPagesResult> InvokeAsync(GetDomainErrorPagesArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetDomainErrorPagesResult>("tencentcloud:Gaap/getDomainErrorPages:getDomainErrorPages", args ?? new GetDomainErrorPagesArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to query custom GAAP HTTP domain error page info list.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var fooProxy = new Tencentcloud.Gaap.Proxy("fooProxy", new Tencentcloud.Gaap.ProxyArgs
        ///         {
        ///             Bandwidth = 10,
        ///             Concurrent = 2,
        ///             AccessRegion = "SouthChina",
        ///             RealserverRegion = "NorthChina",
        ///         });
        ///         var fooLayer7Listener = new Tencentcloud.Gaap.Layer7Listener("fooLayer7Listener", new Tencentcloud.Gaap.Layer7ListenerArgs
        ///         {
        ///             Protocol = "HTTP",
        ///             Port = 80,
        ///             ProxyId = "%s",
        ///         });
        ///         var fooHttpDomain = new Tencentcloud.Gaap.HttpDomain("fooHttpDomain", new Tencentcloud.Gaap.HttpDomainArgs
        ///         {
        ///             ListenerId = fooLayer7Listener.Id,
        ///             Domain = "www.qq.com",
        ///         });
        ///         var fooDomainErrorPage = new Tencentcloud.Gaap.DomainErrorPage("fooDomainErrorPage", new Tencentcloud.Gaap.DomainErrorPageArgs
        ///         {
        ///             ListenerId = fooLayer7Listener.Id,
        ///             Domain = fooHttpDomain.Domain,
        ///             ErrorCodes = 
        ///             {
        ///                 406,
        ///                 504,
        ///             },
        ///             NewErrorCode = 502,
        ///             Body = "bad request",
        ///             ClearHeaders = 
        ///             {
        ///                 "Content-Length",
        ///                 "X-TEST",
        ///             },
        ///             SetHeaders = 
        ///             {
        ///                 { "X-TEST", "test" },
        ///             },
        ///         });
        ///         var fooDomainErrorPages = Tencentcloud.Gaap.GetDomainErrorPages.Invoke(new Tencentcloud.Gaap.GetDomainErrorPagesInvokeArgs
        ///         {
        ///             ListenerId = fooDomainErrorPage.ListenerId,
        ///             Domain = fooDomainErrorPage.Domain,
        ///         });
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetDomainErrorPagesResult> Invoke(GetDomainErrorPagesInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetDomainErrorPagesResult>("tencentcloud:Gaap/getDomainErrorPages:getDomainErrorPages", args ?? new GetDomainErrorPagesInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetDomainErrorPagesArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// HTTP domain to be queried.
        /// </summary>
        [Input("domain", required: true)]
        public string Domain { get; set; } = null!;

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

        /// <summary>
        /// List of the error page info ID to be queried.
        /// </summary>
        public List<string> Ids
        {
            get => _ids ?? (_ids = new List<string>());
            set => _ids = value;
        }

        /// <summary>
        /// ID of the layer7 listener to be queried.
        /// </summary>
        [Input("listenerId", required: true)]
        public string ListenerId { get; set; } = null!;

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

        public GetDomainErrorPagesArgs()
        {
        }
    }

    public sealed class GetDomainErrorPagesInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// HTTP domain to be queried.
        /// </summary>
        [Input("domain", required: true)]
        public Input<string> Domain { get; set; } = null!;

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

        /// <summary>
        /// List of the error page info ID to be queried.
        /// </summary>
        public InputList<string> Ids
        {
            get => _ids ?? (_ids = new InputList<string>());
            set => _ids = value;
        }

        /// <summary>
        /// ID of the layer7 listener to be queried.
        /// </summary>
        [Input("listenerId", required: true)]
        public Input<string> ListenerId { get; set; } = null!;

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

        public GetDomainErrorPagesInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetDomainErrorPagesResult
    {
        /// <summary>
        /// HTTP domain.
        /// </summary>
        public readonly string Domain;
        /// <summary>
        /// An information list of error page info detail. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetDomainErrorPagesErrorPageInfoListResult> ErrorPageInfoLists;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<string> Ids;
        /// <summary>
        /// ID of the layer7 listener.
        /// </summary>
        public readonly string ListenerId;
        public readonly string? ResultOutputFile;

        [OutputConstructor]
        private GetDomainErrorPagesResult(
            string domain,

            ImmutableArray<Outputs.GetDomainErrorPagesErrorPageInfoListResult> errorPageInfoLists,

            string id,

            ImmutableArray<string> ids,

            string listenerId,

            string? resultOutputFile)
        {
            Domain = domain;
            ErrorPageInfoLists = errorPageInfoLists;
            Id = id;
            Ids = ids;
            ListenerId = listenerId;
            ResultOutputFile = resultOutputFile;
        }
    }
}
