flexibleengine.WafRuleCcProtection
Explore with Pulumi AI
Manages a WAF CC Attack Protection Rule resource within FlexibleEngine.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const policy1 = new flexibleengine.WafPolicy("policy1", {});
const rule1 = new flexibleengine.WafRuleCcProtection("rule1", {
policyId: policy1.wafPolicyId,
path: "/abc",
limitNum: 10,
limitPeriod: 60,
mode: "cookie",
cookie: "sessionid",
action: "block",
blockTime: 10,
blockPageType: "application/json",
blockPageContent: "{\"error\":\"forbidden\"}",
});
import pulumi
import pulumi_flexibleengine as flexibleengine
policy1 = flexibleengine.WafPolicy("policy1")
rule1 = flexibleengine.WafRuleCcProtection("rule1",
policy_id=policy1.waf_policy_id,
path="/abc",
limit_num=10,
limit_period=60,
mode="cookie",
cookie="sessionid",
action="block",
block_time=10,
block_page_type="application/json",
block_page_content="{\"error\":\"forbidden\"}")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
policy1, err := flexibleengine.NewWafPolicy(ctx, "policy1", nil)
if err != nil {
return err
}
_, err = flexibleengine.NewWafRuleCcProtection(ctx, "rule1", &flexibleengine.WafRuleCcProtectionArgs{
PolicyId: policy1.WafPolicyId,
Path: pulumi.String("/abc"),
LimitNum: pulumi.Float64(10),
LimitPeriod: pulumi.Float64(60),
Mode: pulumi.String("cookie"),
Cookie: pulumi.String("sessionid"),
Action: pulumi.String("block"),
BlockTime: pulumi.Float64(10),
BlockPageType: pulumi.String("application/json"),
BlockPageContent: pulumi.String("{\"error\":\"forbidden\"}"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var policy1 = new Flexibleengine.WafPolicy("policy1");
var rule1 = new Flexibleengine.WafRuleCcProtection("rule1", new()
{
PolicyId = policy1.WafPolicyId,
Path = "/abc",
LimitNum = 10,
LimitPeriod = 60,
Mode = "cookie",
Cookie = "sessionid",
Action = "block",
BlockTime = 10,
BlockPageType = "application/json",
BlockPageContent = "{\"error\":\"forbidden\"}",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.WafPolicy;
import com.pulumi.flexibleengine.WafRuleCcProtection;
import com.pulumi.flexibleengine.WafRuleCcProtectionArgs;
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 policy1 = new WafPolicy("policy1");
var rule1 = new WafRuleCcProtection("rule1", WafRuleCcProtectionArgs.builder()
.policyId(policy1.wafPolicyId())
.path("/abc")
.limitNum(10)
.limitPeriod(60)
.mode("cookie")
.cookie("sessionid")
.action("block")
.blockTime(10)
.blockPageType("application/json")
.blockPageContent("{\"error\":\"forbidden\"}")
.build());
}
}
resources:
policy1:
type: flexibleengine:WafPolicy
rule1:
type: flexibleengine:WafRuleCcProtection
properties:
policyId: ${policy1.wafPolicyId}
path: /abc
limitNum: 10
limitPeriod: 60
mode: cookie
cookie: sessionid
action: block
blockTime: 10
blockPageType: application/json
blockPageContent: '{"error":"forbidden"}'
Create WafRuleCcProtection Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WafRuleCcProtection(name: string, args: WafRuleCcProtectionArgs, opts?: CustomResourceOptions);
@overload
def WafRuleCcProtection(resource_name: str,
args: WafRuleCcProtectionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WafRuleCcProtection(resource_name: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
limit_num: Optional[float] = None,
limit_period: Optional[float] = None,
mode: Optional[str] = None,
path: Optional[str] = None,
policy_id: Optional[str] = None,
block_page_content: Optional[str] = None,
block_page_type: Optional[str] = None,
block_time: Optional[float] = None,
content: Optional[str] = None,
cookie: Optional[str] = None,
waf_rule_cc_protection_id: Optional[str] = None)
func NewWafRuleCcProtection(ctx *Context, name string, args WafRuleCcProtectionArgs, opts ...ResourceOption) (*WafRuleCcProtection, error)
public WafRuleCcProtection(string name, WafRuleCcProtectionArgs args, CustomResourceOptions? opts = null)
public WafRuleCcProtection(String name, WafRuleCcProtectionArgs args)
public WafRuleCcProtection(String name, WafRuleCcProtectionArgs args, CustomResourceOptions options)
type: flexibleengine:WafRuleCcProtection
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 WafRuleCcProtectionArgs
- 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 WafRuleCcProtectionArgs
- 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 WafRuleCcProtectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WafRuleCcProtectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WafRuleCcProtectionArgs
- 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 wafRuleCcProtectionResource = new Flexibleengine.WafRuleCcProtection("wafRuleCcProtectionResource", new()
{
Action = "string",
LimitNum = 0,
LimitPeriod = 0,
Mode = "string",
Path = "string",
PolicyId = "string",
BlockPageContent = "string",
BlockPageType = "string",
BlockTime = 0,
Content = "string",
Cookie = "string",
WafRuleCcProtectionId = "string",
});
example, err := flexibleengine.NewWafRuleCcProtection(ctx, "wafRuleCcProtectionResource", &flexibleengine.WafRuleCcProtectionArgs{
Action: pulumi.String("string"),
LimitNum: pulumi.Float64(0),
LimitPeriod: pulumi.Float64(0),
Mode: pulumi.String("string"),
Path: pulumi.String("string"),
PolicyId: pulumi.String("string"),
BlockPageContent: pulumi.String("string"),
BlockPageType: pulumi.String("string"),
BlockTime: pulumi.Float64(0),
Content: pulumi.String("string"),
Cookie: pulumi.String("string"),
WafRuleCcProtectionId: pulumi.String("string"),
})
var wafRuleCcProtectionResource = new WafRuleCcProtection("wafRuleCcProtectionResource", WafRuleCcProtectionArgs.builder()
.action("string")
.limitNum(0)
.limitPeriod(0)
.mode("string")
.path("string")
.policyId("string")
.blockPageContent("string")
.blockPageType("string")
.blockTime(0)
.content("string")
.cookie("string")
.wafRuleCcProtectionId("string")
.build());
waf_rule_cc_protection_resource = flexibleengine.WafRuleCcProtection("wafRuleCcProtectionResource",
action="string",
limit_num=0,
limit_period=0,
mode="string",
path="string",
policy_id="string",
block_page_content="string",
block_page_type="string",
block_time=0,
content="string",
cookie="string",
waf_rule_cc_protection_id="string")
const wafRuleCcProtectionResource = new flexibleengine.WafRuleCcProtection("wafRuleCcProtectionResource", {
action: "string",
limitNum: 0,
limitPeriod: 0,
mode: "string",
path: "string",
policyId: "string",
blockPageContent: "string",
blockPageType: "string",
blockTime: 0,
content: "string",
cookie: "string",
wafRuleCcProtectionId: "string",
});
type: flexibleengine:WafRuleCcProtection
properties:
action: string
blockPageContent: string
blockPageType: string
blockTime: 0
content: string
cookie: string
limitNum: 0
limitPeriod: 0
mode: string
path: string
policyId: string
wafRuleCcProtectionId: string
WafRuleCcProtection 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 WafRuleCcProtection resource accepts the following input properties:
- Action string
Specifies the action when the number of requests reaches the upper limit. Valid Options are:
- block - block the requests.
- captcha - Verification code. The user needs to enter the correct verification code after blocking to restore the correct access page.
If
mode
is set to other, this parameter value can only be block.- Limit
Num double - Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
- Limit
Period double - Specifies the rate limiting period. The value ranges from 0 seconds to 2^32 seconds.
- Mode string
- Specifies the rate limit mode. Valid Options are:
- ip - A web visitor is identified by the IP address.
- cookie - A web visitor is identified by the cookie key value.
- other - A web visitor is identified by the Referer field(user-defined request source).
- Path string
- Specifies the URL to which the rule applies. The path ending with * indicates that the path is used as a prefix. For example, if the path to be protected is /admin/test.php or /adminabc, set Path to /admin*.
- Policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- Block
Page stringContent - Specifies the content of the returned page. Changing this will create a new resource.
- Block
Page stringType - Specifies the type of the returned page.
The options are
application/json
,text/html
, andtext/xml
. Changing this will create a new resource. - Block
Time double - Specifies the lock duration. The value ranges from 0 seconds to 2^32 seconds.
- Content string
- Specifies the category content. The format is as follows:
http://www.example.com/path
. This field is mandatory whenmode
is set to other. - string
- Specifies the cookie name. This field is mandatory when
mode
is set to cookie. - Waf
Rule stringCc Protection Id - The rule ID in UUID format.
- Action string
Specifies the action when the number of requests reaches the upper limit. Valid Options are:
- block - block the requests.
- captcha - Verification code. The user needs to enter the correct verification code after blocking to restore the correct access page.
If
mode
is set to other, this parameter value can only be block.- Limit
Num float64 - Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
- Limit
Period float64 - Specifies the rate limiting period. The value ranges from 0 seconds to 2^32 seconds.
- Mode string
- Specifies the rate limit mode. Valid Options are:
- ip - A web visitor is identified by the IP address.
- cookie - A web visitor is identified by the cookie key value.
- other - A web visitor is identified by the Referer field(user-defined request source).
- Path string
- Specifies the URL to which the rule applies. The path ending with * indicates that the path is used as a prefix. For example, if the path to be protected is /admin/test.php or /adminabc, set Path to /admin*.
- Policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- Block
Page stringContent - Specifies the content of the returned page. Changing this will create a new resource.
- Block
Page stringType - Specifies the type of the returned page.
The options are
application/json
,text/html
, andtext/xml
. Changing this will create a new resource. - Block
Time float64 - Specifies the lock duration. The value ranges from 0 seconds to 2^32 seconds.
- Content string
- Specifies the category content. The format is as follows:
http://www.example.com/path
. This field is mandatory whenmode
is set to other. - string
- Specifies the cookie name. This field is mandatory when
mode
is set to cookie. - Waf
Rule stringCc Protection Id - The rule ID in UUID format.
- action String
Specifies the action when the number of requests reaches the upper limit. Valid Options are:
- block - block the requests.
- captcha - Verification code. The user needs to enter the correct verification code after blocking to restore the correct access page.
If
mode
is set to other, this parameter value can only be block.- limit
Num Double - Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
- limit
Period Double - Specifies the rate limiting period. The value ranges from 0 seconds to 2^32 seconds.
- mode String
- Specifies the rate limit mode. Valid Options are:
- ip - A web visitor is identified by the IP address.
- cookie - A web visitor is identified by the cookie key value.
- other - A web visitor is identified by the Referer field(user-defined request source).
- path String
- Specifies the URL to which the rule applies. The path ending with * indicates that the path is used as a prefix. For example, if the path to be protected is /admin/test.php or /adminabc, set Path to /admin*.
- policy
Id String - Specifies the WAF policy ID. Changing this creates a new rule.
- block
Page StringContent - Specifies the content of the returned page. Changing this will create a new resource.
- block
Page StringType - Specifies the type of the returned page.
The options are
application/json
,text/html
, andtext/xml
. Changing this will create a new resource. - block
Time Double - Specifies the lock duration. The value ranges from 0 seconds to 2^32 seconds.
- content String
- Specifies the category content. The format is as follows:
http://www.example.com/path
. This field is mandatory whenmode
is set to other. - String
- Specifies the cookie name. This field is mandatory when
mode
is set to cookie. - waf
Rule StringCc Protection Id - The rule ID in UUID format.
- action string
Specifies the action when the number of requests reaches the upper limit. Valid Options are:
- block - block the requests.
- captcha - Verification code. The user needs to enter the correct verification code after blocking to restore the correct access page.
If
mode
is set to other, this parameter value can only be block.- limit
Num number - Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
- limit
Period number - Specifies the rate limiting period. The value ranges from 0 seconds to 2^32 seconds.
- mode string
- Specifies the rate limit mode. Valid Options are:
- ip - A web visitor is identified by the IP address.
- cookie - A web visitor is identified by the cookie key value.
- other - A web visitor is identified by the Referer field(user-defined request source).
- path string
- Specifies the URL to which the rule applies. The path ending with * indicates that the path is used as a prefix. For example, if the path to be protected is /admin/test.php or /adminabc, set Path to /admin*.
- policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- block
Page stringContent - Specifies the content of the returned page. Changing this will create a new resource.
- block
Page stringType - Specifies the type of the returned page.
The options are
application/json
,text/html
, andtext/xml
. Changing this will create a new resource. - block
Time number - Specifies the lock duration. The value ranges from 0 seconds to 2^32 seconds.
- content string
- Specifies the category content. The format is as follows:
http://www.example.com/path
. This field is mandatory whenmode
is set to other. - string
- Specifies the cookie name. This field is mandatory when
mode
is set to cookie. - waf
Rule stringCc Protection Id - The rule ID in UUID format.
- action str
Specifies the action when the number of requests reaches the upper limit. Valid Options are:
- block - block the requests.
- captcha - Verification code. The user needs to enter the correct verification code after blocking to restore the correct access page.
If
mode
is set to other, this parameter value can only be block.- limit_
num float - Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
- limit_
period float - Specifies the rate limiting period. The value ranges from 0 seconds to 2^32 seconds.
- mode str
- Specifies the rate limit mode. Valid Options are:
- ip - A web visitor is identified by the IP address.
- cookie - A web visitor is identified by the cookie key value.
- other - A web visitor is identified by the Referer field(user-defined request source).
- path str
- Specifies the URL to which the rule applies. The path ending with * indicates that the path is used as a prefix. For example, if the path to be protected is /admin/test.php or /adminabc, set Path to /admin*.
- policy_
id str - Specifies the WAF policy ID. Changing this creates a new rule.
- block_
page_ strcontent - Specifies the content of the returned page. Changing this will create a new resource.
- block_
page_ strtype - Specifies the type of the returned page.
The options are
application/json
,text/html
, andtext/xml
. Changing this will create a new resource. - block_
time float - Specifies the lock duration. The value ranges from 0 seconds to 2^32 seconds.
- content str
- Specifies the category content. The format is as follows:
http://www.example.com/path
. This field is mandatory whenmode
is set to other. - str
- Specifies the cookie name. This field is mandatory when
mode
is set to cookie. - waf_
rule_ strcc_ protection_ id - The rule ID in UUID format.
- action String
Specifies the action when the number of requests reaches the upper limit. Valid Options are:
- block - block the requests.
- captcha - Verification code. The user needs to enter the correct verification code after blocking to restore the correct access page.
If
mode
is set to other, this parameter value can only be block.- limit
Num Number - Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
- limit
Period Number - Specifies the rate limiting period. The value ranges from 0 seconds to 2^32 seconds.
- mode String
- Specifies the rate limit mode. Valid Options are:
- ip - A web visitor is identified by the IP address.
- cookie - A web visitor is identified by the cookie key value.
- other - A web visitor is identified by the Referer field(user-defined request source).
- path String
- Specifies the URL to which the rule applies. The path ending with * indicates that the path is used as a prefix. For example, if the path to be protected is /admin/test.php or /adminabc, set Path to /admin*.
- policy
Id String - Specifies the WAF policy ID. Changing this creates a new rule.
- block
Page StringContent - Specifies the content of the returned page. Changing this will create a new resource.
- block
Page StringType - Specifies the type of the returned page.
The options are
application/json
,text/html
, andtext/xml
. Changing this will create a new resource. - block
Time Number - Specifies the lock duration. The value ranges from 0 seconds to 2^32 seconds.
- content String
- Specifies the category content. The format is as follows:
http://www.example.com/path
. This field is mandatory whenmode
is set to other. - String
- Specifies the cookie name. This field is mandatory when
mode
is set to cookie. - waf
Rule StringCc Protection Id - The rule ID in UUID format.
Outputs
All input properties are implicitly available as output properties. Additionally, the WafRuleCcProtection 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 WafRuleCcProtection Resource
Get an existing WafRuleCcProtection 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?: WafRuleCcProtectionState, opts?: CustomResourceOptions): WafRuleCcProtection
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
block_page_content: Optional[str] = None,
block_page_type: Optional[str] = None,
block_time: Optional[float] = None,
content: Optional[str] = None,
cookie: Optional[str] = None,
limit_num: Optional[float] = None,
limit_period: Optional[float] = None,
mode: Optional[str] = None,
path: Optional[str] = None,
policy_id: Optional[str] = None,
waf_rule_cc_protection_id: Optional[str] = None) -> WafRuleCcProtection
func GetWafRuleCcProtection(ctx *Context, name string, id IDInput, state *WafRuleCcProtectionState, opts ...ResourceOption) (*WafRuleCcProtection, error)
public static WafRuleCcProtection Get(string name, Input<string> id, WafRuleCcProtectionState? state, CustomResourceOptions? opts = null)
public static WafRuleCcProtection get(String name, Output<String> id, WafRuleCcProtectionState state, CustomResourceOptions options)
resources: _: type: flexibleengine:WafRuleCcProtection 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.
- Action string
Specifies the action when the number of requests reaches the upper limit. Valid Options are:
- block - block the requests.
- captcha - Verification code. The user needs to enter the correct verification code after blocking to restore the correct access page.
If
mode
is set to other, this parameter value can only be block.- Block
Page stringContent - Specifies the content of the returned page. Changing this will create a new resource.
- Block
Page stringType - Specifies the type of the returned page.
The options are
application/json
,text/html
, andtext/xml
. Changing this will create a new resource. - Block
Time double - Specifies the lock duration. The value ranges from 0 seconds to 2^32 seconds.
- Content string
- Specifies the category content. The format is as follows:
http://www.example.com/path
. This field is mandatory whenmode
is set to other. - string
- Specifies the cookie name. This field is mandatory when
mode
is set to cookie. - Limit
Num double - Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
- Limit
Period double - Specifies the rate limiting period. The value ranges from 0 seconds to 2^32 seconds.
- Mode string
- Specifies the rate limit mode. Valid Options are:
- ip - A web visitor is identified by the IP address.
- cookie - A web visitor is identified by the cookie key value.
- other - A web visitor is identified by the Referer field(user-defined request source).
- Path string
- Specifies the URL to which the rule applies. The path ending with * indicates that the path is used as a prefix. For example, if the path to be protected is /admin/test.php or /adminabc, set Path to /admin*.
- Policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- Waf
Rule stringCc Protection Id - The rule ID in UUID format.
- Action string
Specifies the action when the number of requests reaches the upper limit. Valid Options are:
- block - block the requests.
- captcha - Verification code. The user needs to enter the correct verification code after blocking to restore the correct access page.
If
mode
is set to other, this parameter value can only be block.- Block
Page stringContent - Specifies the content of the returned page. Changing this will create a new resource.
- Block
Page stringType - Specifies the type of the returned page.
The options are
application/json
,text/html
, andtext/xml
. Changing this will create a new resource. - Block
Time float64 - Specifies the lock duration. The value ranges from 0 seconds to 2^32 seconds.
- Content string
- Specifies the category content. The format is as follows:
http://www.example.com/path
. This field is mandatory whenmode
is set to other. - string
- Specifies the cookie name. This field is mandatory when
mode
is set to cookie. - Limit
Num float64 - Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
- Limit
Period float64 - Specifies the rate limiting period. The value ranges from 0 seconds to 2^32 seconds.
- Mode string
- Specifies the rate limit mode. Valid Options are:
- ip - A web visitor is identified by the IP address.
- cookie - A web visitor is identified by the cookie key value.
- other - A web visitor is identified by the Referer field(user-defined request source).
- Path string
- Specifies the URL to which the rule applies. The path ending with * indicates that the path is used as a prefix. For example, if the path to be protected is /admin/test.php or /adminabc, set Path to /admin*.
- Policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- Waf
Rule stringCc Protection Id - The rule ID in UUID format.
- action String
Specifies the action when the number of requests reaches the upper limit. Valid Options are:
- block - block the requests.
- captcha - Verification code. The user needs to enter the correct verification code after blocking to restore the correct access page.
If
mode
is set to other, this parameter value can only be block.- block
Page StringContent - Specifies the content of the returned page. Changing this will create a new resource.
- block
Page StringType - Specifies the type of the returned page.
The options are
application/json
,text/html
, andtext/xml
. Changing this will create a new resource. - block
Time Double - Specifies the lock duration. The value ranges from 0 seconds to 2^32 seconds.
- content String
- Specifies the category content. The format is as follows:
http://www.example.com/path
. This field is mandatory whenmode
is set to other. - String
- Specifies the cookie name. This field is mandatory when
mode
is set to cookie. - limit
Num Double - Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
- limit
Period Double - Specifies the rate limiting period. The value ranges from 0 seconds to 2^32 seconds.
- mode String
- Specifies the rate limit mode. Valid Options are:
- ip - A web visitor is identified by the IP address.
- cookie - A web visitor is identified by the cookie key value.
- other - A web visitor is identified by the Referer field(user-defined request source).
- path String
- Specifies the URL to which the rule applies. The path ending with * indicates that the path is used as a prefix. For example, if the path to be protected is /admin/test.php or /adminabc, set Path to /admin*.
- policy
Id String - Specifies the WAF policy ID. Changing this creates a new rule.
- waf
Rule StringCc Protection Id - The rule ID in UUID format.
- action string
Specifies the action when the number of requests reaches the upper limit. Valid Options are:
- block - block the requests.
- captcha - Verification code. The user needs to enter the correct verification code after blocking to restore the correct access page.
If
mode
is set to other, this parameter value can only be block.- block
Page stringContent - Specifies the content of the returned page. Changing this will create a new resource.
- block
Page stringType - Specifies the type of the returned page.
The options are
application/json
,text/html
, andtext/xml
. Changing this will create a new resource. - block
Time number - Specifies the lock duration. The value ranges from 0 seconds to 2^32 seconds.
- content string
- Specifies the category content. The format is as follows:
http://www.example.com/path
. This field is mandatory whenmode
is set to other. - string
- Specifies the cookie name. This field is mandatory when
mode
is set to cookie. - limit
Num number - Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
- limit
Period number - Specifies the rate limiting period. The value ranges from 0 seconds to 2^32 seconds.
- mode string
- Specifies the rate limit mode. Valid Options are:
- ip - A web visitor is identified by the IP address.
- cookie - A web visitor is identified by the cookie key value.
- other - A web visitor is identified by the Referer field(user-defined request source).
- path string
- Specifies the URL to which the rule applies. The path ending with * indicates that the path is used as a prefix. For example, if the path to be protected is /admin/test.php or /adminabc, set Path to /admin*.
- policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- waf
Rule stringCc Protection Id - The rule ID in UUID format.
- action str
Specifies the action when the number of requests reaches the upper limit. Valid Options are:
- block - block the requests.
- captcha - Verification code. The user needs to enter the correct verification code after blocking to restore the correct access page.
If
mode
is set to other, this parameter value can only be block.- block_
page_ strcontent - Specifies the content of the returned page. Changing this will create a new resource.
- block_
page_ strtype - Specifies the type of the returned page.
The options are
application/json
,text/html
, andtext/xml
. Changing this will create a new resource. - block_
time float - Specifies the lock duration. The value ranges from 0 seconds to 2^32 seconds.
- content str
- Specifies the category content. The format is as follows:
http://www.example.com/path
. This field is mandatory whenmode
is set to other. - str
- Specifies the cookie name. This field is mandatory when
mode
is set to cookie. - limit_
num float - Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
- limit_
period float - Specifies the rate limiting period. The value ranges from 0 seconds to 2^32 seconds.
- mode str
- Specifies the rate limit mode. Valid Options are:
- ip - A web visitor is identified by the IP address.
- cookie - A web visitor is identified by the cookie key value.
- other - A web visitor is identified by the Referer field(user-defined request source).
- path str
- Specifies the URL to which the rule applies. The path ending with * indicates that the path is used as a prefix. For example, if the path to be protected is /admin/test.php or /adminabc, set Path to /admin*.
- policy_
id str - Specifies the WAF policy ID. Changing this creates a new rule.
- waf_
rule_ strcc_ protection_ id - The rule ID in UUID format.
- action String
Specifies the action when the number of requests reaches the upper limit. Valid Options are:
- block - block the requests.
- captcha - Verification code. The user needs to enter the correct verification code after blocking to restore the correct access page.
If
mode
is set to other, this parameter value can only be block.- block
Page StringContent - Specifies the content of the returned page. Changing this will create a new resource.
- block
Page StringType - Specifies the type of the returned page.
The options are
application/json
,text/html
, andtext/xml
. Changing this will create a new resource. - block
Time Number - Specifies the lock duration. The value ranges from 0 seconds to 2^32 seconds.
- content String
- Specifies the category content. The format is as follows:
http://www.example.com/path
. This field is mandatory whenmode
is set to other. - String
- Specifies the cookie name. This field is mandatory when
mode
is set to cookie. - limit
Num Number - Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
- limit
Period Number - Specifies the rate limiting period. The value ranges from 0 seconds to 2^32 seconds.
- mode String
- Specifies the rate limit mode. Valid Options are:
- ip - A web visitor is identified by the IP address.
- cookie - A web visitor is identified by the cookie key value.
- other - A web visitor is identified by the Referer field(user-defined request source).
- path String
- Specifies the URL to which the rule applies. The path ending with * indicates that the path is used as a prefix. For example, if the path to be protected is /admin/test.php or /adminabc, set Path to /admin*.
- policy
Id String - Specifies the WAF policy ID. Changing this creates a new rule.
- waf
Rule StringCc Protection Id - The rule ID in UUID format.
Import
CC Attack Protection Rules can be imported using the policy ID and rule ID
separated by a slash, e.g.:
$ pulumi import flexibleengine:index/wafRuleCcProtection:WafRuleCcProtection rule_1 523083f4543c497faecd25fcfcc0b2a0/dd3c14e91550453f81cff5fc3b7c3e89
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.