1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getGaapDomainErrorPages
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getGaapDomainErrorPages

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Use this data source to query custom GAAP HTTP domain error page info list.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const fooGaapProxy = new tencentcloud.GaapProxy("fooGaapProxy", {
        bandwidth: 10,
        concurrent: 2,
        accessRegion: "SouthChina",
        realserverRegion: "NorthChina",
    });
    const fooGaapLayer7Listener = new tencentcloud.GaapLayer7Listener("fooGaapLayer7Listener", {
        protocol: "HTTP",
        port: 80,
        proxyId: "%s",
    });
    const fooGaapHttpDomain = new tencentcloud.GaapHttpDomain("fooGaapHttpDomain", {
        listenerId: fooGaapLayer7Listener.gaapLayer7ListenerId,
        domain: "www.qq.com",
    });
    const fooGaapDomainErrorPage = new tencentcloud.GaapDomainErrorPage("fooGaapDomainErrorPage", {
        listenerId: fooGaapLayer7Listener.gaapLayer7ListenerId,
        domain: fooGaapHttpDomain.domain,
        errorCodes: [
            406,
            504,
        ],
        newErrorCode: 502,
        body: "bad request",
        clearHeaders: [
            "Content-Length",
            "X-TEST",
        ],
        setHeaders: {
            "X-TEST": "test",
        },
    });
    const fooGaapDomainErrorPages = tencentcloud.getGaapDomainErrorPagesOutput({
        listenerId: fooGaapDomainErrorPage.listenerId,
        domain: fooGaapDomainErrorPage.domain,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    foo_gaap_proxy = tencentcloud.GaapProxy("fooGaapProxy",
        bandwidth=10,
        concurrent=2,
        access_region="SouthChina",
        realserver_region="NorthChina")
    foo_gaap_layer7_listener = tencentcloud.GaapLayer7Listener("fooGaapLayer7Listener",
        protocol="HTTP",
        port=80,
        proxy_id="%s")
    foo_gaap_http_domain = tencentcloud.GaapHttpDomain("fooGaapHttpDomain",
        listener_id=foo_gaap_layer7_listener.gaap_layer7_listener_id,
        domain="www.qq.com")
    foo_gaap_domain_error_page = tencentcloud.GaapDomainErrorPage("fooGaapDomainErrorPage",
        listener_id=foo_gaap_layer7_listener.gaap_layer7_listener_id,
        domain=foo_gaap_http_domain.domain,
        error_codes=[
            406,
            504,
        ],
        new_error_code=502,
        body="bad request",
        clear_headers=[
            "Content-Length",
            "X-TEST",
        ],
        set_headers={
            "X-TEST": "test",
        })
    foo_gaap_domain_error_pages = tencentcloud.get_gaap_domain_error_pages_output(listener_id=foo_gaap_domain_error_page.listener_id,
        domain=foo_gaap_domain_error_page.domain)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.NewGaapProxy(ctx, "fooGaapProxy", &tencentcloud.GaapProxyArgs{
    			Bandwidth:        pulumi.Float64(10),
    			Concurrent:       pulumi.Float64(2),
    			AccessRegion:     pulumi.String("SouthChina"),
    			RealserverRegion: pulumi.String("NorthChina"),
    		})
    		if err != nil {
    			return err
    		}
    		fooGaapLayer7Listener, err := tencentcloud.NewGaapLayer7Listener(ctx, "fooGaapLayer7Listener", &tencentcloud.GaapLayer7ListenerArgs{
    			Protocol: pulumi.String("HTTP"),
    			Port:     pulumi.Float64(80),
    			ProxyId:  pulumi.String("%s"),
    		})
    		if err != nil {
    			return err
    		}
    		fooGaapHttpDomain, err := tencentcloud.NewGaapHttpDomain(ctx, "fooGaapHttpDomain", &tencentcloud.GaapHttpDomainArgs{
    			ListenerId: fooGaapLayer7Listener.GaapLayer7ListenerId,
    			Domain:     pulumi.String("www.qq.com"),
    		})
    		if err != nil {
    			return err
    		}
    		fooGaapDomainErrorPage, err := tencentcloud.NewGaapDomainErrorPage(ctx, "fooGaapDomainErrorPage", &tencentcloud.GaapDomainErrorPageArgs{
    			ListenerId: fooGaapLayer7Listener.GaapLayer7ListenerId,
    			Domain:     fooGaapHttpDomain.Domain,
    			ErrorCodes: pulumi.Float64Array{
    				pulumi.Float64(406),
    				pulumi.Float64(504),
    			},
    			NewErrorCode: pulumi.Float64(502),
    			Body:         pulumi.String("bad request"),
    			ClearHeaders: pulumi.StringArray{
    				pulumi.String("Content-Length"),
    				pulumi.String("X-TEST"),
    			},
    			SetHeaders: pulumi.StringMap{
    				"X-TEST": pulumi.String("test"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_ = tencentcloud.GetGaapDomainErrorPagesOutput(ctx, tencentcloud.GetGaapDomainErrorPagesOutputArgs{
    			ListenerId: fooGaapDomainErrorPage.ListenerId,
    			Domain:     fooGaapDomainErrorPage.Domain,
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var fooGaapProxy = new Tencentcloud.GaapProxy("fooGaapProxy", new()
        {
            Bandwidth = 10,
            Concurrent = 2,
            AccessRegion = "SouthChina",
            RealserverRegion = "NorthChina",
        });
    
        var fooGaapLayer7Listener = new Tencentcloud.GaapLayer7Listener("fooGaapLayer7Listener", new()
        {
            Protocol = "HTTP",
            Port = 80,
            ProxyId = "%s",
        });
    
        var fooGaapHttpDomain = new Tencentcloud.GaapHttpDomain("fooGaapHttpDomain", new()
        {
            ListenerId = fooGaapLayer7Listener.GaapLayer7ListenerId,
            Domain = "www.qq.com",
        });
    
        var fooGaapDomainErrorPage = new Tencentcloud.GaapDomainErrorPage("fooGaapDomainErrorPage", new()
        {
            ListenerId = fooGaapLayer7Listener.GaapLayer7ListenerId,
            Domain = fooGaapHttpDomain.Domain,
            ErrorCodes = new[]
            {
                406,
                504,
            },
            NewErrorCode = 502,
            Body = "bad request",
            ClearHeaders = new[]
            {
                "Content-Length",
                "X-TEST",
            },
            SetHeaders = 
            {
                { "X-TEST", "test" },
            },
        });
    
        var fooGaapDomainErrorPages = Tencentcloud.GetGaapDomainErrorPages.Invoke(new()
        {
            ListenerId = fooGaapDomainErrorPage.ListenerId,
            Domain = fooGaapDomainErrorPage.Domain,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.GaapProxy;
    import com.pulumi.tencentcloud.GaapProxyArgs;
    import com.pulumi.tencentcloud.GaapLayer7Listener;
    import com.pulumi.tencentcloud.GaapLayer7ListenerArgs;
    import com.pulumi.tencentcloud.GaapHttpDomain;
    import com.pulumi.tencentcloud.GaapHttpDomainArgs;
    import com.pulumi.tencentcloud.GaapDomainErrorPage;
    import com.pulumi.tencentcloud.GaapDomainErrorPageArgs;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetGaapDomainErrorPagesArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var fooGaapProxy = new GaapProxy("fooGaapProxy", GaapProxyArgs.builder()
                .bandwidth(10)
                .concurrent(2)
                .accessRegion("SouthChina")
                .realserverRegion("NorthChina")
                .build());
    
            var fooGaapLayer7Listener = new GaapLayer7Listener("fooGaapLayer7Listener", GaapLayer7ListenerArgs.builder()
                .protocol("HTTP")
                .port(80)
                .proxyId("%s")
                .build());
    
            var fooGaapHttpDomain = new GaapHttpDomain("fooGaapHttpDomain", GaapHttpDomainArgs.builder()
                .listenerId(fooGaapLayer7Listener.gaapLayer7ListenerId())
                .domain("www.qq.com")
                .build());
    
            var fooGaapDomainErrorPage = new GaapDomainErrorPage("fooGaapDomainErrorPage", GaapDomainErrorPageArgs.builder()
                .listenerId(fooGaapLayer7Listener.gaapLayer7ListenerId())
                .domain(fooGaapHttpDomain.domain())
                .errorCodes(            
                    406,
                    504)
                .newErrorCode(502)
                .body("bad request")
                .clearHeaders(            
                    "Content-Length",
                    "X-TEST")
                .setHeaders(Map.of("X-TEST", "test"))
                .build());
    
            final var fooGaapDomainErrorPages = TencentcloudFunctions.getGaapDomainErrorPages(GetGaapDomainErrorPagesArgs.builder()
                .listenerId(fooGaapDomainErrorPage.listenerId())
                .domain(fooGaapDomainErrorPage.domain())
                .build());
    
        }
    }
    
    resources:
      fooGaapProxy:
        type: tencentcloud:GaapProxy
        properties:
          bandwidth: 10
          concurrent: 2
          accessRegion: SouthChina
          realserverRegion: NorthChina
      fooGaapLayer7Listener:
        type: tencentcloud:GaapLayer7Listener
        properties:
          protocol: HTTP
          port: 80
          proxyId: '%s'
      fooGaapHttpDomain:
        type: tencentcloud:GaapHttpDomain
        properties:
          listenerId: ${fooGaapLayer7Listener.gaapLayer7ListenerId}
          domain: www.qq.com
      fooGaapDomainErrorPage:
        type: tencentcloud:GaapDomainErrorPage
        properties:
          listenerId: ${fooGaapLayer7Listener.gaapLayer7ListenerId}
          domain: ${fooGaapHttpDomain.domain}
          errorCodes:
            - 406
            - 504
          newErrorCode: 502
          body: bad request
          clearHeaders:
            - Content-Length
            - X-TEST
          setHeaders:
            X-TEST: test
    variables:
      fooGaapDomainErrorPages:
        fn::invoke:
          function: tencentcloud:getGaapDomainErrorPages
          arguments:
            listenerId: ${fooGaapDomainErrorPage.listenerId}
            domain: ${fooGaapDomainErrorPage.domain}
    

    Using getGaapDomainErrorPages

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getGaapDomainErrorPages(args: GetGaapDomainErrorPagesArgs, opts?: InvokeOptions): Promise<GetGaapDomainErrorPagesResult>
    function getGaapDomainErrorPagesOutput(args: GetGaapDomainErrorPagesOutputArgs, opts?: InvokeOptions): Output<GetGaapDomainErrorPagesResult>
    def get_gaap_domain_error_pages(domain: Optional[str] = None,
                                    id: Optional[str] = None,
                                    ids: Optional[Sequence[str]] = None,
                                    listener_id: Optional[str] = None,
                                    result_output_file: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetGaapDomainErrorPagesResult
    def get_gaap_domain_error_pages_output(domain: Optional[pulumi.Input[str]] = None,
                                    id: Optional[pulumi.Input[str]] = None,
                                    ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                    listener_id: Optional[pulumi.Input[str]] = None,
                                    result_output_file: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetGaapDomainErrorPagesResult]
    func GetGaapDomainErrorPages(ctx *Context, args *GetGaapDomainErrorPagesArgs, opts ...InvokeOption) (*GetGaapDomainErrorPagesResult, error)
    func GetGaapDomainErrorPagesOutput(ctx *Context, args *GetGaapDomainErrorPagesOutputArgs, opts ...InvokeOption) GetGaapDomainErrorPagesResultOutput

    > Note: This function is named GetGaapDomainErrorPages in the Go SDK.

    public static class GetGaapDomainErrorPages 
    {
        public static Task<GetGaapDomainErrorPagesResult> InvokeAsync(GetGaapDomainErrorPagesArgs args, InvokeOptions? opts = null)
        public static Output<GetGaapDomainErrorPagesResult> Invoke(GetGaapDomainErrorPagesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetGaapDomainErrorPagesResult> getGaapDomainErrorPages(GetGaapDomainErrorPagesArgs args, InvokeOptions options)
    public static Output<GetGaapDomainErrorPagesResult> getGaapDomainErrorPages(GetGaapDomainErrorPagesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getGaapDomainErrorPages:getGaapDomainErrorPages
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Domain string
    HTTP domain to be queried.
    ListenerId string
    ID of the layer7 listener to be queried.
    Id string
    ID of the error page info.
    Ids List<string>
    List of the error page info ID to be queried.
    ResultOutputFile string
    Used to save results.
    Domain string
    HTTP domain to be queried.
    ListenerId string
    ID of the layer7 listener to be queried.
    Id string
    ID of the error page info.
    Ids []string
    List of the error page info ID to be queried.
    ResultOutputFile string
    Used to save results.
    domain String
    HTTP domain to be queried.
    listenerId String
    ID of the layer7 listener to be queried.
    id String
    ID of the error page info.
    ids List<String>
    List of the error page info ID to be queried.
    resultOutputFile String
    Used to save results.
    domain string
    HTTP domain to be queried.
    listenerId string
    ID of the layer7 listener to be queried.
    id string
    ID of the error page info.
    ids string[]
    List of the error page info ID to be queried.
    resultOutputFile string
    Used to save results.
    domain str
    HTTP domain to be queried.
    listener_id str
    ID of the layer7 listener to be queried.
    id str
    ID of the error page info.
    ids Sequence[str]
    List of the error page info ID to be queried.
    result_output_file str
    Used to save results.
    domain String
    HTTP domain to be queried.
    listenerId String
    ID of the layer7 listener to be queried.
    id String
    ID of the error page info.
    ids List<String>
    List of the error page info ID to be queried.
    resultOutputFile String
    Used to save results.

    getGaapDomainErrorPages Result

    The following output properties are available:

    Domain string
    HTTP domain.
    ErrorPageInfoLists List<GetGaapDomainErrorPagesErrorPageInfoList>
    An information list of error page info detail. Each element contains the following attributes:
    Id string
    ID of the error page info.
    ListenerId string
    ID of the layer7 listener.
    Ids List<string>
    ResultOutputFile string
    Domain string
    HTTP domain.
    ErrorPageInfoLists []GetGaapDomainErrorPagesErrorPageInfoList
    An information list of error page info detail. Each element contains the following attributes:
    Id string
    ID of the error page info.
    ListenerId string
    ID of the layer7 listener.
    Ids []string
    ResultOutputFile string
    domain String
    HTTP domain.
    errorPageInfoLists List<GetGaapDomainErrorPagesErrorPageInfoList>
    An information list of error page info detail. Each element contains the following attributes:
    id String
    ID of the error page info.
    listenerId String
    ID of the layer7 listener.
    ids List<String>
    resultOutputFile String
    domain string
    HTTP domain.
    errorPageInfoLists GetGaapDomainErrorPagesErrorPageInfoList[]
    An information list of error page info detail. Each element contains the following attributes:
    id string
    ID of the error page info.
    listenerId string
    ID of the layer7 listener.
    ids string[]
    resultOutputFile string
    domain str
    HTTP domain.
    error_page_info_lists Sequence[GetGaapDomainErrorPagesErrorPageInfoList]
    An information list of error page info detail. Each element contains the following attributes:
    id str
    ID of the error page info.
    listener_id str
    ID of the layer7 listener.
    ids Sequence[str]
    result_output_file str
    domain String
    HTTP domain.
    errorPageInfoLists List<Property Map>
    An information list of error page info detail. Each element contains the following attributes:
    id String
    ID of the error page info.
    listenerId String
    ID of the layer7 listener.
    ids List<String>
    resultOutputFile String

    Supporting Types

    GetGaapDomainErrorPagesErrorPageInfoList

    Body string
    New response body.
    ClearHeaders List<string>
    Response headers to be removed.
    Domain string
    HTTP domain to be queried.
    ErrorCodes List<double>
    Original error codes.
    Id string
    ID of the error page info.
    ListenerId string
    ID of the layer7 listener to be queried.
    NewErrorCodes double
    New error code.
    SetHeaders Dictionary<string, string>
    Response headers to be set.
    Body string
    New response body.
    ClearHeaders []string
    Response headers to be removed.
    Domain string
    HTTP domain to be queried.
    ErrorCodes []float64
    Original error codes.
    Id string
    ID of the error page info.
    ListenerId string
    ID of the layer7 listener to be queried.
    NewErrorCodes float64
    New error code.
    SetHeaders map[string]string
    Response headers to be set.
    body String
    New response body.
    clearHeaders List<String>
    Response headers to be removed.
    domain String
    HTTP domain to be queried.
    errorCodes List<Double>
    Original error codes.
    id String
    ID of the error page info.
    listenerId String
    ID of the layer7 listener to be queried.
    newErrorCodes Double
    New error code.
    setHeaders Map<String,String>
    Response headers to be set.
    body string
    New response body.
    clearHeaders string[]
    Response headers to be removed.
    domain string
    HTTP domain to be queried.
    errorCodes number[]
    Original error codes.
    id string
    ID of the error page info.
    listenerId string
    ID of the layer7 listener to be queried.
    newErrorCodes number
    New error code.
    setHeaders {[key: string]: string}
    Response headers to be set.
    body str
    New response body.
    clear_headers Sequence[str]
    Response headers to be removed.
    domain str
    HTTP domain to be queried.
    error_codes Sequence[float]
    Original error codes.
    id str
    ID of the error page info.
    listener_id str
    ID of the layer7 listener to be queried.
    new_error_codes float
    New error code.
    set_headers Mapping[str, str]
    Response headers to be set.
    body String
    New response body.
    clearHeaders List<String>
    Response headers to be removed.
    domain String
    HTTP domain to be queried.
    errorCodes List<Number>
    Original error codes.
    id String
    ID of the error page info.
    listenerId String
    ID of the layer7 listener to be queried.
    newErrorCodes Number
    New error code.
    setHeaders Map<String>
    Response headers to be set.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack