Set-Filter-State filter state value (proto)
extensions.filters.common.set_filter_state.v3.FilterStateValue
[extensions.filters.common.set_filter_state.v3.FilterStateValue proto]
A filter state key and value pair.
{
"object_key": ...,
"factory_key": ...,
"format_string": {...},
"read_only": ...,
"shared_with_upstream": ...,
"skip_if_empty": ...
}
- object_key
(string, REQUIRED) The name under which the filter state object will be stored and can be retrieved.
When using well-known filter state keys (e.g.,
envoy.network.upstream_server_name,envoy.tcp_proxy.cluster), the object key serves dual purpose where it identifies both where the data is stored and which factory creates the object. In this case, factory_key is not needed.When using a custom key name which is not from the well-known list, you must also specify factory_key to indicate which factory should create the object from your value.
Example using a well-known key where
factory_keyis not needed:object_key: envoy.tcp_proxy.cluster format_string: text_format_source: inline_string: "my-cluster"
Example using a custom key which requires a
factory_key:object_key: my.custom.key factory_key: envoy.string format_string: text_format_source: inline_string: "my-value"
- factory_key
(string) Specifies which registered factory should be used to create the filter state object from the provided value. This field is required when object_key is a custom name not found in the well-known filter state keys.
Each well-known key has a factory registered with the same name (e.g., the key
envoy.tcp_proxy.clusterhas a factory also namedenvoy.tcp_proxy.cluster). For custom keys, use one of the following generic factories:envoy.string: Creates a generic string object. Use this for arbitrary string values that will be accessed viaStringAccessor.
If not specified, defaults to the value of
object_key.
- format_string
(config.core.v3.SubstitutionFormatString, REQUIRED) Uses the format string to instantiate the filter state object value.
- read_only
(bool) If marked as read-only, the filter state key value is locked, and cannot be overridden by any filter, including this filter.
- skip_if_empty
(bool) Skip the update if the value evaluates to an empty string. This option can be used to supply multiple alternatives for the same filter state object key.