Struct aws_sdk_wafv2::model::HttpRequest
source · [−]#[non_exhaustive]pub struct HttpRequest {
pub client_ip: Option<String>,
pub country: Option<String>,
pub uri: Option<String>,
pub method: Option<String>,
pub http_version: Option<String>,
pub headers: Option<Vec<HttpHeader>>,
}Expand description
Part of the response from GetSampledRequests. This is a complex type that appears as Request in the response syntax. HTTPRequest contains information about one of the web requests.
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.client_ip: Option<String>The IP address that the request originated from. If the web ACL is associated with a CloudFront distribution, this is the value of one of the following fields in CloudFront access logs:
-
c-ip, if the viewer did not use an HTTP proxy or a load balancer to send the request -
x-forwarded-for, if the viewer did use an HTTP proxy or a load balancer to send the request
country: Option<String>The two-letter country code for the country that the request originated from. For a current list of country codes, see the Wikipedia entry ISO 3166-1 alpha-2.
uri: Option<String>The URI path of the request, which identifies the resource, for example, /images/daily-ad.jpg.
method: Option<String>The HTTP method specified in the sampled web request.
http_version: Option<String>The HTTP version specified in the sampled web request, for example, HTTP/1.1.
headers: Option<Vec<HttpHeader>>A complex type that contains the name and value for each header in the sampled web request.
Implementations
sourceimpl HttpRequest
impl HttpRequest
sourcepub fn client_ip(&self) -> Option<&str>
pub fn client_ip(&self) -> Option<&str>
The IP address that the request originated from. If the web ACL is associated with a CloudFront distribution, this is the value of one of the following fields in CloudFront access logs:
-
c-ip, if the viewer did not use an HTTP proxy or a load balancer to send the request -
x-forwarded-for, if the viewer did use an HTTP proxy or a load balancer to send the request
sourcepub fn country(&self) -> Option<&str>
pub fn country(&self) -> Option<&str>
The two-letter country code for the country that the request originated from. For a current list of country codes, see the Wikipedia entry ISO 3166-1 alpha-2.
sourcepub fn uri(&self) -> Option<&str>
pub fn uri(&self) -> Option<&str>
The URI path of the request, which identifies the resource, for example, /images/daily-ad.jpg.
sourcepub fn http_version(&self) -> Option<&str>
pub fn http_version(&self) -> Option<&str>
The HTTP version specified in the sampled web request, for example, HTTP/1.1.
sourceimpl HttpRequest
impl HttpRequest
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture HttpRequest
Trait Implementations
sourceimpl Clone for HttpRequest
impl Clone for HttpRequest
sourcefn clone(&self) -> HttpRequest
fn clone(&self) -> HttpRequest
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 HttpRequest
impl Debug for HttpRequest
sourceimpl PartialEq<HttpRequest> for HttpRequest
impl PartialEq<HttpRequest> for HttpRequest
sourcefn eq(&self, other: &HttpRequest) -> bool
fn eq(&self, other: &HttpRequest) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &HttpRequest) -> bool
fn ne(&self, other: &HttpRequest) -> bool
This method tests for !=.
impl StructuralPartialEq for HttpRequest
Auto Trait Implementations
impl RefUnwindSafe for HttpRequest
impl Send for HttpRequest
impl Sync for HttpRequest
impl Unpin for HttpRequest
impl UnwindSafe for HttpRequest
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