Struct aws_sdk_wafv2::types::builders::HttpRequestBuilder
source · #[non_exhaustive]pub struct HttpRequestBuilder { /* private fields */ }
Expand description
A builder for HttpRequest
.
Implementations§
source§impl HttpRequestBuilder
impl HttpRequestBuilder
sourcepub fn client_ip(self, input: impl Into<String>) -> Self
pub fn client_ip(self, input: impl Into<String>) -> Self
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 set_client_ip(self, input: Option<String>) -> Self
pub fn set_client_ip(self, input: Option<String>) -> Self
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 get_client_ip(&self) -> &Option<String>
pub fn get_client_ip(&self) -> &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
sourcepub fn country(self, input: impl Into<String>) -> Self
pub fn country(self, input: impl Into<String>) -> Self
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 set_country(self, input: Option<String>) -> Self
pub fn set_country(self, input: Option<String>) -> Self
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 get_country(&self) -> &Option<String>
pub fn get_country(&self) -> &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.
sourcepub fn uri(self, input: impl Into<String>) -> Self
pub fn uri(self, input: impl Into<String>) -> Self
The URI path of the request, which identifies the resource, for example, /images/daily-ad.jpg
.
sourcepub fn set_uri(self, input: Option<String>) -> Self
pub fn set_uri(self, input: Option<String>) -> Self
The URI path of the request, which identifies the resource, for example, /images/daily-ad.jpg
.
sourcepub fn get_uri(&self) -> &Option<String>
pub fn get_uri(&self) -> &Option<String>
The URI path of the request, which identifies the resource, for example, /images/daily-ad.jpg
.
sourcepub fn method(self, input: impl Into<String>) -> Self
pub fn method(self, input: impl Into<String>) -> Self
The HTTP method specified in the sampled web request.
sourcepub fn set_method(self, input: Option<String>) -> Self
pub fn set_method(self, input: Option<String>) -> Self
The HTTP method specified in the sampled web request.
sourcepub fn get_method(&self) -> &Option<String>
pub fn get_method(&self) -> &Option<String>
The HTTP method specified in the sampled web request.
sourcepub fn http_version(self, input: impl Into<String>) -> Self
pub fn http_version(self, input: impl Into<String>) -> Self
The HTTP version specified in the sampled web request, for example, HTTP/1.1
.
sourcepub fn set_http_version(self, input: Option<String>) -> Self
pub fn set_http_version(self, input: Option<String>) -> Self
The HTTP version specified in the sampled web request, for example, HTTP/1.1
.
sourcepub fn get_http_version(&self) -> &Option<String>
pub fn get_http_version(&self) -> &Option<String>
The HTTP version specified in the sampled web request, for example, HTTP/1.1
.
sourcepub fn headers(self, input: HttpHeader) -> Self
pub fn headers(self, input: HttpHeader) -> Self
Appends an item to headers
.
To override the contents of this collection use set_headers
.
A complex type that contains the name and value for each header in the sampled web request.
sourcepub fn set_headers(self, input: Option<Vec<HttpHeader>>) -> Self
pub fn set_headers(self, input: Option<Vec<HttpHeader>>) -> Self
A complex type that contains the name and value for each header in the sampled web request.
sourcepub fn get_headers(&self) -> &Option<Vec<HttpHeader>>
pub fn get_headers(&self) -> &Option<Vec<HttpHeader>>
A complex type that contains the name and value for each header in the sampled web request.
sourcepub fn build(self) -> HttpRequest
pub fn build(self) -> HttpRequest
Consumes the builder and constructs a HttpRequest
.
Trait Implementations§
source§impl Clone for HttpRequestBuilder
impl Clone for HttpRequestBuilder
source§fn clone(&self) -> HttpRequestBuilder
fn clone(&self) -> HttpRequestBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for HttpRequestBuilder
impl Debug for HttpRequestBuilder
source§impl Default for HttpRequestBuilder
impl Default for HttpRequestBuilder
source§fn default() -> HttpRequestBuilder
fn default() -> HttpRequestBuilder
source§impl PartialEq for HttpRequestBuilder
impl PartialEq for HttpRequestBuilder
source§fn eq(&self, other: &HttpRequestBuilder) -> bool
fn eq(&self, other: &HttpRequestBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for HttpRequestBuilder
Auto Trait Implementations§
impl Freeze for HttpRequestBuilder
impl RefUnwindSafe for HttpRequestBuilder
impl Send for HttpRequestBuilder
impl Sync for HttpRequestBuilder
impl Unpin for HttpRequestBuilder
impl UnwindSafe for HttpRequestBuilder
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