published on Thursday, Sep 3, 2026 by Volcengine
published on Thursday, Sep 3, 2026 by Volcengine
WAF custom block response rule. When block conditions are met, WAF returns a custom response code, page, or redirects to the specified URL according to this rule.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcenginecc from "@volcengine/pulumi-volcenginecc";
const example = new volcenginecc.waf.CustomPage("example", {
clientIp: "ALL",
description: "ccapi custom page required",
host: "www.testwaf.com",
name: "ccapi-custompage-required",
pageMode: 0,
policy: 8,
url: "/ccapi-required",
body: "blocked by ccapi required page",
code: "403",
contentType: "text/html",
});
import pulumi
import pulumi_volcenginecc as volcenginecc
example = volcenginecc.waf.CustomPage("example",
client_ip="ALL",
description="ccapi custom page required",
host="www.testwaf.com",
name="ccapi-custompage-required",
page_mode=0,
policy=8,
url="/ccapi-required",
body="blocked by ccapi required page",
code="403",
content_type="text/html")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcenginecc/sdk/go/volcenginecc/waf"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := waf.NewCustomPage(ctx, "example", &waf.CustomPageArgs{
ClientIp: pulumi.String("ALL"),
Description: pulumi.String("ccapi custom page required"),
Host: pulumi.String("www.testwaf.com"),
Name: pulumi.String("ccapi-custompage-required"),
PageMode: pulumi.Int(0),
Policy: pulumi.Int(8),
Url: pulumi.String("/ccapi-required"),
Body: pulumi.String("blocked by ccapi required page"),
Code: pulumi.String("403"),
ContentType: pulumi.String("text/html"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcenginecc = Volcengine.Pulumi.Volcenginecc;
return await Deployment.RunAsync(() =>
{
var example = new Volcenginecc.Waf.CustomPage("example", new()
{
ClientIp = "ALL",
Description = "ccapi custom page required",
Host = "www.testwaf.com",
Name = "ccapi-custompage-required",
PageMode = 0,
Policy = 8,
Url = "/ccapi-required",
Body = "blocked by ccapi required page",
Code = "403",
ContentType = "text/html",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.volcengine.volcenginecc.waf.CustomPage;
import com.volcengine.volcenginecc.waf.CustomPageArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 example = new CustomPage("example", CustomPageArgs.builder()
.clientIp("ALL")
.description("ccapi custom page required")
.host("www.testwaf.com")
.name("ccapi-custompage-required")
.pageMode(0)
.policy(8)
.url("/ccapi-required")
.body("blocked by ccapi required page")
.code("403")
.contentType("text/html")
.build());
}
}
resources:
example:
type: volcenginecc:waf:CustomPage
properties:
clientIp: ALL
description: ccapi custom page required
host: www.testwaf.com
name: ccapi-custompage-required
pageMode: 0
policy: 8
url: /ccapi-required
body: blocked by ccapi required page
code: '403'
contentType: text/html
pulumi {
required_providers {
volcenginecc = {
source = "pulumi/volcenginecc"
}
}
}
resource "volcenginecc_waf_custompage" "example" {
client_ip = "ALL"
description = "ccapi custom page required"
host = "www.testwaf.com"
name = "ccapi-custompage-required"
page_mode = 0
policy = 8
url = "/ccapi-required"
body = "blocked by ccapi required page"
code = "403"
content_type = "text/html"
}
Create CustomPage Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CustomPage(name: string, args: CustomPageArgs, opts?: CustomResourceOptions);@overload
def CustomPage(resource_name: str,
args: CustomPageArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CustomPage(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
page_mode: Optional[int] = None,
url: Optional[str] = None,
client_ip: Optional[str] = None,
host: Optional[str] = None,
policy: Optional[int] = None,
name: Optional[str] = None,
code: Optional[str] = None,
accurate: Optional[CustomPageAccurateArgs] = None,
advanced: Optional[int] = None,
enable: Optional[int] = None,
content_type: Optional[str] = None,
project_name: Optional[str] = None,
redirect_url: Optional[str] = None,
body: Optional[str] = None)func NewCustomPage(ctx *Context, name string, args CustomPageArgs, opts ...ResourceOption) (*CustomPage, error)public CustomPage(string name, CustomPageArgs args, CustomResourceOptions? opts = null)
public CustomPage(String name, CustomPageArgs args)
public CustomPage(String name, CustomPageArgs args, CustomResourceOptions options)
type: volcenginecc:waf:CustomPage
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "volcenginecc_waf_custom_page" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args CustomPageArgs
- 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 CustomPageArgs
- 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 CustomPageArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomPageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CustomPageArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var customPageResource = new Volcenginecc.Waf.CustomPage("customPageResource", new()
{
Description = "string",
PageMode = 0,
Url = "string",
ClientIp = "string",
Host = "string",
Policy = 0,
Name = "string",
Code = "string",
Accurate = new Volcenginecc.Waf.Inputs.CustomPageAccurateArgs
{
AccurateRules = new[]
{
new Volcenginecc.Waf.Inputs.CustomPageAccurateAccurateRuleArgs
{
HttpObj = "string",
ObjType = 0,
Opretar = 0,
Property = 0,
ValueString = "string",
},
},
Logic = 0,
},
Advanced = 0,
Enable = 0,
ContentType = "string",
ProjectName = "string",
RedirectUrl = "string",
Body = "string",
});
example, err := waf.NewCustomPage(ctx, "customPageResource", &waf.CustomPageArgs{
Description: pulumi.String("string"),
PageMode: pulumi.Int(0),
Url: pulumi.String("string"),
ClientIp: pulumi.String("string"),
Host: pulumi.String("string"),
Policy: pulumi.Int(0),
Name: pulumi.String("string"),
Code: pulumi.String("string"),
Accurate: &waf.CustomPageAccurateArgs{
AccurateRules: waf.CustomPageAccurateAccurateRuleArray{
&waf.CustomPageAccurateAccurateRuleArgs{
HttpObj: pulumi.String("string"),
ObjType: pulumi.Int(0),
Opretar: pulumi.Int(0),
Property: pulumi.Int(0),
ValueString: pulumi.String("string"),
},
},
Logic: pulumi.Int(0),
},
Advanced: pulumi.Int(0),
Enable: pulumi.Int(0),
ContentType: pulumi.String("string"),
ProjectName: pulumi.String("string"),
RedirectUrl: pulumi.String("string"),
Body: pulumi.String("string"),
})
resource "volcenginecc_waf_custom_page" "customPageResource" {
lifecycle {
create_before_destroy = true
}
description = "string"
page_mode = 0
url = "string"
client_ip = "string"
host = "string"
policy = 0
name = "string"
code = "string"
accurate = {
accurate_rules = [{
http_obj = "string"
obj_type = 0
opretar = 0
property = 0
value_string = "string"
}]
logic = 0
}
advanced = 0
enable = 0
content_type = "string"
project_name = "string"
redirect_url = "string"
body = "string"
}
var customPageResource = new CustomPage("customPageResource", CustomPageArgs.builder()
.description("string")
.pageMode(0)
.url("string")
.clientIp("string")
.host("string")
.policy(0)
.name("string")
.code("string")
.accurate(CustomPageAccurateArgs.builder()
.accurateRules(CustomPageAccurateAccurateRuleArgs.builder()
.httpObj("string")
.objType(0)
.opretar(0)
.property(0)
.valueString("string")
.build())
.logic(0)
.build())
.advanced(0)
.enable(0)
.contentType("string")
.projectName("string")
.redirectUrl("string")
.body("string")
.build());
custom_page_resource = volcenginecc.waf.CustomPage("customPageResource",
description="string",
page_mode=0,
url="string",
client_ip="string",
host="string",
policy=0,
name="string",
code="string",
accurate={
"accurate_rules": [{
"http_obj": "string",
"obj_type": 0,
"opretar": 0,
"property": 0,
"value_string": "string",
}],
"logic": 0,
},
advanced=0,
enable=0,
content_type="string",
project_name="string",
redirect_url="string",
body="string")
const customPageResource = new volcenginecc.waf.CustomPage("customPageResource", {
description: "string",
pageMode: 0,
url: "string",
clientIp: "string",
host: "string",
policy: 0,
name: "string",
code: "string",
accurate: {
accurateRules: [{
httpObj: "string",
objType: 0,
opretar: 0,
property: 0,
valueString: "string",
}],
logic: 0,
},
advanced: 0,
enable: 0,
contentType: "string",
projectName: "string",
redirectUrl: "string",
body: "string",
});
type: volcenginecc:waf:CustomPage
properties:
accurate:
accurateRules:
- httpObj: string
objType: 0
opretar: 0
property: 0
valueString: string
logic: 0
advanced: 0
body: string
clientIp: string
code: string
contentType: string
description: string
enable: 0
host: string
name: string
pageMode: 0
policy: 0
projectName: string
redirectUrl: string
url: string
CustomPage 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 CustomPage resource accepts the following input properties:
- Client
Ip string - Client IP. Value is fixed as ALL, meaning it applies to all source IPs.
- Description string
- Rule description.
- Host string
- Domain name. The website domain name to be protected. Before calling, make sure the domain name has been added to the current WAF instance.
- Name string
- Rule name. Must start with a Chinese character, letter, or number. Allows Chinese characters, letters, numbers, periods (.), underscores (_), and hyphens (-). Length: 1–128 characters.
- Page
Mode int - Response page mode. 0: Custom response body; 2: Redirect URL.
- Policy int
- Associated protection policy. 1: Observe; 8: Block.
- Url string
- URL path where the rule takes effect.
- Accurate
Volcengine.
Custom Page Accurate - Advanced condition configuration. Only takes effect when Advanced=1.
- Advanced int
- Enable advanced conditions. 0: Off (default); 1: On. If enabled, Accurate must also be configured.
- Body string
- Custom response page content. Maximum length: 4096 bytes. Only effective when PageMode=0.
- Code string
- Custom response status code, such as 403, 405, 503. Only effective when PageMode=0.
- Content
Type string - Custom response Content-Type response header. For example: text/html, application/json, etc. Only effective when PageMode=0.
- Enable int
- Rule switch. 0: Off; 1: On.
- Project
Name string - Project name, which is the project associated with the current resource. Only projects with permissions under the current identity can be associated. Default is default.
- Redirect
Url string - Redirect target URL. Only effective when PageMode=2.
- Client
Ip string - Client IP. Value is fixed as ALL, meaning it applies to all source IPs.
- Description string
- Rule description.
- Host string
- Domain name. The website domain name to be protected. Before calling, make sure the domain name has been added to the current WAF instance.
- Name string
- Rule name. Must start with a Chinese character, letter, or number. Allows Chinese characters, letters, numbers, periods (.), underscores (_), and hyphens (-). Length: 1–128 characters.
- Page
Mode int - Response page mode. 0: Custom response body; 2: Redirect URL.
- Policy int
- Associated protection policy. 1: Observe; 8: Block.
- Url string
- URL path where the rule takes effect.
- Accurate
Custom
Page Accurate Args - Advanced condition configuration. Only takes effect when Advanced=1.
- Advanced int
- Enable advanced conditions. 0: Off (default); 1: On. If enabled, Accurate must also be configured.
- Body string
- Custom response page content. Maximum length: 4096 bytes. Only effective when PageMode=0.
- Code string
- Custom response status code, such as 403, 405, 503. Only effective when PageMode=0.
- Content
Type string - Custom response Content-Type response header. For example: text/html, application/json, etc. Only effective when PageMode=0.
- Enable int
- Rule switch. 0: Off; 1: On.
- Project
Name string - Project name, which is the project associated with the current resource. Only projects with permissions under the current identity can be associated. Default is default.
- Redirect
Url string - Redirect target URL. Only effective when PageMode=2.
- client_
ip string - Client IP. Value is fixed as ALL, meaning it applies to all source IPs.
- description string
- Rule description.
- host string
- Domain name. The website domain name to be protected. Before calling, make sure the domain name has been added to the current WAF instance.
- name string
- Rule name. Must start with a Chinese character, letter, or number. Allows Chinese characters, letters, numbers, periods (.), underscores (_), and hyphens (-). Length: 1–128 characters.
- page_
mode number - Response page mode. 0: Custom response body; 2: Redirect URL.
- policy number
- Associated protection policy. 1: Observe; 8: Block.
- url string
- URL path where the rule takes effect.
- accurate object
- Advanced condition configuration. Only takes effect when Advanced=1.
- advanced number
- Enable advanced conditions. 0: Off (default); 1: On. If enabled, Accurate must also be configured.
- body string
- Custom response page content. Maximum length: 4096 bytes. Only effective when PageMode=0.
- code string
- Custom response status code, such as 403, 405, 503. Only effective when PageMode=0.
- content_
type string - Custom response Content-Type response header. For example: text/html, application/json, etc. Only effective when PageMode=0.
- enable number
- Rule switch. 0: Off; 1: On.
- project_
name string - Project name, which is the project associated with the current resource. Only projects with permissions under the current identity can be associated. Default is default.
- redirect_
url string - Redirect target URL. Only effective when PageMode=2.
- client
Ip String - Client IP. Value is fixed as ALL, meaning it applies to all source IPs.
- description String
- Rule description.
- host String
- Domain name. The website domain name to be protected. Before calling, make sure the domain name has been added to the current WAF instance.
- name String
- Rule name. Must start with a Chinese character, letter, or number. Allows Chinese characters, letters, numbers, periods (.), underscores (_), and hyphens (-). Length: 1–128 characters.
- page
Mode Integer - Response page mode. 0: Custom response body; 2: Redirect URL.
- policy Integer
- Associated protection policy. 1: Observe; 8: Block.
- url String
- URL path where the rule takes effect.
- accurate
Custom
Page Accurate - Advanced condition configuration. Only takes effect when Advanced=1.
- advanced Integer
- Enable advanced conditions. 0: Off (default); 1: On. If enabled, Accurate must also be configured.
- body String
- Custom response page content. Maximum length: 4096 bytes. Only effective when PageMode=0.
- code String
- Custom response status code, such as 403, 405, 503. Only effective when PageMode=0.
- content
Type String - Custom response Content-Type response header. For example: text/html, application/json, etc. Only effective when PageMode=0.
- enable Integer
- Rule switch. 0: Off; 1: On.
- project
Name String - Project name, which is the project associated with the current resource. Only projects with permissions under the current identity can be associated. Default is default.
- redirect
Url String - Redirect target URL. Only effective when PageMode=2.
- client
Ip string - Client IP. Value is fixed as ALL, meaning it applies to all source IPs.
- description string
- Rule description.
- host string
- Domain name. The website domain name to be protected. Before calling, make sure the domain name has been added to the current WAF instance.
- name string
- Rule name. Must start with a Chinese character, letter, or number. Allows Chinese characters, letters, numbers, periods (.), underscores (_), and hyphens (-). Length: 1–128 characters.
- page
Mode number - Response page mode. 0: Custom response body; 2: Redirect URL.
- policy number
- Associated protection policy. 1: Observe; 8: Block.
- url string
- URL path where the rule takes effect.
- accurate
Custom
Page Accurate - Advanced condition configuration. Only takes effect when Advanced=1.
- advanced number
- Enable advanced conditions. 0: Off (default); 1: On. If enabled, Accurate must also be configured.
- body string
- Custom response page content. Maximum length: 4096 bytes. Only effective when PageMode=0.
- code string
- Custom response status code, such as 403, 405, 503. Only effective when PageMode=0.
- content
Type string - Custom response Content-Type response header. For example: text/html, application/json, etc. Only effective when PageMode=0.
- enable number
- Rule switch. 0: Off; 1: On.
- project
Name string - Project name, which is the project associated with the current resource. Only projects with permissions under the current identity can be associated. Default is default.
- redirect
Url string - Redirect target URL. Only effective when PageMode=2.
- client_
ip str - Client IP. Value is fixed as ALL, meaning it applies to all source IPs.
- description str
- Rule description.
- host str
- Domain name. The website domain name to be protected. Before calling, make sure the domain name has been added to the current WAF instance.
- name str
- Rule name. Must start with a Chinese character, letter, or number. Allows Chinese characters, letters, numbers, periods (.), underscores (_), and hyphens (-). Length: 1–128 characters.
- page_
mode int - Response page mode. 0: Custom response body; 2: Redirect URL.
- policy int
- Associated protection policy. 1: Observe; 8: Block.
- url str
- URL path where the rule takes effect.
- accurate
Custom
Page Accurate Args - Advanced condition configuration. Only takes effect when Advanced=1.
- advanced int
- Enable advanced conditions. 0: Off (default); 1: On. If enabled, Accurate must also be configured.
- body str
- Custom response page content. Maximum length: 4096 bytes. Only effective when PageMode=0.
- code str
- Custom response status code, such as 403, 405, 503. Only effective when PageMode=0.
- content_
type str - Custom response Content-Type response header. For example: text/html, application/json, etc. Only effective when PageMode=0.
- enable int
- Rule switch. 0: Off; 1: On.
- project_
name str - Project name, which is the project associated with the current resource. Only projects with permissions under the current identity can be associated. Default is default.
- redirect_
url str - Redirect target URL. Only effective when PageMode=2.
- client
Ip String - Client IP. Value is fixed as ALL, meaning it applies to all source IPs.
- description String
- Rule description.
- host String
- Domain name. The website domain name to be protected. Before calling, make sure the domain name has been added to the current WAF instance.
- name String
- Rule name. Must start with a Chinese character, letter, or number. Allows Chinese characters, letters, numbers, periods (.), underscores (_), and hyphens (-). Length: 1–128 characters.
- page
Mode Number - Response page mode. 0: Custom response body; 2: Redirect URL.
- policy Number
- Associated protection policy. 1: Observe; 8: Block.
- url String
- URL path where the rule takes effect.
- accurate Property Map
- Advanced condition configuration. Only takes effect when Advanced=1.
- advanced Number
- Enable advanced conditions. 0: Off (default); 1: On. If enabled, Accurate must also be configured.
- body String
- Custom response page content. Maximum length: 4096 bytes. Only effective when PageMode=0.
- code String
- Custom response status code, such as 403, 405, 503. Only effective when PageMode=0.
- content
Type String - Custom response Content-Type response header. For example: text/html, application/json, etc. Only effective when PageMode=0.
- enable Number
- Rule switch. 0: Off; 1: On.
- project
Name String - Project name, which is the project associated with the current resource. Only projects with permissions under the current identity can be associated. Default is default.
- redirect
Url String - Redirect target URL. Only effective when PageMode=2.
Outputs
All input properties are implicitly available as output properties. Additionally, the CustomPage resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Rule
Id string - Custom block response rule ID.
- Rule
Tag string - Rule display ID. The RuleTag prefix for custom interception response rules is always B, consisting of the prefix B and a 12-digit RuleId (zero-padded in the middle if fewer than 12 digits). For example, RuleId=116869 corresponds to RuleTag=B000000116869.
- Update
Time string - Last updated time of the rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- Rule
Id string - Custom block response rule ID.
- Rule
Tag string - Rule display ID. The RuleTag prefix for custom interception response rules is always B, consisting of the prefix B and a 12-digit RuleId (zero-padded in the middle if fewer than 12 digits). For example, RuleId=116869 corresponds to RuleTag=B000000116869.
- Update
Time string - Last updated time of the rule.
- id string
- The provider-assigned unique ID for this managed resource.
- rule_
id string - Custom block response rule ID.
- rule_
tag string - Rule display ID. The RuleTag prefix for custom interception response rules is always B, consisting of the prefix B and a 12-digit RuleId (zero-padded in the middle if fewer than 12 digits). For example, RuleId=116869 corresponds to RuleTag=B000000116869.
- update_
time string - Last updated time of the rule.
- id String
- The provider-assigned unique ID for this managed resource.
- rule
Id String - Custom block response rule ID.
- rule
Tag String - Rule display ID. The RuleTag prefix for custom interception response rules is always B, consisting of the prefix B and a 12-digit RuleId (zero-padded in the middle if fewer than 12 digits). For example, RuleId=116869 corresponds to RuleTag=B000000116869.
- update
Time String - Last updated time of the rule.
- id string
- The provider-assigned unique ID for this managed resource.
- rule
Id string - Custom block response rule ID.
- rule
Tag string - Rule display ID. The RuleTag prefix for custom interception response rules is always B, consisting of the prefix B and a 12-digit RuleId (zero-padded in the middle if fewer than 12 digits). For example, RuleId=116869 corresponds to RuleTag=B000000116869.
- update
Time string - Last updated time of the rule.
- id str
- The provider-assigned unique ID for this managed resource.
- rule_
id str - Custom block response rule ID.
- rule_
tag str - Rule display ID. The RuleTag prefix for custom interception response rules is always B, consisting of the prefix B and a 12-digit RuleId (zero-padded in the middle if fewer than 12 digits). For example, RuleId=116869 corresponds to RuleTag=B000000116869.
- update_
time str - Last updated time of the rule.
- id String
- The provider-assigned unique ID for this managed resource.
- rule
Id String - Custom block response rule ID.
- rule
Tag String - Rule display ID. The RuleTag prefix for custom interception response rules is always B, consisting of the prefix B and a 12-digit RuleId (zero-padded in the middle if fewer than 12 digits). For example, RuleId=116869 corresponds to RuleTag=B000000116869.
- update
Time String - Last updated time of the rule.
Look up Existing CustomPage Resource
Get an existing CustomPage 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?: CustomPageState, opts?: CustomResourceOptions): CustomPage@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
accurate: Optional[CustomPageAccurateArgs] = None,
advanced: Optional[int] = None,
body: Optional[str] = None,
client_ip: Optional[str] = None,
code: Optional[str] = None,
content_type: Optional[str] = None,
description: Optional[str] = None,
enable: Optional[int] = None,
host: Optional[str] = None,
name: Optional[str] = None,
page_mode: Optional[int] = None,
policy: Optional[int] = None,
project_name: Optional[str] = None,
redirect_url: Optional[str] = None,
rule_id: Optional[str] = None,
rule_tag: Optional[str] = None,
update_time: Optional[str] = None,
url: Optional[str] = None) -> CustomPagefunc GetCustomPage(ctx *Context, name string, id IDInput, state *CustomPageState, opts ...ResourceOption) (*CustomPage, error)public static CustomPage Get(string name, Input<string> id, CustomPageState? state, CustomResourceOptions? opts = null)public static CustomPage get(String name, Output<String> id, CustomPageState state, CustomResourceOptions options)resources: _: type: volcenginecc:waf:CustomPage get: id: ${id}import {
to = volcenginecc_waf_custom_page.example
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.
- Accurate
Volcengine.
Custom Page Accurate - Advanced condition configuration. Only takes effect when Advanced=1.
- Advanced int
- Enable advanced conditions. 0: Off (default); 1: On. If enabled, Accurate must also be configured.
- Body string
- Custom response page content. Maximum length: 4096 bytes. Only effective when PageMode=0.
- Client
Ip string - Client IP. Value is fixed as ALL, meaning it applies to all source IPs.
- Code string
- Custom response status code, such as 403, 405, 503. Only effective when PageMode=0.
- Content
Type string - Custom response Content-Type response header. For example: text/html, application/json, etc. Only effective when PageMode=0.
- Description string
- Rule description.
- Enable int
- Rule switch. 0: Off; 1: On.
- Host string
- Domain name. The website domain name to be protected. Before calling, make sure the domain name has been added to the current WAF instance.
- Name string
- Rule name. Must start with a Chinese character, letter, or number. Allows Chinese characters, letters, numbers, periods (.), underscores (_), and hyphens (-). Length: 1–128 characters.
- Page
Mode int - Response page mode. 0: Custom response body; 2: Redirect URL.
- Policy int
- Associated protection policy. 1: Observe; 8: Block.
- Project
Name string - Project name, which is the project associated with the current resource. Only projects with permissions under the current identity can be associated. Default is default.
- Redirect
Url string - Redirect target URL. Only effective when PageMode=2.
- Rule
Id string - Custom block response rule ID.
- Rule
Tag string - Rule display ID. The RuleTag prefix for custom interception response rules is always B, consisting of the prefix B and a 12-digit RuleId (zero-padded in the middle if fewer than 12 digits). For example, RuleId=116869 corresponds to RuleTag=B000000116869.
- Update
Time string - Last updated time of the rule.
- Url string
- URL path where the rule takes effect.
- Accurate
Custom
Page Accurate Args - Advanced condition configuration. Only takes effect when Advanced=1.
- Advanced int
- Enable advanced conditions. 0: Off (default); 1: On. If enabled, Accurate must also be configured.
- Body string
- Custom response page content. Maximum length: 4096 bytes. Only effective when PageMode=0.
- Client
Ip string - Client IP. Value is fixed as ALL, meaning it applies to all source IPs.
- Code string
- Custom response status code, such as 403, 405, 503. Only effective when PageMode=0.
- Content
Type string - Custom response Content-Type response header. For example: text/html, application/json, etc. Only effective when PageMode=0.
- Description string
- Rule description.
- Enable int
- Rule switch. 0: Off; 1: On.
- Host string
- Domain name. The website domain name to be protected. Before calling, make sure the domain name has been added to the current WAF instance.
- Name string
- Rule name. Must start with a Chinese character, letter, or number. Allows Chinese characters, letters, numbers, periods (.), underscores (_), and hyphens (-). Length: 1–128 characters.
- Page
Mode int - Response page mode. 0: Custom response body; 2: Redirect URL.
- Policy int
- Associated protection policy. 1: Observe; 8: Block.
- Project
Name string - Project name, which is the project associated with the current resource. Only projects with permissions under the current identity can be associated. Default is default.
- Redirect
Url string - Redirect target URL. Only effective when PageMode=2.
- Rule
Id string - Custom block response rule ID.
- Rule
Tag string - Rule display ID. The RuleTag prefix for custom interception response rules is always B, consisting of the prefix B and a 12-digit RuleId (zero-padded in the middle if fewer than 12 digits). For example, RuleId=116869 corresponds to RuleTag=B000000116869.
- Update
Time string - Last updated time of the rule.
- Url string
- URL path where the rule takes effect.
- accurate object
- Advanced condition configuration. Only takes effect when Advanced=1.
- advanced number
- Enable advanced conditions. 0: Off (default); 1: On. If enabled, Accurate must also be configured.
- body string
- Custom response page content. Maximum length: 4096 bytes. Only effective when PageMode=0.
- client_
ip string - Client IP. Value is fixed as ALL, meaning it applies to all source IPs.
- code string
- Custom response status code, such as 403, 405, 503. Only effective when PageMode=0.
- content_
type string - Custom response Content-Type response header. For example: text/html, application/json, etc. Only effective when PageMode=0.
- description string
- Rule description.
- enable number
- Rule switch. 0: Off; 1: On.
- host string
- Domain name. The website domain name to be protected. Before calling, make sure the domain name has been added to the current WAF instance.
- name string
- Rule name. Must start with a Chinese character, letter, or number. Allows Chinese characters, letters, numbers, periods (.), underscores (_), and hyphens (-). Length: 1–128 characters.
- page_
mode number - Response page mode. 0: Custom response body; 2: Redirect URL.
- policy number
- Associated protection policy. 1: Observe; 8: Block.
- project_
name string - Project name, which is the project associated with the current resource. Only projects with permissions under the current identity can be associated. Default is default.
- redirect_
url string - Redirect target URL. Only effective when PageMode=2.
- rule_
id string - Custom block response rule ID.
- rule_
tag string - Rule display ID. The RuleTag prefix for custom interception response rules is always B, consisting of the prefix B and a 12-digit RuleId (zero-padded in the middle if fewer than 12 digits). For example, RuleId=116869 corresponds to RuleTag=B000000116869.
- update_
time string - Last updated time of the rule.
- url string
- URL path where the rule takes effect.
- accurate
Custom
Page Accurate - Advanced condition configuration. Only takes effect when Advanced=1.
- advanced Integer
- Enable advanced conditions. 0: Off (default); 1: On. If enabled, Accurate must also be configured.
- body String
- Custom response page content. Maximum length: 4096 bytes. Only effective when PageMode=0.
- client
Ip String - Client IP. Value is fixed as ALL, meaning it applies to all source IPs.
- code String
- Custom response status code, such as 403, 405, 503. Only effective when PageMode=0.
- content
Type String - Custom response Content-Type response header. For example: text/html, application/json, etc. Only effective when PageMode=0.
- description String
- Rule description.
- enable Integer
- Rule switch. 0: Off; 1: On.
- host String
- Domain name. The website domain name to be protected. Before calling, make sure the domain name has been added to the current WAF instance.
- name String
- Rule name. Must start with a Chinese character, letter, or number. Allows Chinese characters, letters, numbers, periods (.), underscores (_), and hyphens (-). Length: 1–128 characters.
- page
Mode Integer - Response page mode. 0: Custom response body; 2: Redirect URL.
- policy Integer
- Associated protection policy. 1: Observe; 8: Block.
- project
Name String - Project name, which is the project associated with the current resource. Only projects with permissions under the current identity can be associated. Default is default.
- redirect
Url String - Redirect target URL. Only effective when PageMode=2.
- rule
Id String - Custom block response rule ID.
- rule
Tag String - Rule display ID. The RuleTag prefix for custom interception response rules is always B, consisting of the prefix B and a 12-digit RuleId (zero-padded in the middle if fewer than 12 digits). For example, RuleId=116869 corresponds to RuleTag=B000000116869.
- update
Time String - Last updated time of the rule.
- url String
- URL path where the rule takes effect.
- accurate
Custom
Page Accurate - Advanced condition configuration. Only takes effect when Advanced=1.
- advanced number
- Enable advanced conditions. 0: Off (default); 1: On. If enabled, Accurate must also be configured.
- body string
- Custom response page content. Maximum length: 4096 bytes. Only effective when PageMode=0.
- client
Ip string - Client IP. Value is fixed as ALL, meaning it applies to all source IPs.
- code string
- Custom response status code, such as 403, 405, 503. Only effective when PageMode=0.
- content
Type string - Custom response Content-Type response header. For example: text/html, application/json, etc. Only effective when PageMode=0.
- description string
- Rule description.
- enable number
- Rule switch. 0: Off; 1: On.
- host string
- Domain name. The website domain name to be protected. Before calling, make sure the domain name has been added to the current WAF instance.
- name string
- Rule name. Must start with a Chinese character, letter, or number. Allows Chinese characters, letters, numbers, periods (.), underscores (_), and hyphens (-). Length: 1–128 characters.
- page
Mode number - Response page mode. 0: Custom response body; 2: Redirect URL.
- policy number
- Associated protection policy. 1: Observe; 8: Block.
- project
Name string - Project name, which is the project associated with the current resource. Only projects with permissions under the current identity can be associated. Default is default.
- redirect
Url string - Redirect target URL. Only effective when PageMode=2.
- rule
Id string - Custom block response rule ID.
- rule
Tag string - Rule display ID. The RuleTag prefix for custom interception response rules is always B, consisting of the prefix B and a 12-digit RuleId (zero-padded in the middle if fewer than 12 digits). For example, RuleId=116869 corresponds to RuleTag=B000000116869.
- update
Time string - Last updated time of the rule.
- url string
- URL path where the rule takes effect.
- accurate
Custom
Page Accurate Args - Advanced condition configuration. Only takes effect when Advanced=1.
- advanced int
- Enable advanced conditions. 0: Off (default); 1: On. If enabled, Accurate must also be configured.
- body str
- Custom response page content. Maximum length: 4096 bytes. Only effective when PageMode=0.
- client_
ip str - Client IP. Value is fixed as ALL, meaning it applies to all source IPs.
- code str
- Custom response status code, such as 403, 405, 503. Only effective when PageMode=0.
- content_
type str - Custom response Content-Type response header. For example: text/html, application/json, etc. Only effective when PageMode=0.
- description str
- Rule description.
- enable int
- Rule switch. 0: Off; 1: On.
- host str
- Domain name. The website domain name to be protected. Before calling, make sure the domain name has been added to the current WAF instance.
- name str
- Rule name. Must start with a Chinese character, letter, or number. Allows Chinese characters, letters, numbers, periods (.), underscores (_), and hyphens (-). Length: 1–128 characters.
- page_
mode int - Response page mode. 0: Custom response body; 2: Redirect URL.
- policy int
- Associated protection policy. 1: Observe; 8: Block.
- project_
name str - Project name, which is the project associated with the current resource. Only projects with permissions under the current identity can be associated. Default is default.
- redirect_
url str - Redirect target URL. Only effective when PageMode=2.
- rule_
id str - Custom block response rule ID.
- rule_
tag str - Rule display ID. The RuleTag prefix for custom interception response rules is always B, consisting of the prefix B and a 12-digit RuleId (zero-padded in the middle if fewer than 12 digits). For example, RuleId=116869 corresponds to RuleTag=B000000116869.
- update_
time str - Last updated time of the rule.
- url str
- URL path where the rule takes effect.
- accurate Property Map
- Advanced condition configuration. Only takes effect when Advanced=1.
- advanced Number
- Enable advanced conditions. 0: Off (default); 1: On. If enabled, Accurate must also be configured.
- body String
- Custom response page content. Maximum length: 4096 bytes. Only effective when PageMode=0.
- client
Ip String - Client IP. Value is fixed as ALL, meaning it applies to all source IPs.
- code String
- Custom response status code, such as 403, 405, 503. Only effective when PageMode=0.
- content
Type String - Custom response Content-Type response header. For example: text/html, application/json, etc. Only effective when PageMode=0.
- description String
- Rule description.
- enable Number
- Rule switch. 0: Off; 1: On.
- host String
- Domain name. The website domain name to be protected. Before calling, make sure the domain name has been added to the current WAF instance.
- name String
- Rule name. Must start with a Chinese character, letter, or number. Allows Chinese characters, letters, numbers, periods (.), underscores (_), and hyphens (-). Length: 1–128 characters.
- page
Mode Number - Response page mode. 0: Custom response body; 2: Redirect URL.
- policy Number
- Associated protection policy. 1: Observe; 8: Block.
- project
Name String - Project name, which is the project associated with the current resource. Only projects with permissions under the current identity can be associated. Default is default.
- redirect
Url String - Redirect target URL. Only effective when PageMode=2.
- rule
Id String - Custom block response rule ID.
- rule
Tag String - Rule display ID. The RuleTag prefix for custom interception response rules is always B, consisting of the prefix B and a 12-digit RuleId (zero-padded in the middle if fewer than 12 digits). For example, RuleId=116869 corresponds to RuleTag=B000000116869.
- update
Time String - Last updated time of the rule.
- url String
- URL path where the rule takes effect.
Supporting Types
CustomPageAccurate, CustomPageAccurateArgs
- Accurate
Rules List<Volcengine.Custom Page Accurate Accurate Rule> - Sub-rule list in advanced conditions. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Logic int
- Logical relationship between sub-rules. 0: OR; 1: AND.
- Accurate
Rules []CustomPage Accurate Accurate Rule - Sub-rule list in advanced conditions. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Logic int
- Logical relationship between sub-rules. 0: OR; 1: AND.
- accurate_
rules list(object) - Sub-rule list in advanced conditions. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- logic number
- Logical relationship between sub-rules. 0: OR; 1: AND.
- accurate
Rules List<CustomPage Accurate Accurate Rule> - Sub-rule list in advanced conditions. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- logic Integer
- Logical relationship between sub-rules. 0: OR; 1: AND.
- accurate
Rules CustomPage Accurate Accurate Rule[] - Sub-rule list in advanced conditions. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- logic number
- Logical relationship between sub-rules. 0: OR; 1: AND.
- accurate_
rules Sequence[CustomPage Accurate Accurate Rule] - Sub-rule list in advanced conditions. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- logic int
- Logical relationship between sub-rules. 0: OR; 1: AND.
- accurate
Rules List<Property Map> - Sub-rule list in advanced conditions. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- logic Number
- Logical relationship between sub-rules. 0: OR; 1: AND.
CustomPageAccurateAccurateRule, CustomPageAccurateAccurateRuleArgs
- Http
Obj string - Matching object. For example: request.uri, request.header, request.header.clientip, request.queryargs.abc, request.header.custom-header, request.cookie.custom-cookie, etc.
- Obj
Type int - Matching object type enumeration. 0: Request protocol; 1: Request URI; 2: Request method; 3: Request path; 4: Request parameter; 5: Request header; 6: User-Agent; 7: Referer; 8: Cookie; 9: Request body length; 10: Request body format; 11: X-Forwarded-For; 12: Client IP; 13: Custom Args; 14: Custom Header; 15: Custom Cookie.
- Opretar int
- Matching operator enumeration. 0–5: numerical comparison; 6–11: substring match; 12–15: set match; 16: regex; 17–21: IP recognition (only for request.header.clientip or custom objects).
- Property int
- Matching attribute type enumeration. 0: Value; 5: IP (used only when Operator=17~21).
- Value
String string - Matching value. For IP recognition operations with Operator=17~21, no matching content is involved and this can be an empty string; for other operators, enter the actual matching value.
- Http
Obj string - Matching object. For example: request.uri, request.header, request.header.clientip, request.queryargs.abc, request.header.custom-header, request.cookie.custom-cookie, etc.
- Obj
Type int - Matching object type enumeration. 0: Request protocol; 1: Request URI; 2: Request method; 3: Request path; 4: Request parameter; 5: Request header; 6: User-Agent; 7: Referer; 8: Cookie; 9: Request body length; 10: Request body format; 11: X-Forwarded-For; 12: Client IP; 13: Custom Args; 14: Custom Header; 15: Custom Cookie.
- Opretar int
- Matching operator enumeration. 0–5: numerical comparison; 6–11: substring match; 12–15: set match; 16: regex; 17–21: IP recognition (only for request.header.clientip or custom objects).
- Property int
- Matching attribute type enumeration. 0: Value; 5: IP (used only when Operator=17~21).
- Value
String string - Matching value. For IP recognition operations with Operator=17~21, no matching content is involved and this can be an empty string; for other operators, enter the actual matching value.
- http_
obj string - Matching object. For example: request.uri, request.header, request.header.clientip, request.queryargs.abc, request.header.custom-header, request.cookie.custom-cookie, etc.
- obj_
type number - Matching object type enumeration. 0: Request protocol; 1: Request URI; 2: Request method; 3: Request path; 4: Request parameter; 5: Request header; 6: User-Agent; 7: Referer; 8: Cookie; 9: Request body length; 10: Request body format; 11: X-Forwarded-For; 12: Client IP; 13: Custom Args; 14: Custom Header; 15: Custom Cookie.
- opretar number
- Matching operator enumeration. 0–5: numerical comparison; 6–11: substring match; 12–15: set match; 16: regex; 17–21: IP recognition (only for request.header.clientip or custom objects).
- property number
- Matching attribute type enumeration. 0: Value; 5: IP (used only when Operator=17~21).
- value_
string string - Matching value. For IP recognition operations with Operator=17~21, no matching content is involved and this can be an empty string; for other operators, enter the actual matching value.
- http
Obj String - Matching object. For example: request.uri, request.header, request.header.clientip, request.queryargs.abc, request.header.custom-header, request.cookie.custom-cookie, etc.
- obj
Type Integer - Matching object type enumeration. 0: Request protocol; 1: Request URI; 2: Request method; 3: Request path; 4: Request parameter; 5: Request header; 6: User-Agent; 7: Referer; 8: Cookie; 9: Request body length; 10: Request body format; 11: X-Forwarded-For; 12: Client IP; 13: Custom Args; 14: Custom Header; 15: Custom Cookie.
- opretar Integer
- Matching operator enumeration. 0–5: numerical comparison; 6–11: substring match; 12–15: set match; 16: regex; 17–21: IP recognition (only for request.header.clientip or custom objects).
- property Integer
- Matching attribute type enumeration. 0: Value; 5: IP (used only when Operator=17~21).
- value
String String - Matching value. For IP recognition operations with Operator=17~21, no matching content is involved and this can be an empty string; for other operators, enter the actual matching value.
- http
Obj string - Matching object. For example: request.uri, request.header, request.header.clientip, request.queryargs.abc, request.header.custom-header, request.cookie.custom-cookie, etc.
- obj
Type number - Matching object type enumeration. 0: Request protocol; 1: Request URI; 2: Request method; 3: Request path; 4: Request parameter; 5: Request header; 6: User-Agent; 7: Referer; 8: Cookie; 9: Request body length; 10: Request body format; 11: X-Forwarded-For; 12: Client IP; 13: Custom Args; 14: Custom Header; 15: Custom Cookie.
- opretar number
- Matching operator enumeration. 0–5: numerical comparison; 6–11: substring match; 12–15: set match; 16: regex; 17–21: IP recognition (only for request.header.clientip or custom objects).
- property number
- Matching attribute type enumeration. 0: Value; 5: IP (used only when Operator=17~21).
- value
String string - Matching value. For IP recognition operations with Operator=17~21, no matching content is involved and this can be an empty string; for other operators, enter the actual matching value.
- http_
obj str - Matching object. For example: request.uri, request.header, request.header.clientip, request.queryargs.abc, request.header.custom-header, request.cookie.custom-cookie, etc.
- obj_
type int - Matching object type enumeration. 0: Request protocol; 1: Request URI; 2: Request method; 3: Request path; 4: Request parameter; 5: Request header; 6: User-Agent; 7: Referer; 8: Cookie; 9: Request body length; 10: Request body format; 11: X-Forwarded-For; 12: Client IP; 13: Custom Args; 14: Custom Header; 15: Custom Cookie.
- opretar int
- Matching operator enumeration. 0–5: numerical comparison; 6–11: substring match; 12–15: set match; 16: regex; 17–21: IP recognition (only for request.header.clientip or custom objects).
- property int
- Matching attribute type enumeration. 0: Value; 5: IP (used only when Operator=17~21).
- value_
string str - Matching value. For IP recognition operations with Operator=17~21, no matching content is involved and this can be an empty string; for other operators, enter the actual matching value.
- http
Obj String - Matching object. For example: request.uri, request.header, request.header.clientip, request.queryargs.abc, request.header.custom-header, request.cookie.custom-cookie, etc.
- obj
Type Number - Matching object type enumeration. 0: Request protocol; 1: Request URI; 2: Request method; 3: Request path; 4: Request parameter; 5: Request header; 6: User-Agent; 7: Referer; 8: Cookie; 9: Request body length; 10: Request body format; 11: X-Forwarded-For; 12: Client IP; 13: Custom Args; 14: Custom Header; 15: Custom Cookie.
- opretar Number
- Matching operator enumeration. 0–5: numerical comparison; 6–11: substring match; 12–15: set match; 16: regex; 17–21: IP recognition (only for request.header.clientip or custom objects).
- property Number
- Matching attribute type enumeration. 0: Value; 5: IP (used only when Operator=17~21).
- value
String String - Matching value. For IP recognition operations with Operator=17~21, no matching content is involved and this can be an empty string; for other operators, enter the actual matching value.
Import
$ pulumi import volcenginecc:waf/customPage:CustomPage example "host|rule_id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcenginecc volcengine/pulumi-volcenginecc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
volcengineccTerraform Provider.
published on Thursday, Sep 3, 2026 by Volcengine