Interface RateLimit.Action.GenericKeyOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
RateLimit.Action.GenericKey,RateLimit.Action.GenericKey.Builder
- Enclosing class:
- RateLimit.Action
public static interface RateLimit.Action.GenericKeyOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptionAn optional value to use if the final concatenated ``descriptor_value`` result is empty.com.google.protobuf.ByteStringAn optional value to use if the final concatenated ``descriptor_value`` result is empty.An optional key to use in the descriptor entry.com.google.protobuf.ByteStringAn optional key to use in the descriptor entry.Descriptor value of entry.com.google.protobuf.ByteStringDescriptor value of entry.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptorValue
String getDescriptorValue()Descriptor value of entry. The same :ref:`format specifier <config_access_log_format>` as used for :ref:`HTTP access logging <config_access_log>` applies here, however unknown specifier values are replaced with the empty string instead of ``-``. .. note:: Formatter parsing is controlled by the runtime feature flag ``envoy.reloadable_features.enable_formatter_for_ratelimit_action_descriptor_value`` (disabled by default). When enabled: The format string can contain multiple valid substitution fields. If multiple substitution fields are present, their results will be concatenated to form the final descriptor value. If it contains no substitution fields, the value will be used as is. If the final concatenated result is empty and ``default_value`` is set, the ``default_value`` will be used. If ``default_value`` is not set and the result is empty, this descriptor will be skipped and not included in the rate limit call. When disabled (default): The descriptor_value is used as a literal string without any formatter parsing or substitution. For example, ``static_value`` will be used as is since there are no substitution fields. ``%REQ(:method)%`` will be replaced with the HTTP method, and ``%REQ(:method)%%REQ(:path)%`` will be replaced with the concatenation of the HTTP method and path. ``%CEL(request.headers['user-id'])%`` will use CEL to extract the user ID from request headers.
string descriptor_value = 1 [(.validate.rules) = { ... }- Returns:
- The descriptorValue.
-
getDescriptorValueBytes
com.google.protobuf.ByteString getDescriptorValueBytes()Descriptor value of entry. The same :ref:`format specifier <config_access_log_format>` as used for :ref:`HTTP access logging <config_access_log>` applies here, however unknown specifier values are replaced with the empty string instead of ``-``. .. note:: Formatter parsing is controlled by the runtime feature flag ``envoy.reloadable_features.enable_formatter_for_ratelimit_action_descriptor_value`` (disabled by default). When enabled: The format string can contain multiple valid substitution fields. If multiple substitution fields are present, their results will be concatenated to form the final descriptor value. If it contains no substitution fields, the value will be used as is. If the final concatenated result is empty and ``default_value`` is set, the ``default_value`` will be used. If ``default_value`` is not set and the result is empty, this descriptor will be skipped and not included in the rate limit call. When disabled (default): The descriptor_value is used as a literal string without any formatter parsing or substitution. For example, ``static_value`` will be used as is since there are no substitution fields. ``%REQ(:method)%`` will be replaced with the HTTP method, and ``%REQ(:method)%%REQ(:path)%`` will be replaced with the concatenation of the HTTP method and path. ``%CEL(request.headers['user-id'])%`` will use CEL to extract the user ID from request headers.
string descriptor_value = 1 [(.validate.rules) = { ... }- Returns:
- The bytes for descriptorValue.
-
getDefaultValue
String getDefaultValue()An optional value to use if the final concatenated ``descriptor_value`` result is empty. Only applicable when formatter parsing is enabled by the runtime feature flag ``envoy.reloadable_features.enable_formatter_for_ratelimit_action_descriptor_value`` (disabled by default).
string default_value = 3;- Returns:
- The defaultValue.
-
getDefaultValueBytes
com.google.protobuf.ByteString getDefaultValueBytes()An optional value to use if the final concatenated ``descriptor_value`` result is empty. Only applicable when formatter parsing is enabled by the runtime feature flag ``envoy.reloadable_features.enable_formatter_for_ratelimit_action_descriptor_value`` (disabled by default).
string default_value = 3;- Returns:
- The bytes for defaultValue.
-
getDescriptorKey
String getDescriptorKey()An optional key to use in the descriptor entry. If not set it defaults to 'generic_key' as the descriptor key.
string descriptor_key = 2;- Returns:
- The descriptorKey.
-
getDescriptorKeyBytes
com.google.protobuf.ByteString getDescriptorKeyBytes()An optional key to use in the descriptor entry. If not set it defaults to 'generic_key' as the descriptor key.
string descriptor_key = 2;- Returns:
- The bytes for descriptorKey.
-