Struct aws_sdk_waf::types::builders::RuleBuilder
source · #[non_exhaustive]pub struct RuleBuilder { /* private fields */ }Expand description
A builder for Rule.
Implementations§
source§impl RuleBuilder
impl RuleBuilder
sourcepub fn rule_id(self, input: impl Into<String>) -> Self
pub fn rule_id(self, input: impl Into<String>) -> Self
A unique identifier for a Rule. You use RuleId to get more information about a Rule (see GetRule), update a Rule (see UpdateRule), insert a Rule into a WebACL or delete a one from a WebACL (see UpdateWebACL), or delete a Rule from AWS WAF (see DeleteRule).
RuleId is returned by CreateRule and by ListRules.
sourcepub fn set_rule_id(self, input: Option<String>) -> Self
pub fn set_rule_id(self, input: Option<String>) -> Self
A unique identifier for a Rule. You use RuleId to get more information about a Rule (see GetRule), update a Rule (see UpdateRule), insert a Rule into a WebACL or delete a one from a WebACL (see UpdateWebACL), or delete a Rule from AWS WAF (see DeleteRule).
RuleId is returned by CreateRule and by ListRules.
sourcepub fn get_rule_id(&self) -> &Option<String>
pub fn get_rule_id(&self) -> &Option<String>
A unique identifier for a Rule. You use RuleId to get more information about a Rule (see GetRule), update a Rule (see UpdateRule), insert a Rule into a WebACL or delete a one from a WebACL (see UpdateWebACL), or delete a Rule from AWS WAF (see DeleteRule).
RuleId is returned by CreateRule and by ListRules.
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
The friendly name or description for the Rule. You can't change the name of a Rule after you create it.
sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
The friendly name or description for the Rule. You can't change the name of a Rule after you create it.
sourcepub fn get_name(&self) -> &Option<String>
pub fn get_name(&self) -> &Option<String>
The friendly name or description for the Rule. You can't change the name of a Rule after you create it.
sourcepub fn metric_name(self, input: impl Into<String>) -> Self
pub fn metric_name(self, input: impl Into<String>) -> Self
A friendly name or description for the metrics for this Rule. The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change MetricName after you create the Rule.
sourcepub fn set_metric_name(self, input: Option<String>) -> Self
pub fn set_metric_name(self, input: Option<String>) -> Self
A friendly name or description for the metrics for this Rule. The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change MetricName after you create the Rule.
sourcepub fn get_metric_name(&self) -> &Option<String>
pub fn get_metric_name(&self) -> &Option<String>
A friendly name or description for the metrics for this Rule. The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change MetricName after you create the Rule.
sourcepub fn predicates(self, input: Predicate) -> Self
pub fn predicates(self, input: Predicate) -> Self
Appends an item to predicates.
To override the contents of this collection use set_predicates.
The Predicates object contains one Predicate element for each ByteMatchSet, IPSet, or SqlInjectionMatchSet object that you want to include in a Rule.
sourcepub fn set_predicates(self, input: Option<Vec<Predicate>>) -> Self
pub fn set_predicates(self, input: Option<Vec<Predicate>>) -> Self
The Predicates object contains one Predicate element for each ByteMatchSet, IPSet, or SqlInjectionMatchSet object that you want to include in a Rule.
sourcepub fn get_predicates(&self) -> &Option<Vec<Predicate>>
pub fn get_predicates(&self) -> &Option<Vec<Predicate>>
The Predicates object contains one Predicate element for each ByteMatchSet, IPSet, or SqlInjectionMatchSet object that you want to include in a Rule.
Trait Implementations§
source§impl Clone for RuleBuilder
impl Clone for RuleBuilder
source§fn clone(&self) -> RuleBuilder
fn clone(&self) -> RuleBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for RuleBuilder
impl Debug for RuleBuilder
source§impl Default for RuleBuilder
impl Default for RuleBuilder
source§fn default() -> RuleBuilder
fn default() -> RuleBuilder
source§impl PartialEq for RuleBuilder
impl PartialEq for RuleBuilder
impl StructuralPartialEq for RuleBuilder
Auto Trait Implementations§
impl Freeze for RuleBuilder
impl RefUnwindSafe for RuleBuilder
impl Send for RuleBuilder
impl Sync for RuleBuilder
impl Unpin for RuleBuilder
impl UnwindSafe for RuleBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more