1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. WafRuleCcProtection
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

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\"}",
});
Copy
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\"}")
Copy
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
	})
}
Copy
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\"}",
    });

});
Copy
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());

    }
}
Copy
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"}'
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. WafRuleCcProtectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. WafRuleCcProtectionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. WafRuleCcProtectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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",
});
Copy
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"),
})
Copy
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());
Copy
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")
Copy
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",
});
Copy
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
Copy

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 This property is required. 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.

LimitNum This property is required. double
Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
LimitPeriod This property is required. double
Specifies the rate limiting period. The value ranges from 0 seconds to 2^32 seconds.
Mode This property is required. 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 This property is required. 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*.
PolicyId This property is required. string
Specifies the WAF policy ID. Changing this creates a new rule.
BlockPageContent string
Specifies the content of the returned page. Changing this will create a new resource.
BlockPageType string
Specifies the type of the returned page. The options are application/json, text/html, and text/xml. Changing this will create a new resource.
BlockTime 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 when mode is set to other.
Cookie string
Specifies the cookie name. This field is mandatory when mode is set to cookie.
WafRuleCcProtectionId string
The rule ID in UUID format.
Action This property is required. 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.

LimitNum This property is required. float64
Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
LimitPeriod This property is required. float64
Specifies the rate limiting period. The value ranges from 0 seconds to 2^32 seconds.
Mode This property is required. 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 This property is required. 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*.
PolicyId This property is required. string
Specifies the WAF policy ID. Changing this creates a new rule.
BlockPageContent string
Specifies the content of the returned page. Changing this will create a new resource.
BlockPageType string
Specifies the type of the returned page. The options are application/json, text/html, and text/xml. Changing this will create a new resource.
BlockTime 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 when mode is set to other.
Cookie string
Specifies the cookie name. This field is mandatory when mode is set to cookie.
WafRuleCcProtectionId string
The rule ID in UUID format.
action This property is required. 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.

limitNum This property is required. Double
Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
limitPeriod This property is required. Double
Specifies the rate limiting period. The value ranges from 0 seconds to 2^32 seconds.
mode This property is required. 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 This property is required. 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*.
policyId This property is required. String
Specifies the WAF policy ID. Changing this creates a new rule.
blockPageContent String
Specifies the content of the returned page. Changing this will create a new resource.
blockPageType String
Specifies the type of the returned page. The options are application/json, text/html, and text/xml. Changing this will create a new resource.
blockTime 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 when mode is set to other.
cookie String
Specifies the cookie name. This field is mandatory when mode is set to cookie.
wafRuleCcProtectionId String
The rule ID in UUID format.
action This property is required. 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.

limitNum This property is required. number
Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
limitPeriod This property is required. number
Specifies the rate limiting period. The value ranges from 0 seconds to 2^32 seconds.
mode This property is required. 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 This property is required. 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*.
policyId This property is required. string
Specifies the WAF policy ID. Changing this creates a new rule.
blockPageContent string
Specifies the content of the returned page. Changing this will create a new resource.
blockPageType string
Specifies the type of the returned page. The options are application/json, text/html, and text/xml. Changing this will create a new resource.
blockTime 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 when mode is set to other.
cookie string
Specifies the cookie name. This field is mandatory when mode is set to cookie.
wafRuleCcProtectionId string
The rule ID in UUID format.
action This property is required. 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 This property is required. 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 This property is required. float
Specifies the rate limiting period. The value ranges from 0 seconds to 2^32 seconds.
mode This property is required. 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 This property is required. 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 This property is required. str
Specifies the WAF policy ID. Changing this creates a new rule.
block_page_content str
Specifies the content of the returned page. Changing this will create a new resource.
block_page_type str
Specifies the type of the returned page. The options are application/json, text/html, and text/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 when mode is set to other.
cookie str
Specifies the cookie name. This field is mandatory when mode is set to cookie.
waf_rule_cc_protection_id str
The rule ID in UUID format.
action This property is required. 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.

limitNum This property is required. Number
Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
limitPeriod This property is required. Number
Specifies the rate limiting period. The value ranges from 0 seconds to 2^32 seconds.
mode This property is required. 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 This property is required. 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*.
policyId This property is required. String
Specifies the WAF policy ID. Changing this creates a new rule.
blockPageContent String
Specifies the content of the returned page. Changing this will create a new resource.
blockPageType String
Specifies the type of the returned page. The options are application/json, text/html, and text/xml. Changing this will create a new resource.
blockTime 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 when mode is set to other.
cookie String
Specifies the cookie name. This field is mandatory when mode is set to cookie.
wafRuleCcProtectionId String
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
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.

BlockPageContent string
Specifies the content of the returned page. Changing this will create a new resource.
BlockPageType string
Specifies the type of the returned page. The options are application/json, text/html, and text/xml. Changing this will create a new resource.
BlockTime 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 when mode is set to other.
Cookie string
Specifies the cookie name. This field is mandatory when mode is set to cookie.
LimitNum double
Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
LimitPeriod 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*.
PolicyId string
Specifies the WAF policy ID. Changing this creates a new rule.
WafRuleCcProtectionId string
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.

BlockPageContent string
Specifies the content of the returned page. Changing this will create a new resource.
BlockPageType string
Specifies the type of the returned page. The options are application/json, text/html, and text/xml. Changing this will create a new resource.
BlockTime 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 when mode is set to other.
Cookie string
Specifies the cookie name. This field is mandatory when mode is set to cookie.
LimitNum float64
Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
LimitPeriod 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*.
PolicyId string
Specifies the WAF policy ID. Changing this creates a new rule.
WafRuleCcProtectionId string
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.

blockPageContent String
Specifies the content of the returned page. Changing this will create a new resource.
blockPageType String
Specifies the type of the returned page. The options are application/json, text/html, and text/xml. Changing this will create a new resource.
blockTime 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 when mode is set to other.
cookie String
Specifies the cookie name. This field is mandatory when mode is set to cookie.
limitNum Double
Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
limitPeriod 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*.
policyId String
Specifies the WAF policy ID. Changing this creates a new rule.
wafRuleCcProtectionId String
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.

blockPageContent string
Specifies the content of the returned page. Changing this will create a new resource.
blockPageType string
Specifies the type of the returned page. The options are application/json, text/html, and text/xml. Changing this will create a new resource.
blockTime 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 when mode is set to other.
cookie string
Specifies the cookie name. This field is mandatory when mode is set to cookie.
limitNum number
Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
limitPeriod 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*.
policyId string
Specifies the WAF policy ID. Changing this creates a new rule.
wafRuleCcProtectionId string
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_content str
Specifies the content of the returned page. Changing this will create a new resource.
block_page_type str
Specifies the type of the returned page. The options are application/json, text/html, and text/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 when mode is set to other.
cookie 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_cc_protection_id str
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.

blockPageContent String
Specifies the content of the returned page. Changing this will create a new resource.
blockPageType String
Specifies the type of the returned page. The options are application/json, text/html, and text/xml. Changing this will create a new resource.
blockTime 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 when mode is set to other.
cookie String
Specifies the cookie name. This field is mandatory when mode is set to cookie.
limitNum Number
Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 2^32.
limitPeriod 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*.
policyId String
Specifies the WAF policy ID. Changing this creates a new rule.
wafRuleCcProtectionId String
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
Copy

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.