pub struct SecurityPolicyRuleResult {
pub action: Output<String>,
pub description: Output<Option<String>>,
pub header_action: Output<Option<SecurityPolicyRuleHeaderAction>>,
pub match_: Output<Option<SecurityPolicyRuleMatch>>,
pub preconfigured_waf_config: Output<Option<SecurityPolicyRulePreconfiguredWafConfig>>,
pub preview: Output<Option<bool>>,
pub priority: Output<i32>,
pub project: Output<String>,
pub rate_limit_options: Output<Option<SecurityPolicyRuleRateLimitOptions>>,
pub redirect_options: Output<Option<SecurityPolicyRuleRedirectOptions>>,
pub security_policy: Output<String>,
}
Fields§
§action: Output<String>
The Action to perform when the rule is matched. The following are the valid actions:
- allow: allow access to target.
- deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502.
- rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set.
- redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR.
- throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this.
description: Output<Option<String>>
An optional description of this resource. Provide this property when you create the resource.
header_action: Output<Option<SecurityPolicyRuleHeaderAction>>
Optional, additional actions that are performed on headers. This field is only supported in Global Security Policies of type CLOUD_ARMOR. Structure is documented below.
match_: Output<Option<SecurityPolicyRuleMatch>>
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding ‘action’ is enforced. Structure is documented below.
preconfigured_waf_config: Output<Option<SecurityPolicyRulePreconfiguredWafConfig>>
Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect. Structure is documented below.
preview: Output<Option<bool>>
If set to true, the specified action is not enforced.
priority: Output<i32>
An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
project: Output<String>
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
rate_limit_options: Output<Option<SecurityPolicyRuleRateLimitOptions>>
Must be specified if the action is “rate_based_ban” or “throttle”. Cannot be specified for any other actions. Structure is documented below.
redirect_options: Output<Option<SecurityPolicyRuleRedirectOptions>>
Parameters defining the redirect action. Cannot be specified for any other actions. This field is only supported in Global Security Policies of type CLOUD_ARMOR. Structure is documented below.
security_policy: Output<String>
The name of the security policy this rule belongs to.