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. - Site
Id string - 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 double - Value of the fixed block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandfixedblock_duration_type - Block
Duration doubleMax - The upper limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - Block
Duration doubleMin - The lower limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - Block
Duration stringType - Block duration types:
fixed,randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by theblock_durationparameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only forRULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPaction. - Dc
Id 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.
- Error
Response stringData - The response returned when the request matches the filter and is blocked. Applies only for
RULE_ACTION_CUSTOM_ERROR_RESPONSE. - Error
Response stringFormat - 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 string - The error that triggers the rule.
error.type.alltriggers the rule regardless of the error type. Applies only forRULE_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_REDIRECTfilter 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. ForRULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER- Header value to rewrite. ForRULE_ACTION_REWRITE_COOKIE- Cookie value to rewrite. - Incap
Rule stringId - Unique identifier in the API for the Incap Rule.
- Multiple
Deletions bool - Delete multiple header occurrences. Applies only to rules using
RULE_ACTION_DELETE_HEADERandRULE_ACTION_RESPONSE_DELETE_HEADER. - Name string
- Rule name.
- Override
Waf stringAction - The action for the override rule
RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore. - Override
Waf stringRule - The setting to override
RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access. - Port
Forwarding stringContext - Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for
RULE_ACTION_FORWARD_TO_PORT. - Port
Forwarding stringValue - Port number or header name for port forwarding. Applies only for
RULE_ACTION_FORWARD_TO_PORT. - Rate
Context string - The context of the rate counter. Possible values
IPorSession. Applies only to rules usingRULE_ACTION_RATE. - Rate
Interval double - The interval in seconds of the rate counter. Possible values is a multiple of
10; minimum10and maximum300. Applies only to rules usingRULE_ACTION_RATE. - Response
Code double - For
RULE_ACTION_REDIRECTorRULE_ACTION_SIMPLIFIED_REDIRECTrule's response code, valid values are302,301,303,307,308. ForRULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODErule's response code, valid values are all 3-digits numbers. ForRULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are400,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 string - Name of cookie or header to rewrite. Applies only for
RULE_ACTION_REWRITE_COOKIE,RULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER. - Send
Notifications string - Send an email notification whenever this rule is triggered. Possible values:
true,false. Default value isfalse. 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_HEADERandRULE_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. - Site
Id string - 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 float64 - Value of the fixed block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandfixedblock_duration_type - Block
Duration float64Max - The upper limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - Block
Duration float64Min - The lower limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - Block
Duration stringType - Block duration types:
fixed,randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by theblock_durationparameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only forRULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPaction. - Dc
Id 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.
- Error
Response stringData - The response returned when the request matches the filter and is blocked. Applies only for
RULE_ACTION_CUSTOM_ERROR_RESPONSE. - Error
Response stringFormat - 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 string - The error that triggers the rule.
error.type.alltriggers the rule regardless of the error type. Applies only forRULE_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_REDIRECTfilter 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. ForRULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER- Header value to rewrite. ForRULE_ACTION_REWRITE_COOKIE- Cookie value to rewrite. - Incap
Rule stringId - Unique identifier in the API for the Incap Rule.
- Multiple
Deletions bool - Delete multiple header occurrences. Applies only to rules using
RULE_ACTION_DELETE_HEADERandRULE_ACTION_RESPONSE_DELETE_HEADER. - Name string
- Rule name.
- Override
Waf stringAction - The action for the override rule
RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore. - Override
Waf stringRule - The setting to override
RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access. - Port
Forwarding stringContext - Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for
RULE_ACTION_FORWARD_TO_PORT. - Port
Forwarding stringValue - Port number or header name for port forwarding. Applies only for
RULE_ACTION_FORWARD_TO_PORT. - Rate
Context string - The context of the rate counter. Possible values
IPorSession. Applies only to rules usingRULE_ACTION_RATE. - Rate
Interval float64 - The interval in seconds of the rate counter. Possible values is a multiple of
10; minimum10and maximum300. Applies only to rules usingRULE_ACTION_RATE. - Response
Code float64 - For
RULE_ACTION_REDIRECTorRULE_ACTION_SIMPLIFIED_REDIRECTrule's response code, valid values are302,301,303,307,308. ForRULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODErule's response code, valid values are all 3-digits numbers. ForRULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are400,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 string - Name of cookie or header to rewrite. Applies only for
RULE_ACTION_REWRITE_COOKIE,RULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER. - Send
Notifications string - Send an email notification whenever this rule is triggered. Possible values:
true,false. Default value isfalse. 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_HEADERandRULE_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. - site
Id String - Numeric identifier of the site to operate on.
- add
Missing Boolean - Add cookie or header if it doesn't exist (Rewrite cookie rule only).
- block
Duration Double - Value of the fixed block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandfixedblock_duration_type - block
Duration DoubleMax - The upper limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - block
Duration DoubleMin - The lower limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - block
Duration StringType - Block duration types:
fixed,randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by theblock_durationparameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only forRULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPaction. - dc
Id 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.
- error
Response StringData - The response returned when the request matches the filter and is blocked. Applies only for
RULE_ACTION_CUSTOM_ERROR_RESPONSE. - error
Response StringFormat - 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 String - The error that triggers the rule.
error.type.alltriggers the rule regardless of the error type. Applies only forRULE_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_REDIRECTfilter 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. ForRULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER- Header value to rewrite. ForRULE_ACTION_REWRITE_COOKIE- Cookie value to rewrite. - incap
Rule StringId - Unique identifier in the API for the Incap Rule.
- multiple
Deletions Boolean - Delete multiple header occurrences. Applies only to rules using
RULE_ACTION_DELETE_HEADERandRULE_ACTION_RESPONSE_DELETE_HEADER. - name String
- Rule name.
- override
Waf StringAction - The action for the override rule
RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore. - override
Waf StringRule - The setting to override
RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access. - port
Forwarding StringContext - Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for
RULE_ACTION_FORWARD_TO_PORT. - port
Forwarding StringValue - Port number or header name for port forwarding. Applies only for
RULE_ACTION_FORWARD_TO_PORT. - rate
Context String - The context of the rate counter. Possible values
IPorSession. Applies only to rules usingRULE_ACTION_RATE. - rate
Interval Double - The interval in seconds of the rate counter. Possible values is a multiple of
10; minimum10and maximum300. Applies only to rules usingRULE_ACTION_RATE. - response
Code Double - For
RULE_ACTION_REDIRECTorRULE_ACTION_SIMPLIFIED_REDIRECTrule's response code, valid values are302,301,303,307,308. ForRULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODErule's response code, valid values are all 3-digits numbers. ForRULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are400,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 Boolean - Rewrite cookie or header if it exists.
- rewrite
Name String - Name of cookie or header to rewrite. Applies only for
RULE_ACTION_REWRITE_COOKIE,RULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER. - send
Notifications String - Send an email notification whenever this rule is triggered. Possible values:
true,false. Default value isfalse. 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_HEADERandRULE_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. - site
Id string - Numeric identifier of the site to operate on.
- add
Missing boolean - Add cookie or header if it doesn't exist (Rewrite cookie rule only).
- block
Duration number - Value of the fixed block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandfixedblock_duration_type - block
Duration numberMax - The upper limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - block
Duration numberMin - The lower limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - block
Duration stringType - Block duration types:
fixed,randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by theblock_durationparameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only forRULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPaction. - dc
Id 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.
- error
Response stringData - The response returned when the request matches the filter and is blocked. Applies only for
RULE_ACTION_CUSTOM_ERROR_RESPONSE. - error
Response stringFormat - 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 string - The error that triggers the rule.
error.type.alltriggers the rule regardless of the error type. Applies only forRULE_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_REDIRECTfilter 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. ForRULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER- Header value to rewrite. ForRULE_ACTION_REWRITE_COOKIE- Cookie value to rewrite. - incap
Rule stringId - Unique identifier in the API for the Incap Rule.
- multiple
Deletions boolean - Delete multiple header occurrences. Applies only to rules using
RULE_ACTION_DELETE_HEADERandRULE_ACTION_RESPONSE_DELETE_HEADER. - name string
- Rule name.
- override
Waf stringAction - The action for the override rule
RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore. - override
Waf stringRule - The setting to override
RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access. - port
Forwarding stringContext - Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for
RULE_ACTION_FORWARD_TO_PORT. - port
Forwarding stringValue - Port number or header name for port forwarding. Applies only for
RULE_ACTION_FORWARD_TO_PORT. - rate
Context string - The context of the rate counter. Possible values
IPorSession. Applies only to rules usingRULE_ACTION_RATE. - rate
Interval number - The interval in seconds of the rate counter. Possible values is a multiple of
10; minimum10and maximum300. Applies only to rules usingRULE_ACTION_RATE. - response
Code number - For
RULE_ACTION_REDIRECTorRULE_ACTION_SIMPLIFIED_REDIRECTrule's response code, valid values are302,301,303,307,308. ForRULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODErule's response code, valid values are all 3-digits numbers. ForRULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are400,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 boolean - Rewrite cookie or header if it exists.
- rewrite
Name string - Name of cookie or header to rewrite. Applies only for
RULE_ACTION_REWRITE_COOKIE,RULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER. - send
Notifications string - Send an email notification whenever this rule is triggered. Possible values:
true,false. Default value isfalse. 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_HEADERandRULE_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_USERorRULE_ACTION_BLOCK_IPactionandfixedblock_duration_type - block_
duration_ floatmax - The upper limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - block_
duration_ floatmin - The lower limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - block_
duration_ strtype - Block duration types:
fixed,randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by theblock_durationparameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only forRULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPaction. - 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_ strdata - The response returned when the request matches the filter and is blocked. Applies only for
RULE_ACTION_CUSTOM_ERROR_RESPONSE. - error_
response_ strformat - 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.alltriggers the rule regardless of the error type. Applies only forRULE_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_REDIRECTfilter 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. ForRULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER- Header value to rewrite. ForRULE_ACTION_REWRITE_COOKIE- Cookie value to rewrite. - incap_
rule_ strid - Unique identifier in the API for the Incap Rule.
- multiple_
deletions bool - Delete multiple header occurrences. Applies only to rules using
RULE_ACTION_DELETE_HEADERandRULE_ACTION_RESPONSE_DELETE_HEADER. - name str
- Rule name.
- override_
waf_ straction - The action for the override rule
RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore. - override_
waf_ strrule - The setting to override
RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access. - port_
forwarding_ strcontext - Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for
RULE_ACTION_FORWARD_TO_PORT. - port_
forwarding_ strvalue - 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
IPorSession. Applies only to rules usingRULE_ACTION_RATE. - rate_
interval float - The interval in seconds of the rate counter. Possible values is a multiple of
10; minimum10and maximum300. Applies only to rules usingRULE_ACTION_RATE. - response_
code float - For
RULE_ACTION_REDIRECTorRULE_ACTION_SIMPLIFIED_REDIRECTrule's response code, valid values are302,301,303,307,308. ForRULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODErule's response code, valid values are all 3-digits numbers. ForRULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are400,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_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER. - send_
notifications str - Send an email notification whenever this rule is triggered. Possible values:
true,false. Default value isfalse. 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_HEADERandRULE_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. - site
Id String - Numeric identifier of the site to operate on.
- add
Missing Boolean - Add cookie or header if it doesn't exist (Rewrite cookie rule only).
- block
Duration Number - Value of the fixed block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandfixedblock_duration_type - block
Duration NumberMax - The upper limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - block
Duration NumberMin - The lower limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - block
Duration StringType - Block duration types:
fixed,randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by theblock_durationparameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only forRULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPaction. - dc
Id 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.
- error
Response StringData - The response returned when the request matches the filter and is blocked. Applies only for
RULE_ACTION_CUSTOM_ERROR_RESPONSE. - error
Response StringFormat - 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 String - The error that triggers the rule.
error.type.alltriggers the rule regardless of the error type. Applies only forRULE_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_REDIRECTfilter 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. ForRULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER- Header value to rewrite. ForRULE_ACTION_REWRITE_COOKIE- Cookie value to rewrite. - incap
Rule StringId - Unique identifier in the API for the Incap Rule.
- multiple
Deletions Boolean - Delete multiple header occurrences. Applies only to rules using
RULE_ACTION_DELETE_HEADERandRULE_ACTION_RESPONSE_DELETE_HEADER. - name String
- Rule name.
- override
Waf StringAction - The action for the override rule
RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore. - override
Waf StringRule - The setting to override
RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access. - port
Forwarding StringContext - Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for
RULE_ACTION_FORWARD_TO_PORT. - port
Forwarding StringValue - Port number or header name for port forwarding. Applies only for
RULE_ACTION_FORWARD_TO_PORT. - rate
Context String - The context of the rate counter. Possible values
IPorSession. Applies only to rules usingRULE_ACTION_RATE. - rate
Interval Number - The interval in seconds of the rate counter. Possible values is a multiple of
10; minimum10and maximum300. Applies only to rules usingRULE_ACTION_RATE. - response
Code Number - For
RULE_ACTION_REDIRECTorRULE_ACTION_SIMPLIFIED_REDIRECTrule's response code, valid values are302,301,303,307,308. ForRULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODErule's response code, valid values are all 3-digits numbers. ForRULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are400,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 Boolean - Rewrite cookie or header if it exists.
- rewrite
Name String - Name of cookie or header to rewrite. Applies only for
RULE_ACTION_REWRITE_COOKIE,RULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER. - send
Notifications String - Send an email notification whenever this rule is triggered. Possible values:
true,false. Default value isfalse. 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_HEADERandRULE_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) -> IncapRulefunc 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.
- 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. - Add
Missing bool - Add cookie or header if it doesn't exist (Rewrite cookie rule only).
- Block
Duration double - Value of the fixed block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandfixedblock_duration_type - Block
Duration doubleMax - The upper limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - Block
Duration doubleMin - The lower limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - Block
Duration stringType - Block duration types:
fixed,randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by theblock_durationparameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only forRULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPaction. - Dc
Id 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.
- Error
Response stringData - The response returned when the request matches the filter and is blocked. Applies only for
RULE_ACTION_CUSTOM_ERROR_RESPONSE. - Error
Response stringFormat - 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 string - The error that triggers the rule.
error.type.alltriggers the rule regardless of the error type. Applies only forRULE_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_REDIRECTfilter 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. ForRULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER- Header value to rewrite. ForRULE_ACTION_REWRITE_COOKIE- Cookie value to rewrite. - Incap
Rule stringId - Unique identifier in the API for the Incap Rule.
- Multiple
Deletions bool - Delete multiple header occurrences. Applies only to rules using
RULE_ACTION_DELETE_HEADERandRULE_ACTION_RESPONSE_DELETE_HEADER. - Name string
- Rule name.
- Override
Waf stringAction - The action for the override rule
RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore. - Override
Waf stringRule - The setting to override
RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access. - Port
Forwarding stringContext - Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for
RULE_ACTION_FORWARD_TO_PORT. - Port
Forwarding stringValue - Port number or header name for port forwarding. Applies only for
RULE_ACTION_FORWARD_TO_PORT. - Rate
Context string - The context of the rate counter. Possible values
IPorSession. Applies only to rules usingRULE_ACTION_RATE. - Rate
Interval double - The interval in seconds of the rate counter. Possible values is a multiple of
10; minimum10and maximum300. Applies only to rules usingRULE_ACTION_RATE. - Response
Code double - For
RULE_ACTION_REDIRECTorRULE_ACTION_SIMPLIFIED_REDIRECTrule's response code, valid values are302,301,303,307,308. ForRULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODErule's response code, valid values are all 3-digits numbers. ForRULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are400,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 string - Name of cookie or header to rewrite. Applies only for
RULE_ACTION_REWRITE_COOKIE,RULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER. - Send
Notifications string - Send an email notification whenever this rule is triggered. Possible values:
true,false. Default value isfalse. 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 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_HEADERandRULE_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. - Add
Missing bool - Add cookie or header if it doesn't exist (Rewrite cookie rule only).
- Block
Duration float64 - Value of the fixed block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandfixedblock_duration_type - Block
Duration float64Max - The upper limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - Block
Duration float64Min - The lower limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - Block
Duration stringType - Block duration types:
fixed,randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by theblock_durationparameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only forRULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPaction. - Dc
Id 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.
- Error
Response stringData - The response returned when the request matches the filter and is blocked. Applies only for
RULE_ACTION_CUSTOM_ERROR_RESPONSE. - Error
Response stringFormat - 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 string - The error that triggers the rule.
error.type.alltriggers the rule regardless of the error type. Applies only forRULE_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_REDIRECTfilter 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. ForRULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER- Header value to rewrite. ForRULE_ACTION_REWRITE_COOKIE- Cookie value to rewrite. - Incap
Rule stringId - Unique identifier in the API for the Incap Rule.
- Multiple
Deletions bool - Delete multiple header occurrences. Applies only to rules using
RULE_ACTION_DELETE_HEADERandRULE_ACTION_RESPONSE_DELETE_HEADER. - Name string
- Rule name.
- Override
Waf stringAction - The action for the override rule
RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore. - Override
Waf stringRule - The setting to override
RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access. - Port
Forwarding stringContext - Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for
RULE_ACTION_FORWARD_TO_PORT. - Port
Forwarding stringValue - Port number or header name for port forwarding. Applies only for
RULE_ACTION_FORWARD_TO_PORT. - Rate
Context string - The context of the rate counter. Possible values
IPorSession. Applies only to rules usingRULE_ACTION_RATE. - Rate
Interval float64 - The interval in seconds of the rate counter. Possible values is a multiple of
10; minimum10and maximum300. Applies only to rules usingRULE_ACTION_RATE. - Response
Code float64 - For
RULE_ACTION_REDIRECTorRULE_ACTION_SIMPLIFIED_REDIRECTrule's response code, valid values are302,301,303,307,308. ForRULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODErule's response code, valid values are all 3-digits numbers. ForRULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are400,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 string - Name of cookie or header to rewrite. Applies only for
RULE_ACTION_REWRITE_COOKIE,RULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER. - Send
Notifications string - Send an email notification whenever this rule is triggered. Possible values:
true,false. Default value isfalse. 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 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_HEADERandRULE_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. - add
Missing Boolean - Add cookie or header if it doesn't exist (Rewrite cookie rule only).
- block
Duration Double - Value of the fixed block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandfixedblock_duration_type - block
Duration DoubleMax - The upper limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - block
Duration DoubleMin - The lower limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - block
Duration StringType - Block duration types:
fixed,randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by theblock_durationparameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only forRULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPaction. - dc
Id 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.
- error
Response StringData - The response returned when the request matches the filter and is blocked. Applies only for
RULE_ACTION_CUSTOM_ERROR_RESPONSE. - error
Response StringFormat - 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 String - The error that triggers the rule.
error.type.alltriggers the rule regardless of the error type. Applies only forRULE_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_REDIRECTfilter 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. ForRULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER- Header value to rewrite. ForRULE_ACTION_REWRITE_COOKIE- Cookie value to rewrite. - incap
Rule StringId - Unique identifier in the API for the Incap Rule.
- multiple
Deletions Boolean - Delete multiple header occurrences. Applies only to rules using
RULE_ACTION_DELETE_HEADERandRULE_ACTION_RESPONSE_DELETE_HEADER. - name String
- Rule name.
- override
Waf StringAction - The action for the override rule
RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore. - override
Waf StringRule - The setting to override
RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access. - port
Forwarding StringContext - Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for
RULE_ACTION_FORWARD_TO_PORT. - port
Forwarding StringValue - Port number or header name for port forwarding. Applies only for
RULE_ACTION_FORWARD_TO_PORT. - rate
Context String - The context of the rate counter. Possible values
IPorSession. Applies only to rules usingRULE_ACTION_RATE. - rate
Interval Double - The interval in seconds of the rate counter. Possible values is a multiple of
10; minimum10and maximum300. Applies only to rules usingRULE_ACTION_RATE. - response
Code Double - For
RULE_ACTION_REDIRECTorRULE_ACTION_SIMPLIFIED_REDIRECTrule's response code, valid values are302,301,303,307,308. ForRULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODErule's response code, valid values are all 3-digits numbers. ForRULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are400,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 Boolean - Rewrite cookie or header if it exists.
- rewrite
Name String - Name of cookie or header to rewrite. Applies only for
RULE_ACTION_REWRITE_COOKIE,RULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER. - send
Notifications String - Send an email notification whenever this rule is triggered. Possible values:
true,false. Default value isfalse. 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 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_HEADERandRULE_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. - add
Missing boolean - Add cookie or header if it doesn't exist (Rewrite cookie rule only).
- block
Duration number - Value of the fixed block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandfixedblock_duration_type - block
Duration numberMax - The upper limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - block
Duration numberMin - The lower limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - block
Duration stringType - Block duration types:
fixed,randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by theblock_durationparameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only forRULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPaction. - dc
Id 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.
- error
Response stringData - The response returned when the request matches the filter and is blocked. Applies only for
RULE_ACTION_CUSTOM_ERROR_RESPONSE. - error
Response stringFormat - 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 string - The error that triggers the rule.
error.type.alltriggers the rule regardless of the error type. Applies only forRULE_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_REDIRECTfilter 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. ForRULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER- Header value to rewrite. ForRULE_ACTION_REWRITE_COOKIE- Cookie value to rewrite. - incap
Rule stringId - Unique identifier in the API for the Incap Rule.
- multiple
Deletions boolean - Delete multiple header occurrences. Applies only to rules using
RULE_ACTION_DELETE_HEADERandRULE_ACTION_RESPONSE_DELETE_HEADER. - name string
- Rule name.
- override
Waf stringAction - The action for the override rule
RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore. - override
Waf stringRule - The setting to override
RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access. - port
Forwarding stringContext - Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for
RULE_ACTION_FORWARD_TO_PORT. - port
Forwarding stringValue - Port number or header name for port forwarding. Applies only for
RULE_ACTION_FORWARD_TO_PORT. - rate
Context string - The context of the rate counter. Possible values
IPorSession. Applies only to rules usingRULE_ACTION_RATE. - rate
Interval number - The interval in seconds of the rate counter. Possible values is a multiple of
10; minimum10and maximum300. Applies only to rules usingRULE_ACTION_RATE. - response
Code number - For
RULE_ACTION_REDIRECTorRULE_ACTION_SIMPLIFIED_REDIRECTrule's response code, valid values are302,301,303,307,308. ForRULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODErule's response code, valid values are all 3-digits numbers. ForRULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are400,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 boolean - Rewrite cookie or header if it exists.
- rewrite
Name string - Name of cookie or header to rewrite. Applies only for
RULE_ACTION_REWRITE_COOKIE,RULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER. - send
Notifications string - Send an email notification whenever this rule is triggered. Possible values:
true,false. Default value isfalse. 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 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_HEADERandRULE_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_USERorRULE_ACTION_BLOCK_IPactionandfixedblock_duration_type - block_
duration_ floatmax - The upper limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - block_
duration_ floatmin - The lower limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - block_
duration_ strtype - Block duration types:
fixed,randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by theblock_durationparameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only forRULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPaction. - 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_ strdata - The response returned when the request matches the filter and is blocked. Applies only for
RULE_ACTION_CUSTOM_ERROR_RESPONSE. - error_
response_ strformat - 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.alltriggers the rule regardless of the error type. Applies only forRULE_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_REDIRECTfilter 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. ForRULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER- Header value to rewrite. ForRULE_ACTION_REWRITE_COOKIE- Cookie value to rewrite. - incap_
rule_ strid - Unique identifier in the API for the Incap Rule.
- multiple_
deletions bool - Delete multiple header occurrences. Applies only to rules using
RULE_ACTION_DELETE_HEADERandRULE_ACTION_RESPONSE_DELETE_HEADER. - name str
- Rule name.
- override_
waf_ straction - The action for the override rule
RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore. - override_
waf_ strrule - The setting to override
RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access. - port_
forwarding_ strcontext - Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for
RULE_ACTION_FORWARD_TO_PORT. - port_
forwarding_ strvalue - 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
IPorSession. Applies only to rules usingRULE_ACTION_RATE. - rate_
interval float - The interval in seconds of the rate counter. Possible values is a multiple of
10; minimum10and maximum300. Applies only to rules usingRULE_ACTION_RATE. - response_
code float - For
RULE_ACTION_REDIRECTorRULE_ACTION_SIMPLIFIED_REDIRECTrule's response code, valid values are302,301,303,307,308. ForRULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODErule's response code, valid values are all 3-digits numbers. ForRULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are400,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_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER. - send_
notifications str - Send an email notification whenever this rule is triggered. Possible values:
true,false. Default value isfalse. 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_HEADERandRULE_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. - add
Missing Boolean - Add cookie or header if it doesn't exist (Rewrite cookie rule only).
- block
Duration Number - Value of the fixed block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandfixedblock_duration_type - block
Duration NumberMax - The upper limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - block
Duration NumberMin - The lower limit for the randomized block duration. Valid only for
RULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPactionandrandomizedblock_duration_type - block
Duration StringType - Block duration types:
fixed,randomized. Time range: 1-1440 minutes.The Fixed type blocks the IP address or session for the duration specified by theblock_durationparameter. The Randomized type generates a random duration for each block between the specified minimum and maximum values. Valid only forRULE_ACTION_BLOCK_USERorRULE_ACTION_BLOCK_IPaction. - dc
Id 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.
- error
Response StringData - The response returned when the request matches the filter and is blocked. Applies only for
RULE_ACTION_CUSTOM_ERROR_RESPONSE. - error
Response StringFormat - 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 String - The error that triggers the rule.
error.type.alltriggers the rule regardless of the error type. Applies only forRULE_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_REDIRECTfilter 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. ForRULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER- Header value to rewrite. ForRULE_ACTION_REWRITE_COOKIE- Cookie value to rewrite. - incap
Rule StringId - Unique identifier in the API for the Incap Rule.
- multiple
Deletions Boolean - Delete multiple header occurrences. Applies only to rules using
RULE_ACTION_DELETE_HEADERandRULE_ACTION_RESPONSE_DELETE_HEADER. - name String
- Rule name.
- override
Waf StringAction - The action for the override rule
RULE_ACTION_WAF_OVERRIDE. Possible values: Alert Only, Block Request, Block User, Block IP, Ignore. - override
Waf StringRule - The setting to override
RULE_ACTION_WAF_OVERRIDE. Possible values: SQL Injection, Remote File Inclusion, Cross Site Scripting, Illegal Resource Access. - port
Forwarding StringContext - Context for port forwarding. "Use Port Value" or "Use Header Name". Applies only for
RULE_ACTION_FORWARD_TO_PORT. - port
Forwarding StringValue - Port number or header name for port forwarding. Applies only for
RULE_ACTION_FORWARD_TO_PORT. - rate
Context String - The context of the rate counter. Possible values
IPorSession. Applies only to rules usingRULE_ACTION_RATE. - rate
Interval Number - The interval in seconds of the rate counter. Possible values is a multiple of
10; minimum10and maximum300. Applies only to rules usingRULE_ACTION_RATE. - response
Code Number - For
RULE_ACTION_REDIRECTorRULE_ACTION_SIMPLIFIED_REDIRECTrule's response code, valid values are302,301,303,307,308. ForRULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODErule's response code, valid values are all 3-digits numbers. ForRULE_ACTION_CUSTOM_ERROR_RESPONSE, valid values are400,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 Boolean - Rewrite cookie or header if it exists.
- rewrite
Name String - Name of cookie or header to rewrite. Applies only for
RULE_ACTION_REWRITE_COOKIE,RULE_ACTION_REWRITE_HEADERandRULE_ACTION_RESPONSE_REWRITE_HEADER. - send
Notifications String - Send an email notification whenever this rule is triggered. Possible values:
true,false. Default value isfalse. 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 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_HEADERandRULE_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
incapsulaTerraform Provider.
