1. Packages
  2. Incapsula Provider
  3. API Docs
  4. IncapRule
incapsula 3.38.0 published on Wednesday, Feb 25, 2026 by imperva
incapsula logo
incapsula 3.38.0 published on Wednesday, Feb 25, 2026 by imperva

    Provides a resource to create security, delivery, and rate rules.

    Note: A newer resource for configuring delivery rules and their priority is available in incapsula.DeliveryRulesConfiguration

    Create IncapRule Resource

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

    Constructor syntax

    new IncapRule(name: string, args: IncapRuleArgs, opts?: CustomResourceOptions);
    @overload
    def IncapRule(resource_name: str,
                  args: IncapRuleArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def IncapRule(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  action: Optional[str] = None,
                  site_id: Optional[str] = None,
                  multiple_deletions: Optional[bool] = None,
                  rewrite_name: Optional[str] = None,
                  block_duration_min: Optional[float] = None,
                  block_duration_type: Optional[str] = None,
                  dc_id: Optional[float] = None,
                  enabled: Optional[bool] = None,
                  error_response_data: Optional[str] = None,
                  error_response_format: Optional[str] = None,
                  error_type: Optional[str] = None,
                  filter: Optional[str] = None,
                  from_: Optional[str] = None,
                  incap_rule_id: Optional[str] = None,
                  block_duration_max: Optional[float] = None,
                  block_duration: Optional[float] = None,
                  rate_context: Optional[str] = None,
                  override_waf_rule: Optional[str] = None,
                  port_forwarding_context: Optional[str] = None,
                  port_forwarding_value: Optional[str] = None,
                  override_waf_action: Optional[str] = None,
                  rate_interval: Optional[float] = None,
                  response_code: Optional[float] = None,
                  rewrite_existing: Optional[bool] = None,
                  name: Optional[str] = None,
                  send_notifications: Optional[str] = None,
                  add_missing: Optional[bool] = None,
                  to: Optional[str] = None)
    func NewIncapRule(ctx *Context, name string, args IncapRuleArgs, opts ...ResourceOption) (*IncapRule, error)
    public IncapRule(string name, IncapRuleArgs args, CustomResourceOptions? opts = null)
    public IncapRule(String name, IncapRuleArgs args)
    public IncapRule(String name, IncapRuleArgs args, CustomResourceOptions options)
    
    type: incapsula:IncapRule
    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 IncapRuleArgs
    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 IncapRuleArgs
    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 IncapRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IncapRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IncapRuleArgs
    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 incapRuleResource = new Incapsula.IncapRule("incapRuleResource", new()
    {
        Action = "string",
        SiteId = "string",
        MultipleDeletions = false,
        RewriteName = "string",
        BlockDurationMin = 0,
        BlockDurationType = "string",
        DcId = 0,
        Enabled = false,
        ErrorResponseData = "string",
        ErrorResponseFormat = "string",
        ErrorType = "string",
        Filter = "string",
        From = "string",
        IncapRuleId = "string",
        BlockDurationMax = 0,
        BlockDuration = 0,
        RateContext = "string",
        OverrideWafRule = "string",
        PortForwardingContext = "string",
        PortForwardingValue = "string",
        OverrideWafAction = "string",
        RateInterval = 0,
        ResponseCode = 0,
        RewriteExisting = false,
        Name = "string",
        SendNotifications = "string",
        AddMissing = false,
        To = "string",
    });
    
    example, err := incapsula.NewIncapRule(ctx, "incapRuleResource", &incapsula.IncapRuleArgs{
    	Action:                pulumi.String("string"),
    	SiteId:                pulumi.String("string"),
    	MultipleDeletions:     pulumi.Bool(false),
    	RewriteName:           pulumi.String("string"),
    	BlockDurationMin:      pulumi.Float64(0),
    	BlockDurationType:     pulumi.String("string"),
    	DcId:                  pulumi.Float64(0),
    	Enabled:               pulumi.Bool(false),
    	ErrorResponseData:     pulumi.String("string"),
    	ErrorResponseFormat:   pulumi.String("string"),
    	ErrorType:             pulumi.String("string"),
    	Filter:                pulumi.String("string"),
    	From:                  pulumi.String("string"),
    	IncapRuleId:           pulumi.String("string"),
    	BlockDurationMax:      pulumi.Float64(0),
    	BlockDuration:         pulumi.Float64(0),
    	RateContext:           pulumi.String("string"),
    	OverrideWafRule:       pulumi.String("string"),
    	PortForwardingContext: pulumi.String("string"),
    	PortForwardingValue:   pulumi.String("string"),
    	OverrideWafAction:     pulumi.String("string"),
    	RateInterval:          pulumi.Float64(0),
    	ResponseCode:          pulumi.Float64(0),
    	RewriteExisting:       pulumi.Bool(false),
    	Name:                  pulumi.String("string"),
    	SendNotifications:     pulumi.String("string"),
    	AddMissing:            pulumi.Bool(false),
    	To:                    pulumi.String("string"),
    })
    
    var incapRuleResource = new IncapRule("incapRuleResource", IncapRuleArgs.builder()
        .action("string")
        .siteId("string")
        .multipleDeletions(false)
        .rewriteName("string")
        .blockDurationMin(0.0)
        .blockDurationType("string")
        .dcId(0.0)
        .enabled(false)
        .errorResponseData("string")
        .errorResponseFormat("string")
        .errorType("string")
        .filter("string")
        .from("string")
        .incapRuleId("string")
        .blockDurationMax(0.0)
        .blockDuration(0.0)
        .rateContext("string")
        .overrideWafRule("string")
        .portForwardingContext("string")
        .portForwardingValue("string")
        .overrideWafAction("string")
        .rateInterval(0.0)
        .responseCode(0.0)
        .rewriteExisting(false)
        .name("string")
        .sendNotifications("string")
        .addMissing(false)
        .to("string")
        .build());
    
    incap_rule_resource = incapsula.IncapRule("incapRuleResource",
        action="string",
        site_id="string",
        multiple_deletions=False,
        rewrite_name="string",
        block_duration_min=0,
        block_duration_type="string",
        dc_id=0,
        enabled=False,
        error_response_data="string",
        error_response_format="string",
        error_type="string",
        filter="string",
        from_="string",
        incap_rule_id="string",
        block_duration_max=0,
        block_duration=0,
        rate_context="string",
        override_waf_rule="string",
        port_forwarding_context="string",
        port_forwarding_value="string",
        override_waf_action="string",
        rate_interval=0,
        response_code=0,
        rewrite_existing=False,
        name="string",
        send_notifications="string",
        add_missing=False,
        to="string")
    
    const incapRuleResource = new incapsula.IncapRule("incapRuleResource", {
        action: "string",
        siteId: "string",
        multipleDeletions: false,
        rewriteName: "string",
        blockDurationMin: 0,
        blockDurationType: "string",
        dcId: 0,
        enabled: false,
        errorResponseData: "string",
        errorResponseFormat: "string",
        errorType: "string",
        filter: "string",
        from: "string",
        incapRuleId: "string",
        blockDurationMax: 0,
        blockDuration: 0,
        rateContext: "string",
        overrideWafRule: "string",
        portForwardingContext: "string",
        portForwardingValue: "string",
        overrideWafAction: "string",
        rateInterval: 0,
        responseCode: 0,
        rewriteExisting: false,
        name: "string",
        sendNotifications: "string",
        addMissing: false,
        to: "string",
    });
    
    type: incapsula:IncapRule
    properties:
        action: string
        addMissing: false
        blockDuration: 0
        blockDurationMax: 0
        blockDurationMin: 0
        blockDurationType: string
        dcId: 0
        enabled: false
        errorResponseData: string
        errorResponseFormat: string
        errorType: string
        filter: string
        from: string
        incapRuleId: string
        multipleDeletions: false
        name: string
        overrideWafAction: string
        overrideWafRule: string
        portForwardingContext: string
        portForwardingValue: string
        rateContext: string
        rateInterval: 0
        responseCode: 0
        rewriteExisting: false
        rewriteName: string
        sendNotifications: string
        siteId: string
        to: string
    

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

    Action string
    Rule action. See the detailed descriptions in the API documentation. Possible values: RULE_ACTION_REDIRECT, RULE_ACTION_SIMPLIFIED_REDIRECT, RULE_ACTION_REWRITE_URL, RULE_ACTION_REWRITE_HEADER, RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_DELETE_HEADER, RULE_ACTION_DELETE_COOKIE, RULE_ACTION_RESPONSE_REWRITE_HEADER, RULE_ACTION_RESPONSE_DELETE_HEADER, RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE, RULE_ACTION_FORWARD_TO_DC, RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA, RULE_ACTION_RATE, RULE_ACTION_CUSTOM_ERROR_RESPONSE, RULE_ACTION_FORWARD_TO_PORT, RULE_ACTION_WAF_OVERRIDE.
    SiteId string
    Numeric identifier of the site to operate on.
    AddMissing bool
    Add cookie or header if it doesn't exist (Rewrite cookie rule only).
    BlockDuration double
    Value of the fixed block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and fixed block_duration_type
    BlockDurationMax double
    The upper limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    BlockDurationMin double
    The lower limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    BlockDurationType string
    Block duration types: fixed, randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by the block_duration parameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action.
    DcId double
    Data center to forward request to. Applies only for RULE_ACTION_FORWARD_TO_DC.
    Enabled bool
    Boolean that enables the rule. Possible values: true, false. Default value is true.
    ErrorResponseData string
    The response returned when the request matches the filter and is blocked. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE.
    ErrorResponseFormat string
    The format of the given error response in the error_response_data field. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: json, xml.
    ErrorType string
    The error that triggers the rule. error.type.all triggers the rule regardless of the error type. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: error.type.all, error.type.connection_timeout, error.type.access_denied, error.type.parse_req_error, error.type.parse_resp_error, error.type.connection_failed, error.type.deny_and_retry, error.type.ssl_failed, error.type.deny_and_captcha, error.type.2fa_required, error.type.no_ssl_config, error.type.no_ipv6_config.
    Filter string
    The filter defines the conditions that trigger the rule action. For action RULE_ACTION_SIMPLIFIED_REDIRECT filter is not relevant. For other actions, if left empty, the rule is always run.
    From string
    Pattern to rewrite. For RULE_ACTION_REWRITE_URL - Url to rewrite. For RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to rewrite. For RULE_ACTION_REWRITE_COOKIE - Cookie value to rewrite.
    IncapRuleId string
    Unique identifier in the API for the Incap Rule.
    MultipleDeletions bool
    Delete multiple header occurrences. Applies only to rules using RULE_ACTION_DELETE_HEADER and RULE_ACTION_RESPONSE_DELETE_HEADER.
    Name string
    Rule name.
    OverrideWafAction string
    The action for the override rule RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore.
    OverrideWafRule string
    The setting to override RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access.
    PortForwardingContext string
    Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for RULE_ACTION_FORWARD_TO_PORT.
    PortForwardingValue string
    Port number or header name for port forwarding. Applies only for RULE_ACTION_FORWARD_TO_PORT.
    RateContext string
    The context of the rate counter. Possible values IP or Session. Applies only to rules using RULE_ACTION_RATE.
    RateInterval double
    The interval in seconds of the rate counter. Possible values is a multiple of 10; minimum 10 and maximum 300. Applies only to rules using RULE_ACTION_RATE.
    ResponseCode double
    For RULE_ACTION_REDIRECT or RULE_ACTION_SIMPLIFIED_REDIRECT rule's response code, valid values are 302, 301, 303, 307, 308. For RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE rule's response code, valid values are all 3-digits numbers. For RULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 419, 420, 422, 423, 424, 500, 501, 502, 503, 504, 505, 507.
    RewriteExisting bool
    Rewrite cookie or header if it exists.
    RewriteName string
    Name of cookie or header to rewrite. Applies only for RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER.
    SendNotifications string
    Send an email notification whenever this rule is triggered. Possible values: true, false. Default value is false. Applies to the following security actions: RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA.
    To string
    Pattern to change to. RULE_ACTION_REWRITE_URL - Url to change to. RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to change to. RULE_ACTION_REWRITE_COOKIE - Cookie value to change to.
    Action string
    Rule action. See the detailed descriptions in the API documentation. Possible values: RULE_ACTION_REDIRECT, RULE_ACTION_SIMPLIFIED_REDIRECT, RULE_ACTION_REWRITE_URL, RULE_ACTION_REWRITE_HEADER, RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_DELETE_HEADER, RULE_ACTION_DELETE_COOKIE, RULE_ACTION_RESPONSE_REWRITE_HEADER, RULE_ACTION_RESPONSE_DELETE_HEADER, RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE, RULE_ACTION_FORWARD_TO_DC, RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA, RULE_ACTION_RATE, RULE_ACTION_CUSTOM_ERROR_RESPONSE, RULE_ACTION_FORWARD_TO_PORT, RULE_ACTION_WAF_OVERRIDE.
    SiteId string
    Numeric identifier of the site to operate on.
    AddMissing bool
    Add cookie or header if it doesn't exist (Rewrite cookie rule only).
    BlockDuration float64
    Value of the fixed block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and fixed block_duration_type
    BlockDurationMax float64
    The upper limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    BlockDurationMin float64
    The lower limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    BlockDurationType string
    Block duration types: fixed, randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by the block_duration parameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action.
    DcId float64
    Data center to forward request to. Applies only for RULE_ACTION_FORWARD_TO_DC.
    Enabled bool
    Boolean that enables the rule. Possible values: true, false. Default value is true.
    ErrorResponseData string
    The response returned when the request matches the filter and is blocked. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE.
    ErrorResponseFormat string
    The format of the given error response in the error_response_data field. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: json, xml.
    ErrorType string
    The error that triggers the rule. error.type.all triggers the rule regardless of the error type. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: error.type.all, error.type.connection_timeout, error.type.access_denied, error.type.parse_req_error, error.type.parse_resp_error, error.type.connection_failed, error.type.deny_and_retry, error.type.ssl_failed, error.type.deny_and_captcha, error.type.2fa_required, error.type.no_ssl_config, error.type.no_ipv6_config.
    Filter string
    The filter defines the conditions that trigger the rule action. For action RULE_ACTION_SIMPLIFIED_REDIRECT filter is not relevant. For other actions, if left empty, the rule is always run.
    From string
    Pattern to rewrite. For RULE_ACTION_REWRITE_URL - Url to rewrite. For RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to rewrite. For RULE_ACTION_REWRITE_COOKIE - Cookie value to rewrite.
    IncapRuleId string
    Unique identifier in the API for the Incap Rule.
    MultipleDeletions bool
    Delete multiple header occurrences. Applies only to rules using RULE_ACTION_DELETE_HEADER and RULE_ACTION_RESPONSE_DELETE_HEADER.
    Name string
    Rule name.
    OverrideWafAction string
    The action for the override rule RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore.
    OverrideWafRule string
    The setting to override RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access.
    PortForwardingContext string
    Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for RULE_ACTION_FORWARD_TO_PORT.
    PortForwardingValue string
    Port number or header name for port forwarding. Applies only for RULE_ACTION_FORWARD_TO_PORT.
    RateContext string
    The context of the rate counter. Possible values IP or Session. Applies only to rules using RULE_ACTION_RATE.
    RateInterval float64
    The interval in seconds of the rate counter. Possible values is a multiple of 10; minimum 10 and maximum 300. Applies only to rules using RULE_ACTION_RATE.
    ResponseCode float64
    For RULE_ACTION_REDIRECT or RULE_ACTION_SIMPLIFIED_REDIRECT rule's response code, valid values are 302, 301, 303, 307, 308. For RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE rule's response code, valid values are all 3-digits numbers. For RULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 419, 420, 422, 423, 424, 500, 501, 502, 503, 504, 505, 507.
    RewriteExisting bool
    Rewrite cookie or header if it exists.
    RewriteName string
    Name of cookie or header to rewrite. Applies only for RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER.
    SendNotifications string
    Send an email notification whenever this rule is triggered. Possible values: true, false. Default value is false. Applies to the following security actions: RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA.
    To string
    Pattern to change to. RULE_ACTION_REWRITE_URL - Url to change to. RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to change to. RULE_ACTION_REWRITE_COOKIE - Cookie value to change to.
    action String
    Rule action. See the detailed descriptions in the API documentation. Possible values: RULE_ACTION_REDIRECT, RULE_ACTION_SIMPLIFIED_REDIRECT, RULE_ACTION_REWRITE_URL, RULE_ACTION_REWRITE_HEADER, RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_DELETE_HEADER, RULE_ACTION_DELETE_COOKIE, RULE_ACTION_RESPONSE_REWRITE_HEADER, RULE_ACTION_RESPONSE_DELETE_HEADER, RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE, RULE_ACTION_FORWARD_TO_DC, RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA, RULE_ACTION_RATE, RULE_ACTION_CUSTOM_ERROR_RESPONSE, RULE_ACTION_FORWARD_TO_PORT, RULE_ACTION_WAF_OVERRIDE.
    siteId String
    Numeric identifier of the site to operate on.
    addMissing Boolean
    Add cookie or header if it doesn't exist (Rewrite cookie rule only).
    blockDuration Double
    Value of the fixed block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and fixed block_duration_type
    blockDurationMax Double
    The upper limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    blockDurationMin Double
    The lower limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    blockDurationType String
    Block duration types: fixed, randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by the block_duration parameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action.
    dcId Double
    Data center to forward request to. Applies only for RULE_ACTION_FORWARD_TO_DC.
    enabled Boolean
    Boolean that enables the rule. Possible values: true, false. Default value is true.
    errorResponseData String
    The response returned when the request matches the filter and is blocked. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE.
    errorResponseFormat String
    The format of the given error response in the error_response_data field. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: json, xml.
    errorType String
    The error that triggers the rule. error.type.all triggers the rule regardless of the error type. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: error.type.all, error.type.connection_timeout, error.type.access_denied, error.type.parse_req_error, error.type.parse_resp_error, error.type.connection_failed, error.type.deny_and_retry, error.type.ssl_failed, error.type.deny_and_captcha, error.type.2fa_required, error.type.no_ssl_config, error.type.no_ipv6_config.
    filter String
    The filter defines the conditions that trigger the rule action. For action RULE_ACTION_SIMPLIFIED_REDIRECT filter is not relevant. For other actions, if left empty, the rule is always run.
    from String
    Pattern to rewrite. For RULE_ACTION_REWRITE_URL - Url to rewrite. For RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to rewrite. For RULE_ACTION_REWRITE_COOKIE - Cookie value to rewrite.
    incapRuleId String
    Unique identifier in the API for the Incap Rule.
    multipleDeletions Boolean
    Delete multiple header occurrences. Applies only to rules using RULE_ACTION_DELETE_HEADER and RULE_ACTION_RESPONSE_DELETE_HEADER.
    name String
    Rule name.
    overrideWafAction String
    The action for the override rule RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore.
    overrideWafRule String
    The setting to override RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access.
    portForwardingContext String
    Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for RULE_ACTION_FORWARD_TO_PORT.
    portForwardingValue String
    Port number or header name for port forwarding. Applies only for RULE_ACTION_FORWARD_TO_PORT.
    rateContext String
    The context of the rate counter. Possible values IP or Session. Applies only to rules using RULE_ACTION_RATE.
    rateInterval Double
    The interval in seconds of the rate counter. Possible values is a multiple of 10; minimum 10 and maximum 300. Applies only to rules using RULE_ACTION_RATE.
    responseCode Double
    For RULE_ACTION_REDIRECT or RULE_ACTION_SIMPLIFIED_REDIRECT rule's response code, valid values are 302, 301, 303, 307, 308. For RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE rule's response code, valid values are all 3-digits numbers. For RULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 419, 420, 422, 423, 424, 500, 501, 502, 503, 504, 505, 507.
    rewriteExisting Boolean
    Rewrite cookie or header if it exists.
    rewriteName String
    Name of cookie or header to rewrite. Applies only for RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER.
    sendNotifications String
    Send an email notification whenever this rule is triggered. Possible values: true, false. Default value is false. Applies to the following security actions: RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA.
    to String
    Pattern to change to. RULE_ACTION_REWRITE_URL - Url to change to. RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to change to. RULE_ACTION_REWRITE_COOKIE - Cookie value to change to.
    action string
    Rule action. See the detailed descriptions in the API documentation. Possible values: RULE_ACTION_REDIRECT, RULE_ACTION_SIMPLIFIED_REDIRECT, RULE_ACTION_REWRITE_URL, RULE_ACTION_REWRITE_HEADER, RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_DELETE_HEADER, RULE_ACTION_DELETE_COOKIE, RULE_ACTION_RESPONSE_REWRITE_HEADER, RULE_ACTION_RESPONSE_DELETE_HEADER, RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE, RULE_ACTION_FORWARD_TO_DC, RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA, RULE_ACTION_RATE, RULE_ACTION_CUSTOM_ERROR_RESPONSE, RULE_ACTION_FORWARD_TO_PORT, RULE_ACTION_WAF_OVERRIDE.
    siteId string
    Numeric identifier of the site to operate on.
    addMissing boolean
    Add cookie or header if it doesn't exist (Rewrite cookie rule only).
    blockDuration number
    Value of the fixed block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and fixed block_duration_type
    blockDurationMax number
    The upper limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    blockDurationMin number
    The lower limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    blockDurationType string
    Block duration types: fixed, randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by the block_duration parameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action.
    dcId number
    Data center to forward request to. Applies only for RULE_ACTION_FORWARD_TO_DC.
    enabled boolean
    Boolean that enables the rule. Possible values: true, false. Default value is true.
    errorResponseData string
    The response returned when the request matches the filter and is blocked. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE.
    errorResponseFormat string
    The format of the given error response in the error_response_data field. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: json, xml.
    errorType string
    The error that triggers the rule. error.type.all triggers the rule regardless of the error type. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: error.type.all, error.type.connection_timeout, error.type.access_denied, error.type.parse_req_error, error.type.parse_resp_error, error.type.connection_failed, error.type.deny_and_retry, error.type.ssl_failed, error.type.deny_and_captcha, error.type.2fa_required, error.type.no_ssl_config, error.type.no_ipv6_config.
    filter string
    The filter defines the conditions that trigger the rule action. For action RULE_ACTION_SIMPLIFIED_REDIRECT filter is not relevant. For other actions, if left empty, the rule is always run.
    from string
    Pattern to rewrite. For RULE_ACTION_REWRITE_URL - Url to rewrite. For RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to rewrite. For RULE_ACTION_REWRITE_COOKIE - Cookie value to rewrite.
    incapRuleId string
    Unique identifier in the API for the Incap Rule.
    multipleDeletions boolean
    Delete multiple header occurrences. Applies only to rules using RULE_ACTION_DELETE_HEADER and RULE_ACTION_RESPONSE_DELETE_HEADER.
    name string
    Rule name.
    overrideWafAction string
    The action for the override rule RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore.
    overrideWafRule string
    The setting to override RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access.
    portForwardingContext string
    Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for RULE_ACTION_FORWARD_TO_PORT.
    portForwardingValue string
    Port number or header name for port forwarding. Applies only for RULE_ACTION_FORWARD_TO_PORT.
    rateContext string
    The context of the rate counter. Possible values IP or Session. Applies only to rules using RULE_ACTION_RATE.
    rateInterval number
    The interval in seconds of the rate counter. Possible values is a multiple of 10; minimum 10 and maximum 300. Applies only to rules using RULE_ACTION_RATE.
    responseCode number
    For RULE_ACTION_REDIRECT or RULE_ACTION_SIMPLIFIED_REDIRECT rule's response code, valid values are 302, 301, 303, 307, 308. For RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE rule's response code, valid values are all 3-digits numbers. For RULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 419, 420, 422, 423, 424, 500, 501, 502, 503, 504, 505, 507.
    rewriteExisting boolean
    Rewrite cookie or header if it exists.
    rewriteName string
    Name of cookie or header to rewrite. Applies only for RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER.
    sendNotifications string
    Send an email notification whenever this rule is triggered. Possible values: true, false. Default value is false. Applies to the following security actions: RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA.
    to string
    Pattern to change to. RULE_ACTION_REWRITE_URL - Url to change to. RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to change to. RULE_ACTION_REWRITE_COOKIE - Cookie value to change to.
    action str
    Rule action. See the detailed descriptions in the API documentation. Possible values: RULE_ACTION_REDIRECT, RULE_ACTION_SIMPLIFIED_REDIRECT, RULE_ACTION_REWRITE_URL, RULE_ACTION_REWRITE_HEADER, RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_DELETE_HEADER, RULE_ACTION_DELETE_COOKIE, RULE_ACTION_RESPONSE_REWRITE_HEADER, RULE_ACTION_RESPONSE_DELETE_HEADER, RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE, RULE_ACTION_FORWARD_TO_DC, RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA, RULE_ACTION_RATE, RULE_ACTION_CUSTOM_ERROR_RESPONSE, RULE_ACTION_FORWARD_TO_PORT, RULE_ACTION_WAF_OVERRIDE.
    site_id str
    Numeric identifier of the site to operate on.
    add_missing bool
    Add cookie or header if it doesn't exist (Rewrite cookie rule only).
    block_duration float
    Value of the fixed block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and fixed block_duration_type
    block_duration_max float
    The upper limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    block_duration_min float
    The lower limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    block_duration_type str
    Block duration types: fixed, randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by the block_duration parameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action.
    dc_id float
    Data center to forward request to. Applies only for RULE_ACTION_FORWARD_TO_DC.
    enabled bool
    Boolean that enables the rule. Possible values: true, false. Default value is true.
    error_response_data str
    The response returned when the request matches the filter and is blocked. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE.
    error_response_format str
    The format of the given error response in the error_response_data field. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: json, xml.
    error_type str
    The error that triggers the rule. error.type.all triggers the rule regardless of the error type. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: error.type.all, error.type.connection_timeout, error.type.access_denied, error.type.parse_req_error, error.type.parse_resp_error, error.type.connection_failed, error.type.deny_and_retry, error.type.ssl_failed, error.type.deny_and_captcha, error.type.2fa_required, error.type.no_ssl_config, error.type.no_ipv6_config.
    filter str
    The filter defines the conditions that trigger the rule action. For action RULE_ACTION_SIMPLIFIED_REDIRECT filter is not relevant. For other actions, if left empty, the rule is always run.
    from_ str
    Pattern to rewrite. For RULE_ACTION_REWRITE_URL - Url to rewrite. For RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to rewrite. For RULE_ACTION_REWRITE_COOKIE - Cookie value to rewrite.
    incap_rule_id str
    Unique identifier in the API for the Incap Rule.
    multiple_deletions bool
    Delete multiple header occurrences. Applies only to rules using RULE_ACTION_DELETE_HEADER and RULE_ACTION_RESPONSE_DELETE_HEADER.
    name str
    Rule name.
    override_waf_action str
    The action for the override rule RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore.
    override_waf_rule str
    The setting to override RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access.
    port_forwarding_context str
    Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for RULE_ACTION_FORWARD_TO_PORT.
    port_forwarding_value str
    Port number or header name for port forwarding. Applies only for RULE_ACTION_FORWARD_TO_PORT.
    rate_context str
    The context of the rate counter. Possible values IP or Session. Applies only to rules using RULE_ACTION_RATE.
    rate_interval float
    The interval in seconds of the rate counter. Possible values is a multiple of 10; minimum 10 and maximum 300. Applies only to rules using RULE_ACTION_RATE.
    response_code float
    For RULE_ACTION_REDIRECT or RULE_ACTION_SIMPLIFIED_REDIRECT rule's response code, valid values are 302, 301, 303, 307, 308. For RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE rule's response code, valid values are all 3-digits numbers. For RULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 419, 420, 422, 423, 424, 500, 501, 502, 503, 504, 505, 507.
    rewrite_existing bool
    Rewrite cookie or header if it exists.
    rewrite_name str
    Name of cookie or header to rewrite. Applies only for RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER.
    send_notifications str
    Send an email notification whenever this rule is triggered. Possible values: true, false. Default value is false. Applies to the following security actions: RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA.
    to str
    Pattern to change to. RULE_ACTION_REWRITE_URL - Url to change to. RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to change to. RULE_ACTION_REWRITE_COOKIE - Cookie value to change to.
    action String
    Rule action. See the detailed descriptions in the API documentation. Possible values: RULE_ACTION_REDIRECT, RULE_ACTION_SIMPLIFIED_REDIRECT, RULE_ACTION_REWRITE_URL, RULE_ACTION_REWRITE_HEADER, RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_DELETE_HEADER, RULE_ACTION_DELETE_COOKIE, RULE_ACTION_RESPONSE_REWRITE_HEADER, RULE_ACTION_RESPONSE_DELETE_HEADER, RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE, RULE_ACTION_FORWARD_TO_DC, RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA, RULE_ACTION_RATE, RULE_ACTION_CUSTOM_ERROR_RESPONSE, RULE_ACTION_FORWARD_TO_PORT, RULE_ACTION_WAF_OVERRIDE.
    siteId String
    Numeric identifier of the site to operate on.
    addMissing Boolean
    Add cookie or header if it doesn't exist (Rewrite cookie rule only).
    blockDuration Number
    Value of the fixed block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and fixed block_duration_type
    blockDurationMax Number
    The upper limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    blockDurationMin Number
    The lower limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    blockDurationType String
    Block duration types: fixed, randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by the block_duration parameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action.
    dcId Number
    Data center to forward request to. Applies only for RULE_ACTION_FORWARD_TO_DC.
    enabled Boolean
    Boolean that enables the rule. Possible values: true, false. Default value is true.
    errorResponseData String
    The response returned when the request matches the filter and is blocked. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE.
    errorResponseFormat String
    The format of the given error response in the error_response_data field. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: json, xml.
    errorType String
    The error that triggers the rule. error.type.all triggers the rule regardless of the error type. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: error.type.all, error.type.connection_timeout, error.type.access_denied, error.type.parse_req_error, error.type.parse_resp_error, error.type.connection_failed, error.type.deny_and_retry, error.type.ssl_failed, error.type.deny_and_captcha, error.type.2fa_required, error.type.no_ssl_config, error.type.no_ipv6_config.
    filter String
    The filter defines the conditions that trigger the rule action. For action RULE_ACTION_SIMPLIFIED_REDIRECT filter is not relevant. For other actions, if left empty, the rule is always run.
    from String
    Pattern to rewrite. For RULE_ACTION_REWRITE_URL - Url to rewrite. For RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to rewrite. For RULE_ACTION_REWRITE_COOKIE - Cookie value to rewrite.
    incapRuleId String
    Unique identifier in the API for the Incap Rule.
    multipleDeletions Boolean
    Delete multiple header occurrences. Applies only to rules using RULE_ACTION_DELETE_HEADER and RULE_ACTION_RESPONSE_DELETE_HEADER.
    name String
    Rule name.
    overrideWafAction String
    The action for the override rule RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore.
    overrideWafRule String
    The setting to override RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access.
    portForwardingContext String
    Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for RULE_ACTION_FORWARD_TO_PORT.
    portForwardingValue String
    Port number or header name for port forwarding. Applies only for RULE_ACTION_FORWARD_TO_PORT.
    rateContext String
    The context of the rate counter. Possible values IP or Session. Applies only to rules using RULE_ACTION_RATE.
    rateInterval Number
    The interval in seconds of the rate counter. Possible values is a multiple of 10; minimum 10 and maximum 300. Applies only to rules using RULE_ACTION_RATE.
    responseCode Number
    For RULE_ACTION_REDIRECT or RULE_ACTION_SIMPLIFIED_REDIRECT rule's response code, valid values are 302, 301, 303, 307, 308. For RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE rule's response code, valid values are all 3-digits numbers. For RULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 419, 420, 422, 423, 424, 500, 501, 502, 503, 504, 505, 507.
    rewriteExisting Boolean
    Rewrite cookie or header if it exists.
    rewriteName String
    Name of cookie or header to rewrite. Applies only for RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER.
    sendNotifications String
    Send an email notification whenever this rule is triggered. Possible values: true, false. Default value is false. Applies to the following security actions: RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA.
    to String
    Pattern to change to. RULE_ACTION_REWRITE_URL - Url to change to. RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to change to. RULE_ACTION_REWRITE_COOKIE - Cookie value to change to.

    Outputs

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

    Get an existing IncapRule 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?: IncapRuleState, opts?: CustomResourceOptions): IncapRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[str] = None,
            add_missing: Optional[bool] = None,
            block_duration: Optional[float] = None,
            block_duration_max: Optional[float] = None,
            block_duration_min: Optional[float] = None,
            block_duration_type: Optional[str] = None,
            dc_id: Optional[float] = None,
            enabled: Optional[bool] = None,
            error_response_data: Optional[str] = None,
            error_response_format: Optional[str] = None,
            error_type: Optional[str] = None,
            filter: Optional[str] = None,
            from_: Optional[str] = None,
            incap_rule_id: Optional[str] = None,
            multiple_deletions: Optional[bool] = None,
            name: Optional[str] = None,
            override_waf_action: Optional[str] = None,
            override_waf_rule: Optional[str] = None,
            port_forwarding_context: Optional[str] = None,
            port_forwarding_value: Optional[str] = None,
            rate_context: Optional[str] = None,
            rate_interval: Optional[float] = None,
            response_code: Optional[float] = None,
            rewrite_existing: Optional[bool] = None,
            rewrite_name: Optional[str] = None,
            send_notifications: Optional[str] = None,
            site_id: Optional[str] = None,
            to: Optional[str] = None) -> IncapRule
    func GetIncapRule(ctx *Context, name string, id IDInput, state *IncapRuleState, opts ...ResourceOption) (*IncapRule, error)
    public static IncapRule Get(string name, Input<string> id, IncapRuleState? state, CustomResourceOptions? opts = null)
    public static IncapRule get(String name, Output<String> id, IncapRuleState state, CustomResourceOptions options)
    resources:  _:    type: incapsula:IncapRule    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
    Rule action. See the detailed descriptions in the API documentation. Possible values: RULE_ACTION_REDIRECT, RULE_ACTION_SIMPLIFIED_REDIRECT, RULE_ACTION_REWRITE_URL, RULE_ACTION_REWRITE_HEADER, RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_DELETE_HEADER, RULE_ACTION_DELETE_COOKIE, RULE_ACTION_RESPONSE_REWRITE_HEADER, RULE_ACTION_RESPONSE_DELETE_HEADER, RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE, RULE_ACTION_FORWARD_TO_DC, RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA, RULE_ACTION_RATE, RULE_ACTION_CUSTOM_ERROR_RESPONSE, RULE_ACTION_FORWARD_TO_PORT, RULE_ACTION_WAF_OVERRIDE.
    AddMissing bool
    Add cookie or header if it doesn't exist (Rewrite cookie rule only).
    BlockDuration double
    Value of the fixed block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and fixed block_duration_type
    BlockDurationMax double
    The upper limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    BlockDurationMin double
    The lower limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    BlockDurationType string
    Block duration types: fixed, randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by the block_duration parameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action.
    DcId double
    Data center to forward request to. Applies only for RULE_ACTION_FORWARD_TO_DC.
    Enabled bool
    Boolean that enables the rule. Possible values: true, false. Default value is true.
    ErrorResponseData string
    The response returned when the request matches the filter and is blocked. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE.
    ErrorResponseFormat string
    The format of the given error response in the error_response_data field. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: json, xml.
    ErrorType string
    The error that triggers the rule. error.type.all triggers the rule regardless of the error type. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: error.type.all, error.type.connection_timeout, error.type.access_denied, error.type.parse_req_error, error.type.parse_resp_error, error.type.connection_failed, error.type.deny_and_retry, error.type.ssl_failed, error.type.deny_and_captcha, error.type.2fa_required, error.type.no_ssl_config, error.type.no_ipv6_config.
    Filter string
    The filter defines the conditions that trigger the rule action. For action RULE_ACTION_SIMPLIFIED_REDIRECT filter is not relevant. For other actions, if left empty, the rule is always run.
    From string
    Pattern to rewrite. For RULE_ACTION_REWRITE_URL - Url to rewrite. For RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to rewrite. For RULE_ACTION_REWRITE_COOKIE - Cookie value to rewrite.
    IncapRuleId string
    Unique identifier in the API for the Incap Rule.
    MultipleDeletions bool
    Delete multiple header occurrences. Applies only to rules using RULE_ACTION_DELETE_HEADER and RULE_ACTION_RESPONSE_DELETE_HEADER.
    Name string
    Rule name.
    OverrideWafAction string
    The action for the override rule RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore.
    OverrideWafRule string
    The setting to override RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access.
    PortForwardingContext string
    Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for RULE_ACTION_FORWARD_TO_PORT.
    PortForwardingValue string
    Port number or header name for port forwarding. Applies only for RULE_ACTION_FORWARD_TO_PORT.
    RateContext string
    The context of the rate counter. Possible values IP or Session. Applies only to rules using RULE_ACTION_RATE.
    RateInterval double
    The interval in seconds of the rate counter. Possible values is a multiple of 10; minimum 10 and maximum 300. Applies only to rules using RULE_ACTION_RATE.
    ResponseCode double
    For RULE_ACTION_REDIRECT or RULE_ACTION_SIMPLIFIED_REDIRECT rule's response code, valid values are 302, 301, 303, 307, 308. For RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE rule's response code, valid values are all 3-digits numbers. For RULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 419, 420, 422, 423, 424, 500, 501, 502, 503, 504, 505, 507.
    RewriteExisting bool
    Rewrite cookie or header if it exists.
    RewriteName string
    Name of cookie or header to rewrite. Applies only for RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER.
    SendNotifications string
    Send an email notification whenever this rule is triggered. Possible values: true, false. Default value is false. Applies to the following security actions: RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA.
    SiteId string
    Numeric identifier of the site to operate on.
    To string
    Pattern to change to. RULE_ACTION_REWRITE_URL - Url to change to. RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to change to. RULE_ACTION_REWRITE_COOKIE - Cookie value to change to.
    Action string
    Rule action. See the detailed descriptions in the API documentation. Possible values: RULE_ACTION_REDIRECT, RULE_ACTION_SIMPLIFIED_REDIRECT, RULE_ACTION_REWRITE_URL, RULE_ACTION_REWRITE_HEADER, RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_DELETE_HEADER, RULE_ACTION_DELETE_COOKIE, RULE_ACTION_RESPONSE_REWRITE_HEADER, RULE_ACTION_RESPONSE_DELETE_HEADER, RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE, RULE_ACTION_FORWARD_TO_DC, RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA, RULE_ACTION_RATE, RULE_ACTION_CUSTOM_ERROR_RESPONSE, RULE_ACTION_FORWARD_TO_PORT, RULE_ACTION_WAF_OVERRIDE.
    AddMissing bool
    Add cookie or header if it doesn't exist (Rewrite cookie rule only).
    BlockDuration float64
    Value of the fixed block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and fixed block_duration_type
    BlockDurationMax float64
    The upper limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    BlockDurationMin float64
    The lower limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    BlockDurationType string
    Block duration types: fixed, randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by the block_duration parameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action.
    DcId float64
    Data center to forward request to. Applies only for RULE_ACTION_FORWARD_TO_DC.
    Enabled bool
    Boolean that enables the rule. Possible values: true, false. Default value is true.
    ErrorResponseData string
    The response returned when the request matches the filter and is blocked. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE.
    ErrorResponseFormat string
    The format of the given error response in the error_response_data field. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: json, xml.
    ErrorType string
    The error that triggers the rule. error.type.all triggers the rule regardless of the error type. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: error.type.all, error.type.connection_timeout, error.type.access_denied, error.type.parse_req_error, error.type.parse_resp_error, error.type.connection_failed, error.type.deny_and_retry, error.type.ssl_failed, error.type.deny_and_captcha, error.type.2fa_required, error.type.no_ssl_config, error.type.no_ipv6_config.
    Filter string
    The filter defines the conditions that trigger the rule action. For action RULE_ACTION_SIMPLIFIED_REDIRECT filter is not relevant. For other actions, if left empty, the rule is always run.
    From string
    Pattern to rewrite. For RULE_ACTION_REWRITE_URL - Url to rewrite. For RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to rewrite. For RULE_ACTION_REWRITE_COOKIE - Cookie value to rewrite.
    IncapRuleId string
    Unique identifier in the API for the Incap Rule.
    MultipleDeletions bool
    Delete multiple header occurrences. Applies only to rules using RULE_ACTION_DELETE_HEADER and RULE_ACTION_RESPONSE_DELETE_HEADER.
    Name string
    Rule name.
    OverrideWafAction string
    The action for the override rule RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore.
    OverrideWafRule string
    The setting to override RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access.
    PortForwardingContext string
    Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for RULE_ACTION_FORWARD_TO_PORT.
    PortForwardingValue string
    Port number or header name for port forwarding. Applies only for RULE_ACTION_FORWARD_TO_PORT.
    RateContext string
    The context of the rate counter. Possible values IP or Session. Applies only to rules using RULE_ACTION_RATE.
    RateInterval float64
    The interval in seconds of the rate counter. Possible values is a multiple of 10; minimum 10 and maximum 300. Applies only to rules using RULE_ACTION_RATE.
    ResponseCode float64
    For RULE_ACTION_REDIRECT or RULE_ACTION_SIMPLIFIED_REDIRECT rule's response code, valid values are 302, 301, 303, 307, 308. For RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE rule's response code, valid values are all 3-digits numbers. For RULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 419, 420, 422, 423, 424, 500, 501, 502, 503, 504, 505, 507.
    RewriteExisting bool
    Rewrite cookie or header if it exists.
    RewriteName string
    Name of cookie or header to rewrite. Applies only for RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER.
    SendNotifications string
    Send an email notification whenever this rule is triggered. Possible values: true, false. Default value is false. Applies to the following security actions: RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA.
    SiteId string
    Numeric identifier of the site to operate on.
    To string
    Pattern to change to. RULE_ACTION_REWRITE_URL - Url to change to. RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to change to. RULE_ACTION_REWRITE_COOKIE - Cookie value to change to.
    action String
    Rule action. See the detailed descriptions in the API documentation. Possible values: RULE_ACTION_REDIRECT, RULE_ACTION_SIMPLIFIED_REDIRECT, RULE_ACTION_REWRITE_URL, RULE_ACTION_REWRITE_HEADER, RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_DELETE_HEADER, RULE_ACTION_DELETE_COOKIE, RULE_ACTION_RESPONSE_REWRITE_HEADER, RULE_ACTION_RESPONSE_DELETE_HEADER, RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE, RULE_ACTION_FORWARD_TO_DC, RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA, RULE_ACTION_RATE, RULE_ACTION_CUSTOM_ERROR_RESPONSE, RULE_ACTION_FORWARD_TO_PORT, RULE_ACTION_WAF_OVERRIDE.
    addMissing Boolean
    Add cookie or header if it doesn't exist (Rewrite cookie rule only).
    blockDuration Double
    Value of the fixed block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and fixed block_duration_type
    blockDurationMax Double
    The upper limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    blockDurationMin Double
    The lower limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    blockDurationType String
    Block duration types: fixed, randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by the block_duration parameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action.
    dcId Double
    Data center to forward request to. Applies only for RULE_ACTION_FORWARD_TO_DC.
    enabled Boolean
    Boolean that enables the rule. Possible values: true, false. Default value is true.
    errorResponseData String
    The response returned when the request matches the filter and is blocked. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE.
    errorResponseFormat String
    The format of the given error response in the error_response_data field. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: json, xml.
    errorType String
    The error that triggers the rule. error.type.all triggers the rule regardless of the error type. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: error.type.all, error.type.connection_timeout, error.type.access_denied, error.type.parse_req_error, error.type.parse_resp_error, error.type.connection_failed, error.type.deny_and_retry, error.type.ssl_failed, error.type.deny_and_captcha, error.type.2fa_required, error.type.no_ssl_config, error.type.no_ipv6_config.
    filter String
    The filter defines the conditions that trigger the rule action. For action RULE_ACTION_SIMPLIFIED_REDIRECT filter is not relevant. For other actions, if left empty, the rule is always run.
    from String
    Pattern to rewrite. For RULE_ACTION_REWRITE_URL - Url to rewrite. For RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to rewrite. For RULE_ACTION_REWRITE_COOKIE - Cookie value to rewrite.
    incapRuleId String
    Unique identifier in the API for the Incap Rule.
    multipleDeletions Boolean
    Delete multiple header occurrences. Applies only to rules using RULE_ACTION_DELETE_HEADER and RULE_ACTION_RESPONSE_DELETE_HEADER.
    name String
    Rule name.
    overrideWafAction String
    The action for the override rule RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore.
    overrideWafRule String
    The setting to override RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access.
    portForwardingContext String
    Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for RULE_ACTION_FORWARD_TO_PORT.
    portForwardingValue String
    Port number or header name for port forwarding. Applies only for RULE_ACTION_FORWARD_TO_PORT.
    rateContext String
    The context of the rate counter. Possible values IP or Session. Applies only to rules using RULE_ACTION_RATE.
    rateInterval Double
    The interval in seconds of the rate counter. Possible values is a multiple of 10; minimum 10 and maximum 300. Applies only to rules using RULE_ACTION_RATE.
    responseCode Double
    For RULE_ACTION_REDIRECT or RULE_ACTION_SIMPLIFIED_REDIRECT rule's response code, valid values are 302, 301, 303, 307, 308. For RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE rule's response code, valid values are all 3-digits numbers. For RULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 419, 420, 422, 423, 424, 500, 501, 502, 503, 504, 505, 507.
    rewriteExisting Boolean
    Rewrite cookie or header if it exists.
    rewriteName String
    Name of cookie or header to rewrite. Applies only for RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER.
    sendNotifications String
    Send an email notification whenever this rule is triggered. Possible values: true, false. Default value is false. Applies to the following security actions: RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA.
    siteId String
    Numeric identifier of the site to operate on.
    to String
    Pattern to change to. RULE_ACTION_REWRITE_URL - Url to change to. RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to change to. RULE_ACTION_REWRITE_COOKIE - Cookie value to change to.
    action string
    Rule action. See the detailed descriptions in the API documentation. Possible values: RULE_ACTION_REDIRECT, RULE_ACTION_SIMPLIFIED_REDIRECT, RULE_ACTION_REWRITE_URL, RULE_ACTION_REWRITE_HEADER, RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_DELETE_HEADER, RULE_ACTION_DELETE_COOKIE, RULE_ACTION_RESPONSE_REWRITE_HEADER, RULE_ACTION_RESPONSE_DELETE_HEADER, RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE, RULE_ACTION_FORWARD_TO_DC, RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA, RULE_ACTION_RATE, RULE_ACTION_CUSTOM_ERROR_RESPONSE, RULE_ACTION_FORWARD_TO_PORT, RULE_ACTION_WAF_OVERRIDE.
    addMissing boolean
    Add cookie or header if it doesn't exist (Rewrite cookie rule only).
    blockDuration number
    Value of the fixed block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and fixed block_duration_type
    blockDurationMax number
    The upper limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    blockDurationMin number
    The lower limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    blockDurationType string
    Block duration types: fixed, randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by the block_duration parameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action.
    dcId number
    Data center to forward request to. Applies only for RULE_ACTION_FORWARD_TO_DC.
    enabled boolean
    Boolean that enables the rule. Possible values: true, false. Default value is true.
    errorResponseData string
    The response returned when the request matches the filter and is blocked. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE.
    errorResponseFormat string
    The format of the given error response in the error_response_data field. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: json, xml.
    errorType string
    The error that triggers the rule. error.type.all triggers the rule regardless of the error type. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: error.type.all, error.type.connection_timeout, error.type.access_denied, error.type.parse_req_error, error.type.parse_resp_error, error.type.connection_failed, error.type.deny_and_retry, error.type.ssl_failed, error.type.deny_and_captcha, error.type.2fa_required, error.type.no_ssl_config, error.type.no_ipv6_config.
    filter string
    The filter defines the conditions that trigger the rule action. For action RULE_ACTION_SIMPLIFIED_REDIRECT filter is not relevant. For other actions, if left empty, the rule is always run.
    from string
    Pattern to rewrite. For RULE_ACTION_REWRITE_URL - Url to rewrite. For RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to rewrite. For RULE_ACTION_REWRITE_COOKIE - Cookie value to rewrite.
    incapRuleId string
    Unique identifier in the API for the Incap Rule.
    multipleDeletions boolean
    Delete multiple header occurrences. Applies only to rules using RULE_ACTION_DELETE_HEADER and RULE_ACTION_RESPONSE_DELETE_HEADER.
    name string
    Rule name.
    overrideWafAction string
    The action for the override rule RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore.
    overrideWafRule string
    The setting to override RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access.
    portForwardingContext string
    Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for RULE_ACTION_FORWARD_TO_PORT.
    portForwardingValue string
    Port number or header name for port forwarding. Applies only for RULE_ACTION_FORWARD_TO_PORT.
    rateContext string
    The context of the rate counter. Possible values IP or Session. Applies only to rules using RULE_ACTION_RATE.
    rateInterval number
    The interval in seconds of the rate counter. Possible values is a multiple of 10; minimum 10 and maximum 300. Applies only to rules using RULE_ACTION_RATE.
    responseCode number
    For RULE_ACTION_REDIRECT or RULE_ACTION_SIMPLIFIED_REDIRECT rule's response code, valid values are 302, 301, 303, 307, 308. For RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE rule's response code, valid values are all 3-digits numbers. For RULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 419, 420, 422, 423, 424, 500, 501, 502, 503, 504, 505, 507.
    rewriteExisting boolean
    Rewrite cookie or header if it exists.
    rewriteName string
    Name of cookie or header to rewrite. Applies only for RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER.
    sendNotifications string
    Send an email notification whenever this rule is triggered. Possible values: true, false. Default value is false. Applies to the following security actions: RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA.
    siteId string
    Numeric identifier of the site to operate on.
    to string
    Pattern to change to. RULE_ACTION_REWRITE_URL - Url to change to. RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to change to. RULE_ACTION_REWRITE_COOKIE - Cookie value to change to.
    action str
    Rule action. See the detailed descriptions in the API documentation. Possible values: RULE_ACTION_REDIRECT, RULE_ACTION_SIMPLIFIED_REDIRECT, RULE_ACTION_REWRITE_URL, RULE_ACTION_REWRITE_HEADER, RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_DELETE_HEADER, RULE_ACTION_DELETE_COOKIE, RULE_ACTION_RESPONSE_REWRITE_HEADER, RULE_ACTION_RESPONSE_DELETE_HEADER, RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE, RULE_ACTION_FORWARD_TO_DC, RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA, RULE_ACTION_RATE, RULE_ACTION_CUSTOM_ERROR_RESPONSE, RULE_ACTION_FORWARD_TO_PORT, RULE_ACTION_WAF_OVERRIDE.
    add_missing bool
    Add cookie or header if it doesn't exist (Rewrite cookie rule only).
    block_duration float
    Value of the fixed block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and fixed block_duration_type
    block_duration_max float
    The upper limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    block_duration_min float
    The lower limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    block_duration_type str
    Block duration types: fixed, randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by the block_duration parameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action.
    dc_id float
    Data center to forward request to. Applies only for RULE_ACTION_FORWARD_TO_DC.
    enabled bool
    Boolean that enables the rule. Possible values: true, false. Default value is true.
    error_response_data str
    The response returned when the request matches the filter and is blocked. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE.
    error_response_format str
    The format of the given error response in the error_response_data field. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: json, xml.
    error_type str
    The error that triggers the rule. error.type.all triggers the rule regardless of the error type. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: error.type.all, error.type.connection_timeout, error.type.access_denied, error.type.parse_req_error, error.type.parse_resp_error, error.type.connection_failed, error.type.deny_and_retry, error.type.ssl_failed, error.type.deny_and_captcha, error.type.2fa_required, error.type.no_ssl_config, error.type.no_ipv6_config.
    filter str
    The filter defines the conditions that trigger the rule action. For action RULE_ACTION_SIMPLIFIED_REDIRECT filter is not relevant. For other actions, if left empty, the rule is always run.
    from_ str
    Pattern to rewrite. For RULE_ACTION_REWRITE_URL - Url to rewrite. For RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to rewrite. For RULE_ACTION_REWRITE_COOKIE - Cookie value to rewrite.
    incap_rule_id str
    Unique identifier in the API for the Incap Rule.
    multiple_deletions bool
    Delete multiple header occurrences. Applies only to rules using RULE_ACTION_DELETE_HEADER and RULE_ACTION_RESPONSE_DELETE_HEADER.
    name str
    Rule name.
    override_waf_action str
    The action for the override rule RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore.
    override_waf_rule str
    The setting to override RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access.
    port_forwarding_context str
    Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for RULE_ACTION_FORWARD_TO_PORT.
    port_forwarding_value str
    Port number or header name for port forwarding. Applies only for RULE_ACTION_FORWARD_TO_PORT.
    rate_context str
    The context of the rate counter. Possible values IP or Session. Applies only to rules using RULE_ACTION_RATE.
    rate_interval float
    The interval in seconds of the rate counter. Possible values is a multiple of 10; minimum 10 and maximum 300. Applies only to rules using RULE_ACTION_RATE.
    response_code float
    For RULE_ACTION_REDIRECT or RULE_ACTION_SIMPLIFIED_REDIRECT rule's response code, valid values are 302, 301, 303, 307, 308. For RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE rule's response code, valid values are all 3-digits numbers. For RULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 419, 420, 422, 423, 424, 500, 501, 502, 503, 504, 505, 507.
    rewrite_existing bool
    Rewrite cookie or header if it exists.
    rewrite_name str
    Name of cookie or header to rewrite. Applies only for RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER.
    send_notifications str
    Send an email notification whenever this rule is triggered. Possible values: true, false. Default value is false. Applies to the following security actions: RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA.
    site_id str
    Numeric identifier of the site to operate on.
    to str
    Pattern to change to. RULE_ACTION_REWRITE_URL - Url to change to. RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to change to. RULE_ACTION_REWRITE_COOKIE - Cookie value to change to.
    action String
    Rule action. See the detailed descriptions in the API documentation. Possible values: RULE_ACTION_REDIRECT, RULE_ACTION_SIMPLIFIED_REDIRECT, RULE_ACTION_REWRITE_URL, RULE_ACTION_REWRITE_HEADER, RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_DELETE_HEADER, RULE_ACTION_DELETE_COOKIE, RULE_ACTION_RESPONSE_REWRITE_HEADER, RULE_ACTION_RESPONSE_DELETE_HEADER, RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE, RULE_ACTION_FORWARD_TO_DC, RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA, RULE_ACTION_RATE, RULE_ACTION_CUSTOM_ERROR_RESPONSE, RULE_ACTION_FORWARD_TO_PORT, RULE_ACTION_WAF_OVERRIDE.
    addMissing Boolean
    Add cookie or header if it doesn't exist (Rewrite cookie rule only).
    blockDuration Number
    Value of the fixed block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and fixed block_duration_type
    blockDurationMax Number
    The upper limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    blockDurationMin Number
    The lower limit for the randomized block duration. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action and randomized block_duration_type
    blockDurationType String
    Block duration types: fixed, randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by the block_duration parameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only for RULE_ACTION_BLOCK_USER or RULE_ACTION_BLOCK_IP action.
    dcId Number
    Data center to forward request to. Applies only for RULE_ACTION_FORWARD_TO_DC.
    enabled Boolean
    Boolean that enables the rule. Possible values: true, false. Default value is true.
    errorResponseData String
    The response returned when the request matches the filter and is blocked. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE.
    errorResponseFormat String
    The format of the given error response in the error_response_data field. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: json, xml.
    errorType String
    The error that triggers the rule. error.type.all triggers the rule regardless of the error type. Applies only for RULE_ACTION_CUSTOM_ERROR_RESPONSE. Possible values: error.type.all, error.type.connection_timeout, error.type.access_denied, error.type.parse_req_error, error.type.parse_resp_error, error.type.connection_failed, error.type.deny_and_retry, error.type.ssl_failed, error.type.deny_and_captcha, error.type.2fa_required, error.type.no_ssl_config, error.type.no_ipv6_config.
    filter String
    The filter defines the conditions that trigger the rule action. For action RULE_ACTION_SIMPLIFIED_REDIRECT filter is not relevant. For other actions, if left empty, the rule is always run.
    from String
    Pattern to rewrite. For RULE_ACTION_REWRITE_URL - Url to rewrite. For RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to rewrite. For RULE_ACTION_REWRITE_COOKIE - Cookie value to rewrite.
    incapRuleId String
    Unique identifier in the API for the Incap Rule.
    multipleDeletions Boolean
    Delete multiple header occurrences. Applies only to rules using RULE_ACTION_DELETE_HEADER and RULE_ACTION_RESPONSE_DELETE_HEADER.
    name String
    Rule name.
    overrideWafAction String
    The action for the override rule RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore.
    overrideWafRule String
    The setting to override RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access.
    portForwardingContext String
    Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for RULE_ACTION_FORWARD_TO_PORT.
    portForwardingValue String
    Port number or header name for port forwarding. Applies only for RULE_ACTION_FORWARD_TO_PORT.
    rateContext String
    The context of the rate counter. Possible values IP or Session. Applies only to rules using RULE_ACTION_RATE.
    rateInterval Number
    The interval in seconds of the rate counter. Possible values is a multiple of 10; minimum 10 and maximum 300. Applies only to rules using RULE_ACTION_RATE.
    responseCode Number
    For RULE_ACTION_REDIRECT or RULE_ACTION_SIMPLIFIED_REDIRECT rule's response code, valid values are 302, 301, 303, 307, 308. For RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE rule's response code, valid values are all 3-digits numbers. For RULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 419, 420, 422, 423, 424, 500, 501, 502, 503, 504, 505, 507.
    rewriteExisting Boolean
    Rewrite cookie or header if it exists.
    rewriteName String
    Name of cookie or header to rewrite. Applies only for RULE_ACTION_REWRITE_COOKIE, RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER.
    sendNotifications String
    Send an email notification whenever this rule is triggered. Possible values: true, false. Default value is false. Applies to the following security actions: RULE_ACTION_ALERT, RULE_ACTION_BLOCK, RULE_ACTION_BLOCK_USER, RULE_ACTION_BLOCK_IP, RULE_ACTION_RETRY, RULE_ACTION_INTRUSIVE_HTML, RULE_ACTION_CAPTCHA.
    siteId String
    Numeric identifier of the site to operate on.
    to String
    Pattern to change to. RULE_ACTION_REWRITE_URL - Url to change to. RULE_ACTION_REWRITE_HEADER and RULE_ACTION_RESPONSE_REWRITE_HEADER - Header value to change to. RULE_ACTION_REWRITE_COOKIE - Cookie value to change to.

    Import

    Incap Rule can be imported using the role site_id and rule_id separated by /, e.g.:

    $ pulumi import incapsula:index/incapRule:IncapRule demo site_id/rule_id
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    incapsula imperva/terraform-provider-incapsula
    License
    Notes
    This Pulumi package is based on the incapsula Terraform Provider.
    incapsula logo
    incapsula 3.38.0 published on Wednesday, Feb 25, 2026 by imperva
      Meet Neo: Your AI Platform Teammate