Struct aws_sdk_wafv2::types::SampledHttpRequest
source · #[non_exhaustive]pub struct SampledHttpRequest {
pub request: Option<HttpRequest>,
pub weight: i64,
pub timestamp: Option<DateTime>,
pub action: Option<String>,
pub rule_name_within_rule_group: Option<String>,
pub request_headers_inserted: Option<Vec<HttpHeader>>,
pub response_code_sent: Option<i32>,
pub labels: Option<Vec<Label>>,
pub captcha_response: Option<CaptchaResponse>,
pub challenge_response: Option<ChallengeResponse>,
pub overridden_action: Option<String>,
}
Expand description
Represents a single sampled web request. The response from GetSampledRequests
includes a SampledHTTPRequests
complex type that appears as SampledRequests
in the response syntax. SampledHTTPRequests
contains an array of SampledHTTPRequest
objects.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.request: Option<HttpRequest>
A complex type that contains detailed information about the request.
weight: i64
A value that indicates how one result in the response relates proportionally to other results in the response. For example, a result that has a weight of 2
represents roughly twice as many web requests as a result that has a weight of 1
.
timestamp: Option<DateTime>
The time at which WAF received the request from your Amazon Web Services resource, in Unix time format (in seconds).
action: Option<String>
The action that WAF applied to the request.
rule_name_within_rule_group: Option<String>
The name of the Rule
that the request matched. For managed rule groups, the format for this name is
. For your own rule groups, the format for this name is
. If the rule is not in a rule group, this field is absent.
request_headers_inserted: Option<Vec<HttpHeader>>
Custom request headers inserted by WAF into the request, according to the custom request configuration for the matching rule action.
response_code_sent: Option<i32>
The response code that was sent for the request.
labels: Option<Vec<Label>>
Labels applied to the web request by matching rules. WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.
For example, awswaf:111122223333:myRuleGroup:testRules:testNS1:testNS2:labelNameA
or awswaf:managed:aws:managed-rule-set:header:encoding:utf8
.
captcha_response: Option<CaptchaResponse>
The CAPTCHA
response for the request.
challenge_response: Option<ChallengeResponse>
The Challenge
response for the request.
overridden_action: Option<String>
Used only for rule group rules that have a rule action override in place in the web ACL. This is the action that the rule group rule is configured for, and not the action that was applied to the request. The action that WAF applied is the Action
value.
Implementations§
source§impl SampledHttpRequest
impl SampledHttpRequest
sourcepub fn request(&self) -> Option<&HttpRequest>
pub fn request(&self) -> Option<&HttpRequest>
A complex type that contains detailed information about the request.
sourcepub fn weight(&self) -> i64
pub fn weight(&self) -> i64
A value that indicates how one result in the response relates proportionally to other results in the response. For example, a result that has a weight of 2
represents roughly twice as many web requests as a result that has a weight of 1
.
sourcepub fn timestamp(&self) -> Option<&DateTime>
pub fn timestamp(&self) -> Option<&DateTime>
The time at which WAF received the request from your Amazon Web Services resource, in Unix time format (in seconds).
sourcepub fn rule_name_within_rule_group(&self) -> Option<&str>
pub fn rule_name_within_rule_group(&self) -> Option<&str>
The name of the Rule
that the request matched. For managed rule groups, the format for this name is
. For your own rule groups, the format for this name is
. If the rule is not in a rule group, this field is absent.
sourcepub fn request_headers_inserted(&self) -> &[HttpHeader]
pub fn request_headers_inserted(&self) -> &[HttpHeader]
Custom request headers inserted by WAF into the request, according to the custom request configuration for the matching rule action.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .request_headers_inserted.is_none()
.
sourcepub fn response_code_sent(&self) -> Option<i32>
pub fn response_code_sent(&self) -> Option<i32>
The response code that was sent for the request.
sourcepub fn labels(&self) -> &[Label]
pub fn labels(&self) -> &[Label]
Labels applied to the web request by matching rules. WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.
For example, awswaf:111122223333:myRuleGroup:testRules:testNS1:testNS2:labelNameA
or awswaf:managed:aws:managed-rule-set:header:encoding:utf8
.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .labels.is_none()
.
sourcepub fn captcha_response(&self) -> Option<&CaptchaResponse>
pub fn captcha_response(&self) -> Option<&CaptchaResponse>
The CAPTCHA
response for the request.
sourcepub fn challenge_response(&self) -> Option<&ChallengeResponse>
pub fn challenge_response(&self) -> Option<&ChallengeResponse>
The Challenge
response for the request.
sourcepub fn overridden_action(&self) -> Option<&str>
pub fn overridden_action(&self) -> Option<&str>
Used only for rule group rules that have a rule action override in place in the web ACL. This is the action that the rule group rule is configured for, and not the action that was applied to the request. The action that WAF applied is the Action
value.
source§impl SampledHttpRequest
impl SampledHttpRequest
sourcepub fn builder() -> SampledHttpRequestBuilder
pub fn builder() -> SampledHttpRequestBuilder
Creates a new builder-style object to manufacture SampledHttpRequest
.
Trait Implementations§
source§impl Clone for SampledHttpRequest
impl Clone for SampledHttpRequest
source§fn clone(&self) -> SampledHttpRequest
fn clone(&self) -> SampledHttpRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SampledHttpRequest
impl Debug for SampledHttpRequest
source§impl PartialEq for SampledHttpRequest
impl PartialEq for SampledHttpRequest
source§fn eq(&self, other: &SampledHttpRequest) -> bool
fn eq(&self, other: &SampledHttpRequest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for SampledHttpRequest
Auto Trait Implementations§
impl Freeze for SampledHttpRequest
impl RefUnwindSafe for SampledHttpRequest
impl Send for SampledHttpRequest
impl Sync for SampledHttpRequest
impl Unpin for SampledHttpRequest
impl UnwindSafe for SampledHttpRequest
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> 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