.. _envoy_v3_api_file_envoy/type/metadata/v3/metadata.proto: Metadata ======== This documentation is for the Envoy v3 API. As of Envoy v1.18 the v2 API has been removed and is no longer supported. If you are upgrading from v2 API config you may wish to view the v2 API documentation: :ref:`type/metadata/v2/metadata.proto ` .. _envoy_v3_api_msg_type.metadata.v3.MetadataKey: type.metadata.v3.MetadataKey ---------------------------- :repo:`[type.metadata.v3.MetadataKey proto] ` MetadataKey provides a general interface using `key` and `path` to retrieve value from :ref:`Metadata `. For example, for the following Metadata: .. code-block:: yaml filter_metadata: envoy.xxx: prop: foo: bar xyz: hello: envoy The following MetadataKey will retrieve a string value "bar" from the Metadata. .. code-block:: yaml key: envoy.xxx path: - key: prop - key: foo .. code-block:: json { "key": "...", "path": [] } .. _envoy_v3_api_field_type.metadata.v3.MetadataKey.key: key (`string `_, *REQUIRED*) The key name of Metadata to retrieve the Struct from the metadata. Typically, it represents a builtin subsystem or custom extension. .. _envoy_v3_api_field_type.metadata.v3.MetadataKey.path: path (**repeated** :ref:`type.metadata.v3.MetadataKey.PathSegment `, *REQUIRED*) The path to retrieve the Value from the Struct. It can be a prefix or a full path, e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, which depends on the particular scenario. Note: Due to that only the key type segment is supported, the path can not specify a list unless the list is the last segment. .. _envoy_v3_api_msg_type.metadata.v3.MetadataKey.PathSegment: type.metadata.v3.MetadataKey.PathSegment ---------------------------------------- :repo:`[type.metadata.v3.MetadataKey.PathSegment proto] ` Specifies the segment in a path to retrieve value from Metadata. Currently it is only supported to specify the key, i.e. field name, as one segment of a path. .. code-block:: json { "key": "..." } .. _envoy_v3_api_field_type.metadata.v3.MetadataKey.PathSegment.key: key (`string `_, *REQUIRED*) If specified, use the key to retrieve the value in a Struct. .. _envoy_v3_api_msg_type.metadata.v3.MetadataKind: type.metadata.v3.MetadataKind ----------------------------- :repo:`[type.metadata.v3.MetadataKind proto] ` Describes what kind of metadata. .. code-block:: json { "request": "{...}", "route": "{...}", "cluster": "{...}", "host": "{...}" } .. _envoy_v3_api_field_type.metadata.v3.MetadataKind.request: request (:ref:`type.metadata.v3.MetadataKind.Request `) Request kind of metadata. Precisely one of :ref:`request `, :ref:`route `, :ref:`cluster `, :ref:`host ` must be set. .. _envoy_v3_api_field_type.metadata.v3.MetadataKind.route: route (:ref:`type.metadata.v3.MetadataKind.Route `) Route kind of metadata. Precisely one of :ref:`request `, :ref:`route `, :ref:`cluster `, :ref:`host ` must be set. .. _envoy_v3_api_field_type.metadata.v3.MetadataKind.cluster: cluster (:ref:`type.metadata.v3.MetadataKind.Cluster `) Cluster kind of metadata. Precisely one of :ref:`request `, :ref:`route `, :ref:`cluster `, :ref:`host ` must be set. .. _envoy_v3_api_field_type.metadata.v3.MetadataKind.host: host (:ref:`type.metadata.v3.MetadataKind.Host `) Host kind of metadata. Precisely one of :ref:`request `, :ref:`route `, :ref:`cluster `, :ref:`host ` must be set. .. _envoy_v3_api_msg_type.metadata.v3.MetadataKind.Request: type.metadata.v3.MetadataKind.Request ------------------------------------- :repo:`[type.metadata.v3.MetadataKind.Request proto] ` Represents dynamic metadata associated with the request. .. _envoy_v3_api_msg_type.metadata.v3.MetadataKind.Route: type.metadata.v3.MetadataKind.Route ----------------------------------- :repo:`[type.metadata.v3.MetadataKind.Route proto] ` Represents metadata from :ref:`the route`. .. _envoy_v3_api_msg_type.metadata.v3.MetadataKind.Cluster: type.metadata.v3.MetadataKind.Cluster ------------------------------------- :repo:`[type.metadata.v3.MetadataKind.Cluster proto] ` Represents metadata from :ref:`the upstream cluster`. .. _envoy_v3_api_msg_type.metadata.v3.MetadataKind.Host: type.metadata.v3.MetadataKind.Host ---------------------------------- :repo:`[type.metadata.v3.MetadataKind.Host proto] ` Represents metadata from :ref:`the upstream host`.