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

flexibleengine.WafRulePreciseProtection

Explore with Pulumi AI

flexibleengine logo
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

    Manages a WAF Precise Protection Rule resource within FlexibleEngine.

    Example Usage

    A rule takes effect immediately

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const rule1 = new flexibleengine.WafRulePreciseProtection("rule1", {
        policyId: _var.policy_id,
        priority: 10,
        conditions: [{
            field: "path",
            logic: "prefix",
            content: "/login",
        }],
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    rule1 = flexibleengine.WafRulePreciseProtection("rule1",
        policy_id=var["policy_id"],
        priority=10,
        conditions=[{
            "field": "path",
            "logic": "prefix",
            "content": "/login",
        }])
    
    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 {
    		_, err := flexibleengine.NewWafRulePreciseProtection(ctx, "rule1", &flexibleengine.WafRulePreciseProtectionArgs{
    			PolicyId: pulumi.Any(_var.Policy_id),
    			Priority: pulumi.Float64(10),
    			Conditions: flexibleengine.WafRulePreciseProtectionConditionArray{
    				&flexibleengine.WafRulePreciseProtectionConditionArgs{
    					Field:   pulumi.String("path"),
    					Logic:   pulumi.String("prefix"),
    					Content: pulumi.String("/login"),
    				},
    			},
    		})
    		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 rule1 = new Flexibleengine.WafRulePreciseProtection("rule1", new()
        {
            PolicyId = @var.Policy_id,
            Priority = 10,
            Conditions = new[]
            {
                new Flexibleengine.Inputs.WafRulePreciseProtectionConditionArgs
                {
                    Field = "path",
                    Logic = "prefix",
                    Content = "/login",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.WafRulePreciseProtection;
    import com.pulumi.flexibleengine.WafRulePreciseProtectionArgs;
    import com.pulumi.flexibleengine.inputs.WafRulePreciseProtectionConditionArgs;
    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 rule1 = new WafRulePreciseProtection("rule1", WafRulePreciseProtectionArgs.builder()
                .policyId(var_.policy_id())
                .priority(10)
                .conditions(WafRulePreciseProtectionConditionArgs.builder()
                    .field("path")
                    .logic("prefix")
                    .content("/login")
                    .build())
                .build());
    
        }
    }
    
    resources:
      rule1:
        type: flexibleengine:WafRulePreciseProtection
        properties:
          policyId: ${var.policy_id}
          priority: 10
          conditions:
            - field: path
              logic: prefix
              content: /login
    

    A rule takes effect at the scheduled time

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const rule1 = new flexibleengine.WafRulePreciseProtection("rule1", {
        policyId: _var.policy_id,
        action: "block",
        priority: 20,
        startTime: "2021-07-01 00:00:00",
        endTime: "2021-12-31 23:59:59",
        conditions: [{
            field: "ip",
            logic: "equal",
            content: "192.168.1.1",
        }],
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    rule1 = flexibleengine.WafRulePreciseProtection("rule1",
        policy_id=var["policy_id"],
        action="block",
        priority=20,
        start_time="2021-07-01 00:00:00",
        end_time="2021-12-31 23:59:59",
        conditions=[{
            "field": "ip",
            "logic": "equal",
            "content": "192.168.1.1",
        }])
    
    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 {
    		_, err := flexibleengine.NewWafRulePreciseProtection(ctx, "rule1", &flexibleengine.WafRulePreciseProtectionArgs{
    			PolicyId:  pulumi.Any(_var.Policy_id),
    			Action:    pulumi.String("block"),
    			Priority:  pulumi.Float64(20),
    			StartTime: pulumi.String("2021-07-01 00:00:00"),
    			EndTime:   pulumi.String("2021-12-31 23:59:59"),
    			Conditions: flexibleengine.WafRulePreciseProtectionConditionArray{
    				&flexibleengine.WafRulePreciseProtectionConditionArgs{
    					Field:   pulumi.String("ip"),
    					Logic:   pulumi.String("equal"),
    					Content: pulumi.String("192.168.1.1"),
    				},
    			},
    		})
    		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 rule1 = new Flexibleengine.WafRulePreciseProtection("rule1", new()
        {
            PolicyId = @var.Policy_id,
            Action = "block",
            Priority = 20,
            StartTime = "2021-07-01 00:00:00",
            EndTime = "2021-12-31 23:59:59",
            Conditions = new[]
            {
                new Flexibleengine.Inputs.WafRulePreciseProtectionConditionArgs
                {
                    Field = "ip",
                    Logic = "equal",
                    Content = "192.168.1.1",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.WafRulePreciseProtection;
    import com.pulumi.flexibleengine.WafRulePreciseProtectionArgs;
    import com.pulumi.flexibleengine.inputs.WafRulePreciseProtectionConditionArgs;
    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 rule1 = new WafRulePreciseProtection("rule1", WafRulePreciseProtectionArgs.builder()
                .policyId(var_.policy_id())
                .action("block")
                .priority(20)
                .startTime("2021-07-01 00:00:00")
                .endTime("2021-12-31 23:59:59")
                .conditions(WafRulePreciseProtectionConditionArgs.builder()
                    .field("ip")
                    .logic("equal")
                    .content("192.168.1.1")
                    .build())
                .build());
    
        }
    }
    
    resources:
      rule1:
        type: flexibleengine:WafRulePreciseProtection
        properties:
          policyId: ${var.policy_id}
          action: block
          priority: 20
          startTime: 2021-07-01 00:00:00
          endTime: 2021-12-31 23:59:59
          conditions:
            - field: ip
              logic: equal
              content: 192.168.1.1
    

    Create WafRulePreciseProtection Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new WafRulePreciseProtection(name: string, args: WafRulePreciseProtectionArgs, opts?: CustomResourceOptions);
    @overload
    def WafRulePreciseProtection(resource_name: str,
                                 args: WafRulePreciseProtectionArgs,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def WafRulePreciseProtection(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 conditions: Optional[Sequence[WafRulePreciseProtectionConditionArgs]] = None,
                                 policy_id: Optional[str] = None,
                                 priority: Optional[float] = None,
                                 action: Optional[str] = None,
                                 end_time: Optional[str] = None,
                                 name: Optional[str] = None,
                                 start_time: Optional[str] = None,
                                 waf_rule_precise_protection_id: Optional[str] = None)
    func NewWafRulePreciseProtection(ctx *Context, name string, args WafRulePreciseProtectionArgs, opts ...ResourceOption) (*WafRulePreciseProtection, error)
    public WafRulePreciseProtection(string name, WafRulePreciseProtectionArgs args, CustomResourceOptions? opts = null)
    public WafRulePreciseProtection(String name, WafRulePreciseProtectionArgs args)
    public WafRulePreciseProtection(String name, WafRulePreciseProtectionArgs args, CustomResourceOptions options)
    
    type: flexibleengine:WafRulePreciseProtection
    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 WafRulePreciseProtectionArgs
    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 WafRulePreciseProtectionArgs
    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 WafRulePreciseProtectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WafRulePreciseProtectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WafRulePreciseProtectionArgs
    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 wafRulePreciseProtectionResource = new Flexibleengine.WafRulePreciseProtection("wafRulePreciseProtectionResource", new()
    {
        Conditions = new[]
        {
            new Flexibleengine.Inputs.WafRulePreciseProtectionConditionArgs
            {
                Content = "string",
                Field = "string",
                Logic = "string",
                Subfield = "string",
            },
        },
        PolicyId = "string",
        Priority = 0,
        Action = "string",
        EndTime = "string",
        Name = "string",
        StartTime = "string",
        WafRulePreciseProtectionId = "string",
    });
    
    example, err := flexibleengine.NewWafRulePreciseProtection(ctx, "wafRulePreciseProtectionResource", &flexibleengine.WafRulePreciseProtectionArgs{
    	Conditions: flexibleengine.WafRulePreciseProtectionConditionArray{
    		&flexibleengine.WafRulePreciseProtectionConditionArgs{
    			Content:  pulumi.String("string"),
    			Field:    pulumi.String("string"),
    			Logic:    pulumi.String("string"),
    			Subfield: pulumi.String("string"),
    		},
    	},
    	PolicyId:                   pulumi.String("string"),
    	Priority:                   pulumi.Float64(0),
    	Action:                     pulumi.String("string"),
    	EndTime:                    pulumi.String("string"),
    	Name:                       pulumi.String("string"),
    	StartTime:                  pulumi.String("string"),
    	WafRulePreciseProtectionId: pulumi.String("string"),
    })
    
    var wafRulePreciseProtectionResource = new WafRulePreciseProtection("wafRulePreciseProtectionResource", WafRulePreciseProtectionArgs.builder()
        .conditions(WafRulePreciseProtectionConditionArgs.builder()
            .content("string")
            .field("string")
            .logic("string")
            .subfield("string")
            .build())
        .policyId("string")
        .priority(0)
        .action("string")
        .endTime("string")
        .name("string")
        .startTime("string")
        .wafRulePreciseProtectionId("string")
        .build());
    
    waf_rule_precise_protection_resource = flexibleengine.WafRulePreciseProtection("wafRulePreciseProtectionResource",
        conditions=[{
            "content": "string",
            "field": "string",
            "logic": "string",
            "subfield": "string",
        }],
        policy_id="string",
        priority=0,
        action="string",
        end_time="string",
        name="string",
        start_time="string",
        waf_rule_precise_protection_id="string")
    
    const wafRulePreciseProtectionResource = new flexibleengine.WafRulePreciseProtection("wafRulePreciseProtectionResource", {
        conditions: [{
            content: "string",
            field: "string",
            logic: "string",
            subfield: "string",
        }],
        policyId: "string",
        priority: 0,
        action: "string",
        endTime: "string",
        name: "string",
        startTime: "string",
        wafRulePreciseProtectionId: "string",
    });
    
    type: flexibleengine:WafRulePreciseProtection
    properties:
        action: string
        conditions:
            - content: string
              field: string
              logic: string
              subfield: string
        endTime: string
        name: string
        policyId: string
        priority: 0
        startTime: string
        wafRulePreciseProtectionId: string
    

    WafRulePreciseProtection 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 WafRulePreciseProtection resource accepts the following input properties:

    Conditions List<WafRulePreciseProtectionCondition>
    Specifies the condition parameters. The object structure is documented below.
    PolicyId string
    Specifies the WAF policy ID. Changing this creates a new rule.
    Priority double
    Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
    Action string
    Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
    EndTime string
    Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
    Name string
    Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
    StartTime string
    Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
    WafRulePreciseProtectionId string
    The rule ID in UUID format.
    Conditions []WafRulePreciseProtectionConditionArgs
    Specifies the condition parameters. The object structure is documented below.
    PolicyId string
    Specifies the WAF policy ID. Changing this creates a new rule.
    Priority float64
    Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
    Action string
    Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
    EndTime string
    Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
    Name string
    Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
    StartTime string
    Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
    WafRulePreciseProtectionId string
    The rule ID in UUID format.
    conditions List<WafRulePreciseProtectionCondition>
    Specifies the condition parameters. The object structure is documented below.
    policyId String
    Specifies the WAF policy ID. Changing this creates a new rule.
    priority Double
    Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
    action String
    Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
    endTime String
    Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
    name String
    Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
    startTime String
    Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
    wafRulePreciseProtectionId String
    The rule ID in UUID format.
    conditions WafRulePreciseProtectionCondition[]
    Specifies the condition parameters. The object structure is documented below.
    policyId string
    Specifies the WAF policy ID. Changing this creates a new rule.
    priority number
    Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
    action string
    Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
    endTime string
    Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
    name string
    Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
    startTime string
    Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
    wafRulePreciseProtectionId string
    The rule ID in UUID format.
    conditions Sequence[WafRulePreciseProtectionConditionArgs]
    Specifies the condition parameters. The object structure is documented below.
    policy_id str
    Specifies the WAF policy ID. Changing this creates a new rule.
    priority float
    Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
    action str
    Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
    end_time str
    Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
    name str
    Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
    start_time str
    Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
    waf_rule_precise_protection_id str
    The rule ID in UUID format.
    conditions List<Property Map>
    Specifies the condition parameters. The object structure is documented below.
    policyId String
    Specifies the WAF policy ID. Changing this creates a new rule.
    priority Number
    Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
    action String
    Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
    endTime String
    Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
    name String
    Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
    startTime String
    Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
    wafRulePreciseProtectionId String
    The rule ID in UUID format.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the WafRulePreciseProtection 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 WafRulePreciseProtection Resource

    Get an existing WafRulePreciseProtection 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?: WafRulePreciseProtectionState, opts?: CustomResourceOptions): WafRulePreciseProtection
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[str] = None,
            conditions: Optional[Sequence[WafRulePreciseProtectionConditionArgs]] = None,
            end_time: Optional[str] = None,
            name: Optional[str] = None,
            policy_id: Optional[str] = None,
            priority: Optional[float] = None,
            start_time: Optional[str] = None,
            waf_rule_precise_protection_id: Optional[str] = None) -> WafRulePreciseProtection
    func GetWafRulePreciseProtection(ctx *Context, name string, id IDInput, state *WafRulePreciseProtectionState, opts ...ResourceOption) (*WafRulePreciseProtection, error)
    public static WafRulePreciseProtection Get(string name, Input<string> id, WafRulePreciseProtectionState? state, CustomResourceOptions? opts = null)
    public static WafRulePreciseProtection get(String name, Output<String> id, WafRulePreciseProtectionState state, CustomResourceOptions options)
    resources:  _:    type: flexibleengine:WafRulePreciseProtection    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.
    The following state arguments are supported:
    Action string
    Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
    Conditions List<WafRulePreciseProtectionCondition>
    Specifies the condition parameters. The object structure is documented below.
    EndTime string
    Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
    Name string
    Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
    PolicyId string
    Specifies the WAF policy ID. Changing this creates a new rule.
    Priority double
    Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
    StartTime string
    Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
    WafRulePreciseProtectionId string
    The rule ID in UUID format.
    Action string
    Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
    Conditions []WafRulePreciseProtectionConditionArgs
    Specifies the condition parameters. The object structure is documented below.
    EndTime string
    Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
    Name string
    Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
    PolicyId string
    Specifies the WAF policy ID. Changing this creates a new rule.
    Priority float64
    Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
    StartTime string
    Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
    WafRulePreciseProtectionId string
    The rule ID in UUID format.
    action String
    Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
    conditions List<WafRulePreciseProtectionCondition>
    Specifies the condition parameters. The object structure is documented below.
    endTime String
    Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
    name String
    Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
    policyId String
    Specifies the WAF policy ID. Changing this creates a new rule.
    priority Double
    Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
    startTime String
    Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
    wafRulePreciseProtectionId String
    The rule ID in UUID format.
    action string
    Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
    conditions WafRulePreciseProtectionCondition[]
    Specifies the condition parameters. The object structure is documented below.
    endTime string
    Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
    name string
    Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
    policyId string
    Specifies the WAF policy ID. Changing this creates a new rule.
    priority number
    Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
    startTime string
    Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
    wafRulePreciseProtectionId string
    The rule ID in UUID format.
    action str
    Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
    conditions Sequence[WafRulePreciseProtectionConditionArgs]
    Specifies the condition parameters. The object structure is documented below.
    end_time str
    Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
    name str
    Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
    policy_id str
    Specifies the WAF policy ID. Changing this creates a new rule.
    priority float
    Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
    start_time str
    Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
    waf_rule_precise_protection_id str
    The rule ID in UUID format.
    action String
    Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
    conditions List<Property Map>
    Specifies the condition parameters. The object structure is documented below.
    endTime String
    Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
    name String
    Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
    policyId String
    Specifies the WAF policy ID. Changing this creates a new rule.
    priority Number
    Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
    startTime String
    Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
    wafRulePreciseProtectionId String
    The rule ID in UUID format.

    Supporting Types

    WafRulePreciseProtectionCondition, WafRulePreciseProtectionConditionArgs

    Content string
    Specifies the content matching the condition.
    Field string
    Specifies the matched field. The value can be path, user-agent, ip, params, cookie, referer, and header.
    Logic string
    Specifies the logic relationship. The value can be contain, not_contain, equal, not_equal, prefix, not_prefix, suffix, and not_suffix. If field is set to ip, logic can only be equal or not_equal.
    Subfield string
    Specifies the matched subfield.

    • If field is set to cookie, subfield indicates cookie name.
    • If field is set to params, subfield indicates param name.
    • If field is set to header, subfield indicates an option in the header.
    Content string
    Specifies the content matching the condition.
    Field string
    Specifies the matched field. The value can be path, user-agent, ip, params, cookie, referer, and header.
    Logic string
    Specifies the logic relationship. The value can be contain, not_contain, equal, not_equal, prefix, not_prefix, suffix, and not_suffix. If field is set to ip, logic can only be equal or not_equal.
    Subfield string
    Specifies the matched subfield.

    • If field is set to cookie, subfield indicates cookie name.
    • If field is set to params, subfield indicates param name.
    • If field is set to header, subfield indicates an option in the header.
    content String
    Specifies the content matching the condition.
    field String
    Specifies the matched field. The value can be path, user-agent, ip, params, cookie, referer, and header.
    logic String
    Specifies the logic relationship. The value can be contain, not_contain, equal, not_equal, prefix, not_prefix, suffix, and not_suffix. If field is set to ip, logic can only be equal or not_equal.
    subfield String
    Specifies the matched subfield.

    • If field is set to cookie, subfield indicates cookie name.
    • If field is set to params, subfield indicates param name.
    • If field is set to header, subfield indicates an option in the header.
    content string
    Specifies the content matching the condition.
    field string
    Specifies the matched field. The value can be path, user-agent, ip, params, cookie, referer, and header.
    logic string
    Specifies the logic relationship. The value can be contain, not_contain, equal, not_equal, prefix, not_prefix, suffix, and not_suffix. If field is set to ip, logic can only be equal or not_equal.
    subfield string
    Specifies the matched subfield.

    • If field is set to cookie, subfield indicates cookie name.
    • If field is set to params, subfield indicates param name.
    • If field is set to header, subfield indicates an option in the header.
    content str
    Specifies the content matching the condition.
    field str
    Specifies the matched field. The value can be path, user-agent, ip, params, cookie, referer, and header.
    logic str
    Specifies the logic relationship. The value can be contain, not_contain, equal, not_equal, prefix, not_prefix, suffix, and not_suffix. If field is set to ip, logic can only be equal or not_equal.
    subfield str
    Specifies the matched subfield.

    • If field is set to cookie, subfield indicates cookie name.
    • If field is set to params, subfield indicates param name.
    • If field is set to header, subfield indicates an option in the header.
    content String
    Specifies the content matching the condition.
    field String
    Specifies the matched field. The value can be path, user-agent, ip, params, cookie, referer, and header.
    logic String
    Specifies the logic relationship. The value can be contain, not_contain, equal, not_equal, prefix, not_prefix, suffix, and not_suffix. If field is set to ip, logic can only be equal or not_equal.
    subfield String
    Specifies the matched subfield.

    • If field is set to cookie, subfield indicates cookie name.
    • If field is set to params, subfield indicates param name.
    • If field is set to header, subfield indicates an option in the header.

    Import

    Precise Protection Rules can be imported using the policy ID and rule ID

    separated by a slash, e.g.:

    $ pulumi import flexibleengine:index/wafRulePreciseProtection:WafRulePreciseProtection rule_1 523083f4543c497faecd25fcfcc0b2a0/620801321b254f8fbc7dafa6bbebe652
    

    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.
    flexibleengine logo
    flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud