pub struct SecurityPolicyRuleArgsBuilder<S: State = Empty> { /* private fields */ }
Expand description
Use builder syntax to set the inputs and finish with build_struct()
.
Implementations§
source§impl<S: State> SecurityPolicyRuleArgsBuilder<S>
impl<S: State> SecurityPolicyRuleArgsBuilder<S>
sourcepub fn build_struct(self) -> SecurityPolicyRuleArgswhere
S: IsComplete,
pub fn build_struct(self) -> SecurityPolicyRuleArgswhere
S: IsComplete,
Finish building and return the requested object
sourcepub fn action(
self,
value: impl Into<Output<String>>,
) -> SecurityPolicyRuleArgsBuilder<SetAction<S>>where
S::Action: IsUnset,
pub fn action(
self,
value: impl Into<Output<String>>,
) -> SecurityPolicyRuleArgsBuilder<SetAction<S>>where
S::Action: IsUnset,
Required.
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.
sourcepub fn description(
self,
value: impl Into<Output<Option<String>>>,
) -> SecurityPolicyRuleArgsBuilder<SetDescription<S>>where
S::Description: IsUnset,
pub fn description(
self,
value: impl Into<Output<Option<String>>>,
) -> SecurityPolicyRuleArgsBuilder<SetDescription<S>>where
S::Description: IsUnset,
sourcepub fn maybe_description(
self,
value: Option<impl Into<Output<Option<String>>>>,
) -> SecurityPolicyRuleArgsBuilder<SetDescription<S>>where
S::Description: IsUnset,
pub fn maybe_description(
self,
value: Option<impl Into<Output<Option<String>>>>,
) -> SecurityPolicyRuleArgsBuilder<SetDescription<S>>where
S::Description: IsUnset,
sourcepub fn header_action(
self,
value: impl Into<Output<Option<SecurityPolicyRuleHeaderAction>>>,
) -> SecurityPolicyRuleArgsBuilder<SetHeaderAction<S>>where
S::HeaderAction: IsUnset,
pub fn header_action(
self,
value: impl Into<Output<Option<SecurityPolicyRuleHeaderAction>>>,
) -> SecurityPolicyRuleArgsBuilder<SetHeaderAction<S>>where
S::HeaderAction: IsUnset,
Optional (Some / Option setters). Default:
<pulumi_wasm_rust::Output<
Option<super::super::types::compute::SecurityPolicyRuleHeaderAction>,
> as Default>::default()
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.
sourcepub fn maybe_header_action(
self,
value: Option<impl Into<Output<Option<SecurityPolicyRuleHeaderAction>>>>,
) -> SecurityPolicyRuleArgsBuilder<SetHeaderAction<S>>where
S::HeaderAction: IsUnset,
pub fn maybe_header_action(
self,
value: Option<impl Into<Output<Option<SecurityPolicyRuleHeaderAction>>>>,
) -> SecurityPolicyRuleArgsBuilder<SetHeaderAction<S>>where
S::HeaderAction: IsUnset,
Optional (Some / Option setters). Default:
<pulumi_wasm_rust::Output<
Option<super::super::types::compute::SecurityPolicyRuleHeaderAction>,
> as Default>::default()
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.
sourcepub fn match_(
self,
value: impl Into<Output<Option<SecurityPolicyRuleMatch>>>,
) -> SecurityPolicyRuleArgsBuilder<SetMatch<S>>where
S::Match: IsUnset,
pub fn match_(
self,
value: impl Into<Output<Option<SecurityPolicyRuleMatch>>>,
) -> SecurityPolicyRuleArgsBuilder<SetMatch<S>>where
S::Match: IsUnset,
Optional (Some / Option setters). Default:
<pulumi_wasm_rust::Output<
Option<super::super::types::compute::SecurityPolicyRuleMatch>,
> as Default>::default()
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding ‘action’ is enforced. Structure is documented below.
sourcepub fn maybe_match_(
self,
value: Option<impl Into<Output<Option<SecurityPolicyRuleMatch>>>>,
) -> SecurityPolicyRuleArgsBuilder<SetMatch<S>>where
S::Match: IsUnset,
pub fn maybe_match_(
self,
value: Option<impl Into<Output<Option<SecurityPolicyRuleMatch>>>>,
) -> SecurityPolicyRuleArgsBuilder<SetMatch<S>>where
S::Match: IsUnset,
Optional (Some / Option setters). Default:
<pulumi_wasm_rust::Output<
Option<super::super::types::compute::SecurityPolicyRuleMatch>,
> as Default>::default()
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding ‘action’ is enforced. Structure is documented below.
sourcepub fn preconfigured_waf_config(
self,
value: impl Into<Output<Option<SecurityPolicyRulePreconfiguredWafConfig>>>,
) -> SecurityPolicyRuleArgsBuilder<SetPreconfiguredWafConfig<S>>where
S::PreconfiguredWafConfig: IsUnset,
pub fn preconfigured_waf_config(
self,
value: impl Into<Output<Option<SecurityPolicyRulePreconfiguredWafConfig>>>,
) -> SecurityPolicyRuleArgsBuilder<SetPreconfiguredWafConfig<S>>where
S::PreconfiguredWafConfig: IsUnset,
Optional (Some / Option setters). Default:
<pulumi_wasm_rust::Output<
Option<super::super::types::compute::SecurityPolicyRulePreconfiguredWafConfig>,
> as Default>::default()
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.
sourcepub fn maybe_preconfigured_waf_config(
self,
value: Option<impl Into<Output<Option<SecurityPolicyRulePreconfiguredWafConfig>>>>,
) -> SecurityPolicyRuleArgsBuilder<SetPreconfiguredWafConfig<S>>where
S::PreconfiguredWafConfig: IsUnset,
pub fn maybe_preconfigured_waf_config(
self,
value: Option<impl Into<Output<Option<SecurityPolicyRulePreconfiguredWafConfig>>>>,
) -> SecurityPolicyRuleArgsBuilder<SetPreconfiguredWafConfig<S>>where
S::PreconfiguredWafConfig: IsUnset,
Optional (Some / Option setters). Default:
<pulumi_wasm_rust::Output<
Option<super::super::types::compute::SecurityPolicyRulePreconfiguredWafConfig>,
> as Default>::default()
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.
sourcepub fn preview(
self,
value: impl Into<Output<Option<bool>>>,
) -> SecurityPolicyRuleArgsBuilder<SetPreview<S>>where
S::Preview: IsUnset,
pub fn preview(
self,
value: impl Into<Output<Option<bool>>>,
) -> SecurityPolicyRuleArgsBuilder<SetPreview<S>>where
S::Preview: IsUnset,
sourcepub fn maybe_preview(
self,
value: Option<impl Into<Output<Option<bool>>>>,
) -> SecurityPolicyRuleArgsBuilder<SetPreview<S>>where
S::Preview: IsUnset,
pub fn maybe_preview(
self,
value: Option<impl Into<Output<Option<bool>>>>,
) -> SecurityPolicyRuleArgsBuilder<SetPreview<S>>where
S::Preview: IsUnset,
sourcepub fn priority(
self,
value: impl Into<Output<i32>>,
) -> SecurityPolicyRuleArgsBuilder<SetPriority<S>>where
S::Priority: IsUnset,
pub fn priority(
self,
value: impl Into<Output<i32>>,
) -> SecurityPolicyRuleArgsBuilder<SetPriority<S>>where
S::Priority: IsUnset,
Required.
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.
sourcepub fn project(
self,
value: impl Into<Output<Option<String>>>,
) -> SecurityPolicyRuleArgsBuilder<SetProject<S>>where
S::Project: IsUnset,
pub fn project(
self,
value: impl Into<Output<Option<String>>>,
) -> SecurityPolicyRuleArgsBuilder<SetProject<S>>where
S::Project: IsUnset,
sourcepub fn maybe_project(
self,
value: Option<impl Into<Output<Option<String>>>>,
) -> SecurityPolicyRuleArgsBuilder<SetProject<S>>where
S::Project: IsUnset,
pub fn maybe_project(
self,
value: Option<impl Into<Output<Option<String>>>>,
) -> SecurityPolicyRuleArgsBuilder<SetProject<S>>where
S::Project: IsUnset,
sourcepub fn rate_limit_options(
self,
value: impl Into<Output<Option<SecurityPolicyRuleRateLimitOptions>>>,
) -> SecurityPolicyRuleArgsBuilder<SetRateLimitOptions<S>>where
S::RateLimitOptions: IsUnset,
pub fn rate_limit_options(
self,
value: impl Into<Output<Option<SecurityPolicyRuleRateLimitOptions>>>,
) -> SecurityPolicyRuleArgsBuilder<SetRateLimitOptions<S>>where
S::RateLimitOptions: IsUnset,
Optional (Some / Option setters). Default:
<pulumi_wasm_rust::Output<
Option<super::super::types::compute::SecurityPolicyRuleRateLimitOptions>,
> as Default>::default()
Must be specified if the action is “rate_based_ban” or “throttle”. Cannot be specified for any other actions. Structure is documented below.
sourcepub fn maybe_rate_limit_options(
self,
value: Option<impl Into<Output<Option<SecurityPolicyRuleRateLimitOptions>>>>,
) -> SecurityPolicyRuleArgsBuilder<SetRateLimitOptions<S>>where
S::RateLimitOptions: IsUnset,
pub fn maybe_rate_limit_options(
self,
value: Option<impl Into<Output<Option<SecurityPolicyRuleRateLimitOptions>>>>,
) -> SecurityPolicyRuleArgsBuilder<SetRateLimitOptions<S>>where
S::RateLimitOptions: IsUnset,
Optional (Some / Option setters). Default:
<pulumi_wasm_rust::Output<
Option<super::super::types::compute::SecurityPolicyRuleRateLimitOptions>,
> as Default>::default()
Must be specified if the action is “rate_based_ban” or “throttle”. Cannot be specified for any other actions. Structure is documented below.
sourcepub fn redirect_options(
self,
value: impl Into<Output<Option<SecurityPolicyRuleRedirectOptions>>>,
) -> SecurityPolicyRuleArgsBuilder<SetRedirectOptions<S>>where
S::RedirectOptions: IsUnset,
pub fn redirect_options(
self,
value: impl Into<Output<Option<SecurityPolicyRuleRedirectOptions>>>,
) -> SecurityPolicyRuleArgsBuilder<SetRedirectOptions<S>>where
S::RedirectOptions: IsUnset,
Optional (Some / Option setters). Default:
<pulumi_wasm_rust::Output<
Option<super::super::types::compute::SecurityPolicyRuleRedirectOptions>,
> as Default>::default()
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.
sourcepub fn maybe_redirect_options(
self,
value: Option<impl Into<Output<Option<SecurityPolicyRuleRedirectOptions>>>>,
) -> SecurityPolicyRuleArgsBuilder<SetRedirectOptions<S>>where
S::RedirectOptions: IsUnset,
pub fn maybe_redirect_options(
self,
value: Option<impl Into<Output<Option<SecurityPolicyRuleRedirectOptions>>>>,
) -> SecurityPolicyRuleArgsBuilder<SetRedirectOptions<S>>where
S::RedirectOptions: IsUnset,
Optional (Some / Option setters). Default:
<pulumi_wasm_rust::Output<
Option<super::super::types::compute::SecurityPolicyRuleRedirectOptions>,
> as Default>::default()
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.
sourcepub fn security_policy(
self,
value: impl Into<Output<String>>,
) -> SecurityPolicyRuleArgsBuilder<SetSecurityPolicy<S>>where
S::SecurityPolicy: IsUnset,
pub fn security_policy(
self,
value: impl Into<Output<String>>,
) -> SecurityPolicyRuleArgsBuilder<SetSecurityPolicy<S>>where
S::SecurityPolicy: IsUnset,
Required.
The name of the security policy this rule belongs to.