Enum google_api_proto::google::cloud::compute::v1::security_policy_rule_rate_limit_options_enforce_on_key_config::EnforceOnKeyType
source · #[repr(i32)]pub enum EnforceOnKeyType {
UndefinedEnforceOnKeyType = 0,
All = 64_897,
HttpCookie = 494_981_627,
HttpHeader = 91_597_348,
HttpPath = 311_503_228,
Ip = 2_343,
RegionCode = 79_559_768,
Sni = 82_254,
TlsJa3Fingerprint = 327_127_933,
UserIp = 34_009_627,
XffIp = 438_707_118,
}
Expand description
Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if “enforceOnKeyConfigs” is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under “enforceOnKeyName”. The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under “enforceOnKeyName”. The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. - USER_IP: The IP address of the originating client, which is resolved based on “userIpRequestHeaders” configured with the security policy. If there is no “userIpRequestHeaders” configuration or an IP address cannot be resolved from it, the key type defaults to IP.
Variants§
UndefinedEnforceOnKeyType = 0
A value indicating that the enum field is not set.
All = 64_897
HttpCookie = 494_981_627
HttpHeader = 91_597_348
HttpPath = 311_503_228
Ip = 2_343
RegionCode = 79_559_768
Sni = 82_254
TlsJa3Fingerprint = 327_127_933
UserIp = 34_009_627
XffIp = 438_707_118
Implementations§
source§impl EnforceOnKeyType
impl EnforceOnKeyType
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for EnforceOnKeyType
impl Clone for EnforceOnKeyType
source§fn clone(&self) -> EnforceOnKeyType
fn clone(&self) -> EnforceOnKeyType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for EnforceOnKeyType
impl Debug for EnforceOnKeyType
source§impl Default for EnforceOnKeyType
impl Default for EnforceOnKeyType
source§fn default() -> EnforceOnKeyType
fn default() -> EnforceOnKeyType
source§impl From<EnforceOnKeyType> for i32
impl From<EnforceOnKeyType> for i32
source§fn from(value: EnforceOnKeyType) -> i32
fn from(value: EnforceOnKeyType) -> i32
source§impl Hash for EnforceOnKeyType
impl Hash for EnforceOnKeyType
source§impl Ord for EnforceOnKeyType
impl Ord for EnforceOnKeyType
source§fn cmp(&self, other: &EnforceOnKeyType) -> Ordering
fn cmp(&self, other: &EnforceOnKeyType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for EnforceOnKeyType
impl PartialEq for EnforceOnKeyType
source§fn eq(&self, other: &EnforceOnKeyType) -> bool
fn eq(&self, other: &EnforceOnKeyType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for EnforceOnKeyType
impl PartialOrd for EnforceOnKeyType
source§fn partial_cmp(&self, other: &EnforceOnKeyType) -> Option<Ordering>
fn partial_cmp(&self, other: &EnforceOnKeyType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<i32> for EnforceOnKeyType
impl TryFrom<i32> for EnforceOnKeyType
§type Error = DecodeError
type Error = DecodeError
source§fn try_from(value: i32) -> Result<EnforceOnKeyType, DecodeError>
fn try_from(value: i32) -> Result<EnforceOnKeyType, DecodeError>
impl Copy for EnforceOnKeyType
impl Eq for EnforceOnKeyType
impl StructuralPartialEq for EnforceOnKeyType
Auto Trait Implementations§
impl Freeze for EnforceOnKeyType
impl RefUnwindSafe for EnforceOnKeyType
impl Send for EnforceOnKeyType
impl Sync for EnforceOnKeyType
impl Unpin for EnforceOnKeyType
impl UnwindSafe for EnforceOnKeyType
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request