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

flexibleengine.WafPolicy

Explore with Pulumi AI

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

    Manages a WAF policy resource within FlexibleEngine.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const policy1 = new flexibleengine.WafPolicy("policy1", {});
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    policy1 = flexibleengine.WafPolicy("policy1")
    
    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.NewWafPolicy(ctx, "policy1", nil)
    		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");
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.WafPolicy;
    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");
    
        }
    }
    
    resources:
      policy1:
        type: flexibleengine:WafPolicy
    

    Create WafPolicy Resource

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

    Constructor syntax

    new WafPolicy(name: string, args?: WafPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def WafPolicy(resource_name: str,
                  args: Optional[WafPolicyArgs] = None,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def WafPolicy(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  domains: Optional[Sequence[str]] = None,
                  full_detection: Optional[bool] = None,
                  level: Optional[float] = None,
                  name: Optional[str] = None,
                  protection_mode: Optional[str] = None,
                  protection_status: Optional[WafPolicyProtectionStatusArgs] = None,
                  region: Optional[str] = None,
                  timeouts: Optional[WafPolicyTimeoutsArgs] = None,
                  waf_policy_id: Optional[str] = None)
    func NewWafPolicy(ctx *Context, name string, args *WafPolicyArgs, opts ...ResourceOption) (*WafPolicy, error)
    public WafPolicy(string name, WafPolicyArgs? args = null, CustomResourceOptions? opts = null)
    public WafPolicy(String name, WafPolicyArgs args)
    public WafPolicy(String name, WafPolicyArgs args, CustomResourceOptions options)
    
    type: flexibleengine:WafPolicy
    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 WafPolicyArgs
    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 WafPolicyArgs
    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 WafPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WafPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WafPolicyArgs
    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 wafPolicyResource = new Flexibleengine.WafPolicy("wafPolicyResource", new()
    {
        Domains = new[]
        {
            "string",
        },
        FullDetection = false,
        Level = 0,
        Name = "string",
        ProtectionMode = "string",
        ProtectionStatus = new Flexibleengine.Inputs.WafPolicyProtectionStatusArgs
        {
            BasicWebProtection = false,
            Blacklist = false,
            CcProtection = false,
            CrawlerEngine = false,
            CrawlerOther = false,
            CrawlerScanner = false,
            CrawlerScript = false,
            DataMasking = false,
            FalseAlarmMasking = false,
            GeneralCheck = false,
            PreciseProtection = false,
            WebTamperProtection = false,
            Webshell = false,
        },
        Region = "string",
        Timeouts = new Flexibleengine.Inputs.WafPolicyTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
        WafPolicyId = "string",
    });
    
    example, err := flexibleengine.NewWafPolicy(ctx, "wafPolicyResource", &flexibleengine.WafPolicyArgs{
    	Domains: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	FullDetection:  pulumi.Bool(false),
    	Level:          pulumi.Float64(0),
    	Name:           pulumi.String("string"),
    	ProtectionMode: pulumi.String("string"),
    	ProtectionStatus: &flexibleengine.WafPolicyProtectionStatusArgs{
    		BasicWebProtection:  pulumi.Bool(false),
    		Blacklist:           pulumi.Bool(false),
    		CcProtection:        pulumi.Bool(false),
    		CrawlerEngine:       pulumi.Bool(false),
    		CrawlerOther:        pulumi.Bool(false),
    		CrawlerScanner:      pulumi.Bool(false),
    		CrawlerScript:       pulumi.Bool(false),
    		DataMasking:         pulumi.Bool(false),
    		FalseAlarmMasking:   pulumi.Bool(false),
    		GeneralCheck:        pulumi.Bool(false),
    		PreciseProtection:   pulumi.Bool(false),
    		WebTamperProtection: pulumi.Bool(false),
    		Webshell:            pulumi.Bool(false),
    	},
    	Region: pulumi.String("string"),
    	Timeouts: &flexibleengine.WafPolicyTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    	WafPolicyId: pulumi.String("string"),
    })
    
    var wafPolicyResource = new WafPolicy("wafPolicyResource", WafPolicyArgs.builder()
        .domains("string")
        .fullDetection(false)
        .level(0)
        .name("string")
        .protectionMode("string")
        .protectionStatus(WafPolicyProtectionStatusArgs.builder()
            .basicWebProtection(false)
            .blacklist(false)
            .ccProtection(false)
            .crawlerEngine(false)
            .crawlerOther(false)
            .crawlerScanner(false)
            .crawlerScript(false)
            .dataMasking(false)
            .falseAlarmMasking(false)
            .generalCheck(false)
            .preciseProtection(false)
            .webTamperProtection(false)
            .webshell(false)
            .build())
        .region("string")
        .timeouts(WafPolicyTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .wafPolicyId("string")
        .build());
    
    waf_policy_resource = flexibleengine.WafPolicy("wafPolicyResource",
        domains=["string"],
        full_detection=False,
        level=0,
        name="string",
        protection_mode="string",
        protection_status={
            "basic_web_protection": False,
            "blacklist": False,
            "cc_protection": False,
            "crawler_engine": False,
            "crawler_other": False,
            "crawler_scanner": False,
            "crawler_script": False,
            "data_masking": False,
            "false_alarm_masking": False,
            "general_check": False,
            "precise_protection": False,
            "web_tamper_protection": False,
            "webshell": False,
        },
        region="string",
        timeouts={
            "create": "string",
            "delete": "string",
        },
        waf_policy_id="string")
    
    const wafPolicyResource = new flexibleengine.WafPolicy("wafPolicyResource", {
        domains: ["string"],
        fullDetection: false,
        level: 0,
        name: "string",
        protectionMode: "string",
        protectionStatus: {
            basicWebProtection: false,
            blacklist: false,
            ccProtection: false,
            crawlerEngine: false,
            crawlerOther: false,
            crawlerScanner: false,
            crawlerScript: false,
            dataMasking: false,
            falseAlarmMasking: false,
            generalCheck: false,
            preciseProtection: false,
            webTamperProtection: false,
            webshell: false,
        },
        region: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
        wafPolicyId: "string",
    });
    
    type: flexibleengine:WafPolicy
    properties:
        domains:
            - string
        fullDetection: false
        level: 0
        name: string
        protectionMode: string
        protectionStatus:
            basicWebProtection: false
            blacklist: false
            ccProtection: false
            crawlerEngine: false
            crawlerOther: false
            crawlerScanner: false
            crawlerScript: false
            dataMasking: false
            falseAlarmMasking: false
            generalCheck: false
            preciseProtection: false
            webTamperProtection: false
            webshell: false
        region: string
        timeouts:
            create: string
            delete: string
        wafPolicyId: string
    

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

    Domains List<string>
    An array of domain IDs.
    FullDetection bool
    Specifies the detection mode in Precise Protection. Valid values are:

    • true: full detection, Full detection finishes all threat detections before blocking requests that meet Precise Protection specified conditions.
    • false: instant detection. Instant detection immediately ends threat detection after blocking a request that meets Precise Protection specified conditions.
    Level double
    Specifies the protection level. Valid values are:

    • 1: low
    • 2: medium
    • 3: high
    Name string
    Specifies the policy name. The maximum length is 256 characters. Only digits, letters, underscores(_), and hyphens(-) are allowed.
    ProtectionMode string
    Specifies the protective action after a rule is matched. Valid values are:

    • block: WAF blocks and logs detected attacks.
    • log: WAF logs detected attacks only.
    ProtectionStatus WafPolicyProtectionStatus

    Specifies the protection switches. The protection_status object structure is documented below.

    The protection_status block supports:

    Region string
    Specifies the region in which to create the WAF policy resource. If omitted, the provider-level region will be used. Changing this will create a new WAF policy resource.
    Timeouts WafPolicyTimeouts
    WafPolicyId string
    The policy ID in UUID format.
    Domains []string
    An array of domain IDs.
    FullDetection bool
    Specifies the detection mode in Precise Protection. Valid values are:

    • true: full detection, Full detection finishes all threat detections before blocking requests that meet Precise Protection specified conditions.
    • false: instant detection. Instant detection immediately ends threat detection after blocking a request that meets Precise Protection specified conditions.
    Level float64
    Specifies the protection level. Valid values are:

    • 1: low
    • 2: medium
    • 3: high
    Name string
    Specifies the policy name. The maximum length is 256 characters. Only digits, letters, underscores(_), and hyphens(-) are allowed.
    ProtectionMode string
    Specifies the protective action after a rule is matched. Valid values are:

    • block: WAF blocks and logs detected attacks.
    • log: WAF logs detected attacks only.
    ProtectionStatus WafPolicyProtectionStatusArgs

    Specifies the protection switches. The protection_status object structure is documented below.

    The protection_status block supports:

    Region string
    Specifies the region in which to create the WAF policy resource. If omitted, the provider-level region will be used. Changing this will create a new WAF policy resource.
    Timeouts WafPolicyTimeoutsArgs
    WafPolicyId string
    The policy ID in UUID format.
    domains List<String>
    An array of domain IDs.
    fullDetection Boolean
    Specifies the detection mode in Precise Protection. Valid values are:

    • true: full detection, Full detection finishes all threat detections before blocking requests that meet Precise Protection specified conditions.
    • false: instant detection. Instant detection immediately ends threat detection after blocking a request that meets Precise Protection specified conditions.
    level Double
    Specifies the protection level. Valid values are:

    • 1: low
    • 2: medium
    • 3: high
    name String
    Specifies the policy name. The maximum length is 256 characters. Only digits, letters, underscores(_), and hyphens(-) are allowed.
    protectionMode String
    Specifies the protective action after a rule is matched. Valid values are:

    • block: WAF blocks and logs detected attacks.
    • log: WAF logs detected attacks only.
    protectionStatus WafPolicyProtectionStatus

    Specifies the protection switches. The protection_status object structure is documented below.

    The protection_status block supports:

    region String
    Specifies the region in which to create the WAF policy resource. If omitted, the provider-level region will be used. Changing this will create a new WAF policy resource.
    timeouts WafPolicyTimeouts
    wafPolicyId String
    The policy ID in UUID format.
    domains string[]
    An array of domain IDs.
    fullDetection boolean
    Specifies the detection mode in Precise Protection. Valid values are:

    • true: full detection, Full detection finishes all threat detections before blocking requests that meet Precise Protection specified conditions.
    • false: instant detection. Instant detection immediately ends threat detection after blocking a request that meets Precise Protection specified conditions.
    level number
    Specifies the protection level. Valid values are:

    • 1: low
    • 2: medium
    • 3: high
    name string
    Specifies the policy name. The maximum length is 256 characters. Only digits, letters, underscores(_), and hyphens(-) are allowed.
    protectionMode string
    Specifies the protective action after a rule is matched. Valid values are:

    • block: WAF blocks and logs detected attacks.
    • log: WAF logs detected attacks only.
    protectionStatus WafPolicyProtectionStatus

    Specifies the protection switches. The protection_status object structure is documented below.

    The protection_status block supports:

    region string
    Specifies the region in which to create the WAF policy resource. If omitted, the provider-level region will be used. Changing this will create a new WAF policy resource.
    timeouts WafPolicyTimeouts
    wafPolicyId string
    The policy ID in UUID format.
    domains Sequence[str]
    An array of domain IDs.
    full_detection bool
    Specifies the detection mode in Precise Protection. Valid values are:

    • true: full detection, Full detection finishes all threat detections before blocking requests that meet Precise Protection specified conditions.
    • false: instant detection. Instant detection immediately ends threat detection after blocking a request that meets Precise Protection specified conditions.
    level float
    Specifies the protection level. Valid values are:

    • 1: low
    • 2: medium
    • 3: high
    name str
    Specifies the policy name. The maximum length is 256 characters. Only digits, letters, underscores(_), and hyphens(-) are allowed.
    protection_mode str
    Specifies the protective action after a rule is matched. Valid values are:

    • block: WAF blocks and logs detected attacks.
    • log: WAF logs detected attacks only.
    protection_status WafPolicyProtectionStatusArgs

    Specifies the protection switches. The protection_status object structure is documented below.

    The protection_status block supports:

    region str
    Specifies the region in which to create the WAF policy resource. If omitted, the provider-level region will be used. Changing this will create a new WAF policy resource.
    timeouts WafPolicyTimeoutsArgs
    waf_policy_id str
    The policy ID in UUID format.
    domains List<String>
    An array of domain IDs.
    fullDetection Boolean
    Specifies the detection mode in Precise Protection. Valid values are:

    • true: full detection, Full detection finishes all threat detections before blocking requests that meet Precise Protection specified conditions.
    • false: instant detection. Instant detection immediately ends threat detection after blocking a request that meets Precise Protection specified conditions.
    level Number
    Specifies the protection level. Valid values are:

    • 1: low
    • 2: medium
    • 3: high
    name String
    Specifies the policy name. The maximum length is 256 characters. Only digits, letters, underscores(_), and hyphens(-) are allowed.
    protectionMode String
    Specifies the protective action after a rule is matched. Valid values are:

    • block: WAF blocks and logs detected attacks.
    • log: WAF logs detected attacks only.
    protectionStatus Property Map

    Specifies the protection switches. The protection_status object structure is documented below.

    The protection_status block supports:

    region String
    Specifies the region in which to create the WAF policy resource. If omitted, the provider-level region will be used. Changing this will create a new WAF policy resource.
    timeouts Property Map
    wafPolicyId String
    The policy ID in UUID format.

    Outputs

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

    Get an existing WafPolicy 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?: WafPolicyState, opts?: CustomResourceOptions): WafPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            domains: Optional[Sequence[str]] = None,
            full_detection: Optional[bool] = None,
            level: Optional[float] = None,
            name: Optional[str] = None,
            protection_mode: Optional[str] = None,
            protection_status: Optional[WafPolicyProtectionStatusArgs] = None,
            region: Optional[str] = None,
            timeouts: Optional[WafPolicyTimeoutsArgs] = None,
            waf_policy_id: Optional[str] = None) -> WafPolicy
    func GetWafPolicy(ctx *Context, name string, id IDInput, state *WafPolicyState, opts ...ResourceOption) (*WafPolicy, error)
    public static WafPolicy Get(string name, Input<string> id, WafPolicyState? state, CustomResourceOptions? opts = null)
    public static WafPolicy get(String name, Output<String> id, WafPolicyState state, CustomResourceOptions options)
    resources:  _:    type: flexibleengine:WafPolicy    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:
    Domains List<string>
    An array of domain IDs.
    FullDetection bool
    Specifies the detection mode in Precise Protection. Valid values are:

    • true: full detection, Full detection finishes all threat detections before blocking requests that meet Precise Protection specified conditions.
    • false: instant detection. Instant detection immediately ends threat detection after blocking a request that meets Precise Protection specified conditions.
    Level double
    Specifies the protection level. Valid values are:

    • 1: low
    • 2: medium
    • 3: high
    Name string
    Specifies the policy name. The maximum length is 256 characters. Only digits, letters, underscores(_), and hyphens(-) are allowed.
    ProtectionMode string
    Specifies the protective action after a rule is matched. Valid values are:

    • block: WAF blocks and logs detected attacks.
    • log: WAF logs detected attacks only.
    ProtectionStatus WafPolicyProtectionStatus

    Specifies the protection switches. The protection_status object structure is documented below.

    The protection_status block supports:

    Region string
    Specifies the region in which to create the WAF policy resource. If omitted, the provider-level region will be used. Changing this will create a new WAF policy resource.
    Timeouts WafPolicyTimeouts
    WafPolicyId string
    The policy ID in UUID format.
    Domains []string
    An array of domain IDs.
    FullDetection bool
    Specifies the detection mode in Precise Protection. Valid values are:

    • true: full detection, Full detection finishes all threat detections before blocking requests that meet Precise Protection specified conditions.
    • false: instant detection. Instant detection immediately ends threat detection after blocking a request that meets Precise Protection specified conditions.
    Level float64
    Specifies the protection level. Valid values are:

    • 1: low
    • 2: medium
    • 3: high
    Name string
    Specifies the policy name. The maximum length is 256 characters. Only digits, letters, underscores(_), and hyphens(-) are allowed.
    ProtectionMode string
    Specifies the protective action after a rule is matched. Valid values are:

    • block: WAF blocks and logs detected attacks.
    • log: WAF logs detected attacks only.
    ProtectionStatus WafPolicyProtectionStatusArgs

    Specifies the protection switches. The protection_status object structure is documented below.

    The protection_status block supports:

    Region string
    Specifies the region in which to create the WAF policy resource. If omitted, the provider-level region will be used. Changing this will create a new WAF policy resource.
    Timeouts WafPolicyTimeoutsArgs
    WafPolicyId string
    The policy ID in UUID format.
    domains List<String>
    An array of domain IDs.
    fullDetection Boolean
    Specifies the detection mode in Precise Protection. Valid values are:

    • true: full detection, Full detection finishes all threat detections before blocking requests that meet Precise Protection specified conditions.
    • false: instant detection. Instant detection immediately ends threat detection after blocking a request that meets Precise Protection specified conditions.
    level Double
    Specifies the protection level. Valid values are:

    • 1: low
    • 2: medium
    • 3: high
    name String
    Specifies the policy name. The maximum length is 256 characters. Only digits, letters, underscores(_), and hyphens(-) are allowed.
    protectionMode String
    Specifies the protective action after a rule is matched. Valid values are:

    • block: WAF blocks and logs detected attacks.
    • log: WAF logs detected attacks only.
    protectionStatus WafPolicyProtectionStatus

    Specifies the protection switches. The protection_status object structure is documented below.

    The protection_status block supports:

    region String
    Specifies the region in which to create the WAF policy resource. If omitted, the provider-level region will be used. Changing this will create a new WAF policy resource.
    timeouts WafPolicyTimeouts
    wafPolicyId String
    The policy ID in UUID format.
    domains string[]
    An array of domain IDs.
    fullDetection boolean
    Specifies the detection mode in Precise Protection. Valid values are:

    • true: full detection, Full detection finishes all threat detections before blocking requests that meet Precise Protection specified conditions.
    • false: instant detection. Instant detection immediately ends threat detection after blocking a request that meets Precise Protection specified conditions.
    level number
    Specifies the protection level. Valid values are:

    • 1: low
    • 2: medium
    • 3: high
    name string
    Specifies the policy name. The maximum length is 256 characters. Only digits, letters, underscores(_), and hyphens(-) are allowed.
    protectionMode string
    Specifies the protective action after a rule is matched. Valid values are:

    • block: WAF blocks and logs detected attacks.
    • log: WAF logs detected attacks only.
    protectionStatus WafPolicyProtectionStatus

    Specifies the protection switches. The protection_status object structure is documented below.

    The protection_status block supports:

    region string
    Specifies the region in which to create the WAF policy resource. If omitted, the provider-level region will be used. Changing this will create a new WAF policy resource.
    timeouts WafPolicyTimeouts
    wafPolicyId string
    The policy ID in UUID format.
    domains Sequence[str]
    An array of domain IDs.
    full_detection bool
    Specifies the detection mode in Precise Protection. Valid values are:

    • true: full detection, Full detection finishes all threat detections before blocking requests that meet Precise Protection specified conditions.
    • false: instant detection. Instant detection immediately ends threat detection after blocking a request that meets Precise Protection specified conditions.
    level float
    Specifies the protection level. Valid values are:

    • 1: low
    • 2: medium
    • 3: high
    name str
    Specifies the policy name. The maximum length is 256 characters. Only digits, letters, underscores(_), and hyphens(-) are allowed.
    protection_mode str
    Specifies the protective action after a rule is matched. Valid values are:

    • block: WAF blocks and logs detected attacks.
    • log: WAF logs detected attacks only.
    protection_status WafPolicyProtectionStatusArgs

    Specifies the protection switches. The protection_status object structure is documented below.

    The protection_status block supports:

    region str
    Specifies the region in which to create the WAF policy resource. If omitted, the provider-level region will be used. Changing this will create a new WAF policy resource.
    timeouts WafPolicyTimeoutsArgs
    waf_policy_id str
    The policy ID in UUID format.
    domains List<String>
    An array of domain IDs.
    fullDetection Boolean
    Specifies the detection mode in Precise Protection. Valid values are:

    • true: full detection, Full detection finishes all threat detections before blocking requests that meet Precise Protection specified conditions.
    • false: instant detection. Instant detection immediately ends threat detection after blocking a request that meets Precise Protection specified conditions.
    level Number
    Specifies the protection level. Valid values are:

    • 1: low
    • 2: medium
    • 3: high
    name String
    Specifies the policy name. The maximum length is 256 characters. Only digits, letters, underscores(_), and hyphens(-) are allowed.
    protectionMode String
    Specifies the protective action after a rule is matched. Valid values are:

    • block: WAF blocks and logs detected attacks.
    • log: WAF logs detected attacks only.
    protectionStatus Property Map

    Specifies the protection switches. The protection_status object structure is documented below.

    The protection_status block supports:

    region String
    Specifies the region in which to create the WAF policy resource. If omitted, the provider-level region will be used. Changing this will create a new WAF policy resource.
    timeouts Property Map
    wafPolicyId String
    The policy ID in UUID format.

    Supporting Types

    WafPolicyProtectionStatus, WafPolicyProtectionStatusArgs

    BasicWebProtection bool
    Specifies whether Basic Web Protection is enabled.
    Blacklist bool
    Specifies whether Blacklist and Whitelist is enabled.
    CcProtection bool
    Specifies whether CC Attack Protection is enabled.
    CrawlerEngine bool
    Specifies whether the Search Engine switch in Basic Web Protection is enabled.
    CrawlerOther bool
    Specifies whether detection of other crawlers in Basic Web Protection is enabled.
    CrawlerScanner bool
    Specifies whether the Scanner switch in Basic Web Protection is enabled.
    CrawlerScript bool
    Specifies whether the Script Tool switch in Basic Web Protection is enabled.
    DataMasking bool
    Specifies whether Data Masking is enabled.
    FalseAlarmMasking bool
    Specifies whether False Alarm Masking is enabled.
    GeneralCheck bool
    Specifies whether General Check in Basic Web Protection is enabled.
    PreciseProtection bool
    Specifies whether Precise Protection is enabled.
    WebTamperProtection bool
    Specifies whether Web Tamper Protection is enabled.
    Webshell bool
    Specifies whether webshell detection in Basic Web Protection is enabled.
    BasicWebProtection bool
    Specifies whether Basic Web Protection is enabled.
    Blacklist bool
    Specifies whether Blacklist and Whitelist is enabled.
    CcProtection bool
    Specifies whether CC Attack Protection is enabled.
    CrawlerEngine bool
    Specifies whether the Search Engine switch in Basic Web Protection is enabled.
    CrawlerOther bool
    Specifies whether detection of other crawlers in Basic Web Protection is enabled.
    CrawlerScanner bool
    Specifies whether the Scanner switch in Basic Web Protection is enabled.
    CrawlerScript bool
    Specifies whether the Script Tool switch in Basic Web Protection is enabled.
    DataMasking bool
    Specifies whether Data Masking is enabled.
    FalseAlarmMasking bool
    Specifies whether False Alarm Masking is enabled.
    GeneralCheck bool
    Specifies whether General Check in Basic Web Protection is enabled.
    PreciseProtection bool
    Specifies whether Precise Protection is enabled.
    WebTamperProtection bool
    Specifies whether Web Tamper Protection is enabled.
    Webshell bool
    Specifies whether webshell detection in Basic Web Protection is enabled.
    basicWebProtection Boolean
    Specifies whether Basic Web Protection is enabled.
    blacklist Boolean
    Specifies whether Blacklist and Whitelist is enabled.
    ccProtection Boolean
    Specifies whether CC Attack Protection is enabled.
    crawlerEngine Boolean
    Specifies whether the Search Engine switch in Basic Web Protection is enabled.
    crawlerOther Boolean
    Specifies whether detection of other crawlers in Basic Web Protection is enabled.
    crawlerScanner Boolean
    Specifies whether the Scanner switch in Basic Web Protection is enabled.
    crawlerScript Boolean
    Specifies whether the Script Tool switch in Basic Web Protection is enabled.
    dataMasking Boolean
    Specifies whether Data Masking is enabled.
    falseAlarmMasking Boolean
    Specifies whether False Alarm Masking is enabled.
    generalCheck Boolean
    Specifies whether General Check in Basic Web Protection is enabled.
    preciseProtection Boolean
    Specifies whether Precise Protection is enabled.
    webTamperProtection Boolean
    Specifies whether Web Tamper Protection is enabled.
    webshell Boolean
    Specifies whether webshell detection in Basic Web Protection is enabled.
    basicWebProtection boolean
    Specifies whether Basic Web Protection is enabled.
    blacklist boolean
    Specifies whether Blacklist and Whitelist is enabled.
    ccProtection boolean
    Specifies whether CC Attack Protection is enabled.
    crawlerEngine boolean
    Specifies whether the Search Engine switch in Basic Web Protection is enabled.
    crawlerOther boolean
    Specifies whether detection of other crawlers in Basic Web Protection is enabled.
    crawlerScanner boolean
    Specifies whether the Scanner switch in Basic Web Protection is enabled.
    crawlerScript boolean
    Specifies whether the Script Tool switch in Basic Web Protection is enabled.
    dataMasking boolean
    Specifies whether Data Masking is enabled.
    falseAlarmMasking boolean
    Specifies whether False Alarm Masking is enabled.
    generalCheck boolean
    Specifies whether General Check in Basic Web Protection is enabled.
    preciseProtection boolean
    Specifies whether Precise Protection is enabled.
    webTamperProtection boolean
    Specifies whether Web Tamper Protection is enabled.
    webshell boolean
    Specifies whether webshell detection in Basic Web Protection is enabled.
    basic_web_protection bool
    Specifies whether Basic Web Protection is enabled.
    blacklist bool
    Specifies whether Blacklist and Whitelist is enabled.
    cc_protection bool
    Specifies whether CC Attack Protection is enabled.
    crawler_engine bool
    Specifies whether the Search Engine switch in Basic Web Protection is enabled.
    crawler_other bool
    Specifies whether detection of other crawlers in Basic Web Protection is enabled.
    crawler_scanner bool
    Specifies whether the Scanner switch in Basic Web Protection is enabled.
    crawler_script bool
    Specifies whether the Script Tool switch in Basic Web Protection is enabled.
    data_masking bool
    Specifies whether Data Masking is enabled.
    false_alarm_masking bool
    Specifies whether False Alarm Masking is enabled.
    general_check bool
    Specifies whether General Check in Basic Web Protection is enabled.
    precise_protection bool
    Specifies whether Precise Protection is enabled.
    web_tamper_protection bool
    Specifies whether Web Tamper Protection is enabled.
    webshell bool
    Specifies whether webshell detection in Basic Web Protection is enabled.
    basicWebProtection Boolean
    Specifies whether Basic Web Protection is enabled.
    blacklist Boolean
    Specifies whether Blacklist and Whitelist is enabled.
    ccProtection Boolean
    Specifies whether CC Attack Protection is enabled.
    crawlerEngine Boolean
    Specifies whether the Search Engine switch in Basic Web Protection is enabled.
    crawlerOther Boolean
    Specifies whether detection of other crawlers in Basic Web Protection is enabled.
    crawlerScanner Boolean
    Specifies whether the Scanner switch in Basic Web Protection is enabled.
    crawlerScript Boolean
    Specifies whether the Script Tool switch in Basic Web Protection is enabled.
    dataMasking Boolean
    Specifies whether Data Masking is enabled.
    falseAlarmMasking Boolean
    Specifies whether False Alarm Masking is enabled.
    generalCheck Boolean
    Specifies whether General Check in Basic Web Protection is enabled.
    preciseProtection Boolean
    Specifies whether Precise Protection is enabled.
    webTamperProtection Boolean
    Specifies whether Web Tamper Protection is enabled.
    webshell Boolean
    Specifies whether webshell detection in Basic Web Protection is enabled.

    WafPolicyTimeouts, WafPolicyTimeoutsArgs

    Create string
    Delete string
    Create string
    Delete string
    create String
    delete String
    create string
    delete string
    create str
    delete str
    create String
    delete String

    Import

    Policies can be imported using the id, e.g.

    $ pulumi import flexibleengine:index/wafPolicy:WafPolicy policy_1 c5946141e52441d9b13c5e9d4e9560c7
    

    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