tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
tencentcloud.getGaapDomainErrorPages
Explore with Pulumi AI
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.
- Listener
Id 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.
- Result
Output stringFile - Used to save results.
- Domain string
- HTTP domain to be queried.
- Listener
Id 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.
- Result
Output stringFile - Used to save results.
- domain String
- HTTP domain to be queried.
- listener
Id 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.
- result
Output StringFile - Used to save results.
- domain string
- HTTP domain to be queried.
- listener
Id 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.
- result
Output stringFile - 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_ strfile - Used to save results.
- domain String
- HTTP domain to be queried.
- listener
Id 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.
- result
Output StringFile - Used to save results.
getGaapDomainErrorPages Result
The following output properties are available:
- Domain string
- HTTP domain.
- Error
Page List<GetInfo Lists Gaap Domain Error Pages Error Page Info List> - An information list of error page info detail. Each element contains the following attributes:
- Id string
- ID of the error page info.
- Listener
Id string - ID of the layer7 listener.
- Ids List<string>
- Result
Output stringFile
- Domain string
- HTTP domain.
- Error
Page []GetInfo Lists Gaap Domain Error Pages Error Page Info List - An information list of error page info detail. Each element contains the following attributes:
- Id string
- ID of the error page info.
- Listener
Id string - ID of the layer7 listener.
- Ids []string
- Result
Output stringFile
- domain String
- HTTP domain.
- error
Page List<GetInfo Lists Gaap Domain Error Pages Error Page Info List> - An information list of error page info detail. Each element contains the following attributes:
- id String
- ID of the error page info.
- listener
Id String - ID of the layer7 listener.
- ids List<String>
- result
Output StringFile
- domain string
- HTTP domain.
- error
Page GetInfo Lists Gaap Domain Error Pages Error Page Info List[] - An information list of error page info detail. Each element contains the following attributes:
- id string
- ID of the error page info.
- listener
Id string - ID of the layer7 listener.
- ids string[]
- result
Output stringFile
- domain str
- HTTP domain.
- error_
page_ Sequence[Getinfo_ lists Gaap Domain Error Pages Error Page Info List] - 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_ strfile
- domain String
- HTTP domain.
- error
Page List<Property Map>Info Lists - An information list of error page info detail. Each element contains the following attributes:
- id String
- ID of the error page info.
- listener
Id String - ID of the layer7 listener.
- ids List<String>
- result
Output StringFile
Supporting Types
GetGaapDomainErrorPagesErrorPageInfoList
- Body string
- New response body.
- Clear
Headers List<string> - Response headers to be removed.
- Domain string
- HTTP domain to be queried.
- Error
Codes List<double> - Original error codes.
- Id string
- ID of the error page info.
- Listener
Id string - ID of the layer7 listener to be queried.
- New
Error doubleCodes - New error code.
- Set
Headers Dictionary<string, string> - Response headers to be set.
- Body string
- New response body.
- Clear
Headers []string - Response headers to be removed.
- Domain string
- HTTP domain to be queried.
- Error
Codes []float64 - Original error codes.
- Id string
- ID of the error page info.
- Listener
Id string - ID of the layer7 listener to be queried.
- New
Error float64Codes - New error code.
- Set
Headers map[string]string - Response headers to be set.
- body String
- New response body.
- clear
Headers List<String> - Response headers to be removed.
- domain String
- HTTP domain to be queried.
- error
Codes List<Double> - Original error codes.
- id String
- ID of the error page info.
- listener
Id String - ID of the layer7 listener to be queried.
- new
Error DoubleCodes - New error code.
- set
Headers Map<String,String> - Response headers to be set.
- body string
- New response body.
- clear
Headers string[] - Response headers to be removed.
- domain string
- HTTP domain to be queried.
- error
Codes number[] - Original error codes.
- id string
- ID of the error page info.
- listener
Id string - ID of the layer7 listener to be queried.
- new
Error numberCodes - New error code.
- set
Headers {[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_ floatcodes - New error code.
- set_
headers Mapping[str, str] - Response headers to be set.
- body String
- New response body.
- clear
Headers List<String> - Response headers to be removed.
- domain String
- HTTP domain to be queried.
- error
Codes List<Number> - Original error codes.
- id String
- ID of the error page info.
- listener
Id String - ID of the layer7 listener to be queried.
- new
Error NumberCodes - New error code.
- set
Headers 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 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack