tencentcloud.GaapDomainErrorPage
Explore with Pulumi AI
Provide a resource to custom error page info for a GAAP HTTP domain.
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: fooGaapProxy.gaapProxyId,
});
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: [
404,
503,
],
body: "bad request",
});
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=foo_gaap_proxy.gaap_proxy_id)
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=[
404,
503,
],
body="bad request")
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 {
fooGaapProxy, 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: fooGaapProxy.GaapProxyId,
})
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
}
_, err = tencentcloud.NewGaapDomainErrorPage(ctx, "fooGaapDomainErrorPage", &tencentcloud.GaapDomainErrorPageArgs{
ListenerId: fooGaapLayer7Listener.GaapLayer7ListenerId,
Domain: fooGaapHttpDomain.Domain,
ErrorCodes: pulumi.Float64Array{
pulumi.Float64(404),
pulumi.Float64(503),
},
Body: pulumi.String("bad request"),
})
if err != nil {
return err
}
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 = fooGaapProxy.GaapProxyId,
});
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[]
{
404,
503,
},
Body = "bad request",
});
});
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 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(fooGaapProxy.gaapProxyId())
.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(
404,
503)
.body("bad request")
.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: ${fooGaapProxy.gaapProxyId}
fooGaapHttpDomain:
type: tencentcloud:GaapHttpDomain
properties:
listenerId: ${fooGaapLayer7Listener.gaapLayer7ListenerId}
domain: www.qq.com
fooGaapDomainErrorPage:
type: tencentcloud:GaapDomainErrorPage
properties:
listenerId: ${fooGaapLayer7Listener.gaapLayer7ListenerId}
domain: ${fooGaapHttpDomain.domain}
errorCodes:
- 404
- 503
body: bad request
Create GaapDomainErrorPage Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GaapDomainErrorPage(name: string, args: GaapDomainErrorPageArgs, opts?: CustomResourceOptions);
@overload
def GaapDomainErrorPage(resource_name: str,
args: GaapDomainErrorPageArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GaapDomainErrorPage(resource_name: str,
opts: Optional[ResourceOptions] = None,
body: Optional[str] = None,
domain: Optional[str] = None,
error_codes: Optional[Sequence[float]] = None,
listener_id: Optional[str] = None,
clear_headers: Optional[Sequence[str]] = None,
gaap_domain_error_page_id: Optional[str] = None,
new_error_code: Optional[float] = None,
set_headers: Optional[Mapping[str, str]] = None)
func NewGaapDomainErrorPage(ctx *Context, name string, args GaapDomainErrorPageArgs, opts ...ResourceOption) (*GaapDomainErrorPage, error)
public GaapDomainErrorPage(string name, GaapDomainErrorPageArgs args, CustomResourceOptions? opts = null)
public GaapDomainErrorPage(String name, GaapDomainErrorPageArgs args)
public GaapDomainErrorPage(String name, GaapDomainErrorPageArgs args, CustomResourceOptions options)
type: tencentcloud:GaapDomainErrorPage
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args GaapDomainErrorPageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args GaapDomainErrorPageArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args GaapDomainErrorPageArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GaapDomainErrorPageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GaapDomainErrorPageArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
GaapDomainErrorPage Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The GaapDomainErrorPage resource accepts the following input properties:
- Body string
- New response body.
- Domain string
- HTTP domain.
- Error
Codes List<double> - Original error codes.
- Listener
Id string - ID of the layer7 listener.
- Clear
Headers List<string> - Response headers to be removed.
- Gaap
Domain stringError Page Id - ID of the resource.
- New
Error doubleCode - New error code.
- Set
Headers Dictionary<string, string> - Response headers to be set.
- Body string
- New response body.
- Domain string
- HTTP domain.
- Error
Codes []float64 - Original error codes.
- Listener
Id string - ID of the layer7 listener.
- Clear
Headers []string - Response headers to be removed.
- Gaap
Domain stringError Page Id - ID of the resource.
- New
Error float64Code - New error code.
- Set
Headers map[string]string - Response headers to be set.
- body String
- New response body.
- domain String
- HTTP domain.
- error
Codes List<Double> - Original error codes.
- listener
Id String - ID of the layer7 listener.
- clear
Headers List<String> - Response headers to be removed.
- gaap
Domain StringError Page Id - ID of the resource.
- new
Error DoubleCode - New error code.
- set
Headers Map<String,String> - Response headers to be set.
- body string
- New response body.
- domain string
- HTTP domain.
- error
Codes number[] - Original error codes.
- listener
Id string - ID of the layer7 listener.
- clear
Headers string[] - Response headers to be removed.
- gaap
Domain stringError Page Id - ID of the resource.
- new
Error numberCode - New error code.
- set
Headers {[key: string]: string} - Response headers to be set.
- body str
- New response body.
- domain str
- HTTP domain.
- error_
codes Sequence[float] - Original error codes.
- listener_
id str - ID of the layer7 listener.
- clear_
headers Sequence[str] - Response headers to be removed.
- gaap_
domain_ strerror_ page_ id - ID of the resource.
- new_
error_ floatcode - New error code.
- set_
headers Mapping[str, str] - Response headers to be set.
- body String
- New response body.
- domain String
- HTTP domain.
- error
Codes List<Number> - Original error codes.
- listener
Id String - ID of the layer7 listener.
- clear
Headers List<String> - Response headers to be removed.
- gaap
Domain StringError Page Id - ID of the resource.
- new
Error NumberCode - New error code.
- set
Headers Map<String> - Response headers to be set.
Outputs
All input properties are implicitly available as output properties. Additionally, the GaapDomainErrorPage resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing GaapDomainErrorPage Resource
Get an existing GaapDomainErrorPage resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: GaapDomainErrorPageState, opts?: CustomResourceOptions): GaapDomainErrorPage
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
body: Optional[str] = None,
clear_headers: Optional[Sequence[str]] = None,
domain: Optional[str] = None,
error_codes: Optional[Sequence[float]] = None,
gaap_domain_error_page_id: Optional[str] = None,
listener_id: Optional[str] = None,
new_error_code: Optional[float] = None,
set_headers: Optional[Mapping[str, str]] = None) -> GaapDomainErrorPage
func GetGaapDomainErrorPage(ctx *Context, name string, id IDInput, state *GaapDomainErrorPageState, opts ...ResourceOption) (*GaapDomainErrorPage, error)
public static GaapDomainErrorPage Get(string name, Input<string> id, GaapDomainErrorPageState? state, CustomResourceOptions? opts = null)
public static GaapDomainErrorPage get(String name, Output<String> id, GaapDomainErrorPageState state, CustomResourceOptions options)
resources: _: type: tencentcloud:GaapDomainErrorPage get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Body string
- New response body.
- Clear
Headers List<string> - Response headers to be removed.
- Domain string
- HTTP domain.
- Error
Codes List<double> - Original error codes.
- Gaap
Domain stringError Page Id - ID of the resource.
- Listener
Id string - ID of the layer7 listener.
- New
Error doubleCode - 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.
- Error
Codes []float64 - Original error codes.
- Gaap
Domain stringError Page Id - ID of the resource.
- Listener
Id string - ID of the layer7 listener.
- New
Error float64Code - 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.
- error
Codes List<Double> - Original error codes.
- gaap
Domain StringError Page Id - ID of the resource.
- listener
Id String - ID of the layer7 listener.
- new
Error DoubleCode - 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.
- error
Codes number[] - Original error codes.
- gaap
Domain stringError Page Id - ID of the resource.
- listener
Id string - ID of the layer7 listener.
- new
Error numberCode - 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.
- error_
codes Sequence[float] - Original error codes.
- gaap_
domain_ strerror_ page_ id - ID of the resource.
- listener_
id str - ID of the layer7 listener.
- new_
error_ floatcode - 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.
- error
Codes List<Number> - Original error codes.
- gaap
Domain StringError Page Id - ID of the resource.
- listener
Id String - ID of the layer7 listener.
- new
Error NumberCode - 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.