Struct aws_sdk_appmesh::types::HttpRouteMatch
source · #[non_exhaustive]pub struct HttpRouteMatch {
pub prefix: Option<String>,
pub path: Option<HttpPathMatch>,
pub query_parameters: Option<Vec<HttpQueryParameter>>,
pub method: Option<HttpMethod>,
pub scheme: Option<HttpScheme>,
pub headers: Option<Vec<HttpRouteHeader>>,
pub port: Option<i32>,
}
Expand description
An object that represents the requirements for a route to match HTTP requests for a virtual router.
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.prefix: Option<String>
Specifies the path to match requests with. This parameter must always start with /
, which by itself matches all requests to the virtual service name. You can also match for path-based routing of requests. For example, if your virtual service name is my-service.local
and you want the route to match requests to my-service.local/metrics
, your prefix should be /metrics
.
path: Option<HttpPathMatch>
The client request path to match on.
query_parameters: Option<Vec<HttpQueryParameter>>
The client request query parameters to match on.
method: Option<HttpMethod>
The client request method to match on. Specify only one.
scheme: Option<HttpScheme>
The client request scheme to match on. Specify only one. Applicable only for HTTP2 routes.
headers: Option<Vec<HttpRouteHeader>>
The client request headers to match on.
port: Option<i32>
The port number to match on.
Implementations§
source§impl HttpRouteMatch
impl HttpRouteMatch
sourcepub fn prefix(&self) -> Option<&str>
pub fn prefix(&self) -> Option<&str>
Specifies the path to match requests with. This parameter must always start with /
, which by itself matches all requests to the virtual service name. You can also match for path-based routing of requests. For example, if your virtual service name is my-service.local
and you want the route to match requests to my-service.local/metrics
, your prefix should be /metrics
.
sourcepub fn path(&self) -> Option<&HttpPathMatch>
pub fn path(&self) -> Option<&HttpPathMatch>
The client request path to match on.
sourcepub fn query_parameters(&self) -> &[HttpQueryParameter]
pub fn query_parameters(&self) -> &[HttpQueryParameter]
The client request query parameters to match on.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .query_parameters.is_none()
.
sourcepub fn method(&self) -> Option<&HttpMethod>
pub fn method(&self) -> Option<&HttpMethod>
The client request method to match on. Specify only one.
sourcepub fn scheme(&self) -> Option<&HttpScheme>
pub fn scheme(&self) -> Option<&HttpScheme>
The client request scheme to match on. Specify only one. Applicable only for HTTP2 routes.
sourcepub fn headers(&self) -> &[HttpRouteHeader]
pub fn headers(&self) -> &[HttpRouteHeader]
The client request headers to match on.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .headers.is_none()
.
source§impl HttpRouteMatch
impl HttpRouteMatch
sourcepub fn builder() -> HttpRouteMatchBuilder
pub fn builder() -> HttpRouteMatchBuilder
Creates a new builder-style object to manufacture HttpRouteMatch
.
Trait Implementations§
source§impl Clone for HttpRouteMatch
impl Clone for HttpRouteMatch
source§fn clone(&self) -> HttpRouteMatch
fn clone(&self) -> HttpRouteMatch
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for HttpRouteMatch
impl Debug for HttpRouteMatch
source§impl PartialEq for HttpRouteMatch
impl PartialEq for HttpRouteMatch
source§fn eq(&self, other: &HttpRouteMatch) -> bool
fn eq(&self, other: &HttpRouteMatch) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for HttpRouteMatch
Auto Trait Implementations§
impl Freeze for HttpRouteMatch
impl RefUnwindSafe for HttpRouteMatch
impl Send for HttpRouteMatch
impl Sync for HttpRouteMatch
impl Unpin for HttpRouteMatch
impl UnwindSafe for HttpRouteMatch
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