pulumi_wasm_providers_gcp_mini::compute::security_policy_rule

Struct SecurityPolicyRuleArgsBuilder

source
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>

source

pub fn build_struct(self) -> SecurityPolicyRuleArgs
where S: IsComplete,

Finish building and return the requested object

source

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.
source

pub fn description( self, value: impl Into<Output<Option<String>>>, ) -> SecurityPolicyRuleArgsBuilder<SetDescription<S>>
where S::Description: IsUnset,

Optional (Some / Option setters). Default: <pulumi_wasm_rust::Output<Option<String>> as Default>::default().

An optional description of this resource. Provide this property when you create the resource.

source

pub fn maybe_description( self, value: Option<impl Into<Output<Option<String>>>>, ) -> SecurityPolicyRuleArgsBuilder<SetDescription<S>>
where S::Description: IsUnset,

Optional (Some / Option setters). Default: <pulumi_wasm_rust::Output<Option<String>> as Default>::default().

An optional description of this resource. Provide this property when you create the resource.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

pub fn preview( self, value: impl Into<Output<Option<bool>>>, ) -> SecurityPolicyRuleArgsBuilder<SetPreview<S>>
where S::Preview: IsUnset,

Optional (Some / Option setters). Default: <pulumi_wasm_rust::Output<Option<bool>> as Default>::default().

If set to true, the specified action is not enforced.

source

pub fn maybe_preview( self, value: Option<impl Into<Output<Option<bool>>>>, ) -> SecurityPolicyRuleArgsBuilder<SetPreview<S>>
where S::Preview: IsUnset,

Optional (Some / Option setters). Default: <pulumi_wasm_rust::Output<Option<bool>> as Default>::default().

If set to true, the specified action is not enforced.

source

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.

source

pub fn project( self, value: impl Into<Output<Option<String>>>, ) -> SecurityPolicyRuleArgsBuilder<SetProject<S>>
where S::Project: IsUnset,

Optional (Some / Option setters). Default: <pulumi_wasm_rust::Output<Option<String>> as Default>::default().

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

source

pub fn maybe_project( self, value: Option<impl Into<Output<Option<String>>>>, ) -> SecurityPolicyRuleArgsBuilder<SetProject<S>>
where S::Project: IsUnset,

Optional (Some / Option setters). Default: <pulumi_wasm_rust::Output<Option<String>> as Default>::default().

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

source

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.

source

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.

source

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.

source

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.

source

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.


Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.