Struct aws_sdk_wafv2::model::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>,
}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: i64A 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 for the Rule that the request matched: Allow, Block, or Count.
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.
Implementations
sourceimpl 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 action(&self) -> Option<&str>
pub fn action(&self) -> Option<&str>
The action for the Rule that the request matched: Allow, Block, or Count.
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) -> Option<&[HttpHeader]>
pub fn request_headers_inserted(&self) -> Option<&[HttpHeader]>
Custom request headers inserted by WAF into the request, according to the custom request configuration for the matching rule action.
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) -> Option<&[Label]>
pub fn labels(&self) -> Option<&[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.
sourcepub fn captcha_response(&self) -> Option<&CaptchaResponse>
pub fn captcha_response(&self) -> Option<&CaptchaResponse>
The CAPTCHA response for the request.
sourceimpl SampledHttpRequest
impl SampledHttpRequest
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture SampledHttpRequest
Trait Implementations
sourceimpl Clone for SampledHttpRequest
impl Clone for SampledHttpRequest
sourcefn clone(&self) -> SampledHttpRequest
fn clone(&self) -> SampledHttpRequest
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for SampledHttpRequest
impl Debug for SampledHttpRequest
sourceimpl PartialEq<SampledHttpRequest> for SampledHttpRequest
impl PartialEq<SampledHttpRequest> for SampledHttpRequest
sourcefn eq(&self, other: &SampledHttpRequest) -> bool
fn eq(&self, other: &SampledHttpRequest) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &SampledHttpRequest) -> bool
fn ne(&self, other: &SampledHttpRequest) -> bool
This method tests for !=.
impl StructuralPartialEq for SampledHttpRequest
Auto Trait Implementations
impl RefUnwindSafe for SampledHttpRequest
impl Send for SampledHttpRequest
impl Sync for SampledHttpRequest
impl Unpin for SampledHttpRequest
impl UnwindSafe for SampledHttpRequest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more