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: 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 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) -> 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.
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<SampledHttpRequest> for SampledHttpRequest
impl PartialEq<SampledHttpRequest> 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 ==.