public static final class LocalReplyConfig.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder> implements LocalReplyConfigOrBuilder
The configuration to customize local reply returned by Envoy.Protobuf type
envoy.extensions.filters.network.http_connection_manager.v4alpha.LocalReplyConfig| Modifier and Type | Method and Description |
|---|---|
LocalReplyConfig.Builder |
addAllMappers(Iterable<? extends ResponseMapper> values)
Configuration of list of mappers which allows to filter and change local response.
|
LocalReplyConfig.Builder |
addMappers(int index,
ResponseMapper.Builder builderForValue)
Configuration of list of mappers which allows to filter and change local response.
|
LocalReplyConfig.Builder |
addMappers(int index,
ResponseMapper value)
Configuration of list of mappers which allows to filter and change local response.
|
LocalReplyConfig.Builder |
addMappers(ResponseMapper.Builder builderForValue)
Configuration of list of mappers which allows to filter and change local response.
|
LocalReplyConfig.Builder |
addMappers(ResponseMapper value)
Configuration of list of mappers which allows to filter and change local response.
|
ResponseMapper.Builder |
addMappersBuilder()
Configuration of list of mappers which allows to filter and change local response.
|
ResponseMapper.Builder |
addMappersBuilder(int index)
Configuration of list of mappers which allows to filter and change local response.
|
LocalReplyConfig.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
LocalReplyConfig |
build() |
LocalReplyConfig |
buildPartial() |
LocalReplyConfig.Builder |
clear() |
LocalReplyConfig.Builder |
clearBodyFormat()
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
|
LocalReplyConfig.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
LocalReplyConfig.Builder |
clearMappers()
Configuration of list of mappers which allows to filter and change local response.
|
LocalReplyConfig.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
LocalReplyConfig.Builder |
clone() |
SubstitutionFormatString |
getBodyFormat()
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
|
SubstitutionFormatString.Builder |
getBodyFormatBuilder()
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
|
SubstitutionFormatStringOrBuilder |
getBodyFormatOrBuilder()
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
|
LocalReplyConfig |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
ResponseMapper |
getMappers(int index)
Configuration of list of mappers which allows to filter and change local response.
|
ResponseMapper.Builder |
getMappersBuilder(int index)
Configuration of list of mappers which allows to filter and change local response.
|
List<ResponseMapper.Builder> |
getMappersBuilderList()
Configuration of list of mappers which allows to filter and change local response.
|
int |
getMappersCount()
Configuration of list of mappers which allows to filter and change local response.
|
List<ResponseMapper> |
getMappersList()
Configuration of list of mappers which allows to filter and change local response.
|
ResponseMapperOrBuilder |
getMappersOrBuilder(int index)
Configuration of list of mappers which allows to filter and change local response.
|
List<? extends ResponseMapperOrBuilder> |
getMappersOrBuilderList()
Configuration of list of mappers which allows to filter and change local response.
|
boolean |
hasBodyFormat()
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
LocalReplyConfig.Builder |
mergeBodyFormat(SubstitutionFormatString value)
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
|
LocalReplyConfig.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
LocalReplyConfig.Builder |
mergeFrom(LocalReplyConfig other) |
LocalReplyConfig.Builder |
mergeFrom(com.google.protobuf.Message other) |
LocalReplyConfig.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
LocalReplyConfig.Builder |
removeMappers(int index)
Configuration of list of mappers which allows to filter and change local response.
|
LocalReplyConfig.Builder |
setBodyFormat(SubstitutionFormatString.Builder builderForValue)
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
|
LocalReplyConfig.Builder |
setBodyFormat(SubstitutionFormatString value)
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
|
LocalReplyConfig.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
LocalReplyConfig.Builder |
setMappers(int index,
ResponseMapper.Builder builderForValue)
Configuration of list of mappers which allows to filter and change local response.
|
LocalReplyConfig.Builder |
setMappers(int index,
ResponseMapper value)
Configuration of list of mappers which allows to filter and change local response.
|
LocalReplyConfig.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
LocalReplyConfig.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>public LocalReplyConfig.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>public LocalReplyConfig getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic LocalReplyConfig build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic LocalReplyConfig buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic LocalReplyConfig.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>public LocalReplyConfig.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>public LocalReplyConfig.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>public LocalReplyConfig.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>public LocalReplyConfig.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>public LocalReplyConfig.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>public LocalReplyConfig.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<LocalReplyConfig.Builder>public LocalReplyConfig.Builder mergeFrom(LocalReplyConfig other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>public LocalReplyConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<LocalReplyConfig.Builder>IOExceptionpublic List<ResponseMapper> getMappersList()
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper mappers = 1;getMappersList in interface LocalReplyConfigOrBuilderpublic int getMappersCount()
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper mappers = 1;getMappersCount in interface LocalReplyConfigOrBuilderpublic ResponseMapper getMappers(int index)
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper mappers = 1;getMappers in interface LocalReplyConfigOrBuilderpublic LocalReplyConfig.Builder setMappers(int index, ResponseMapper value)
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper mappers = 1;public LocalReplyConfig.Builder setMappers(int index, ResponseMapper.Builder builderForValue)
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper mappers = 1;public LocalReplyConfig.Builder addMappers(ResponseMapper value)
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper mappers = 1;public LocalReplyConfig.Builder addMappers(int index, ResponseMapper value)
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper mappers = 1;public LocalReplyConfig.Builder addMappers(ResponseMapper.Builder builderForValue)
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper mappers = 1;public LocalReplyConfig.Builder addMappers(int index, ResponseMapper.Builder builderForValue)
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper mappers = 1;public LocalReplyConfig.Builder addAllMappers(Iterable<? extends ResponseMapper> values)
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper mappers = 1;public LocalReplyConfig.Builder clearMappers()
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper mappers = 1;public LocalReplyConfig.Builder removeMappers(int index)
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper mappers = 1;public ResponseMapper.Builder getMappersBuilder(int index)
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper mappers = 1;public ResponseMapperOrBuilder getMappersOrBuilder(int index)
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper mappers = 1;getMappersOrBuilder in interface LocalReplyConfigOrBuilderpublic List<? extends ResponseMapperOrBuilder> getMappersOrBuilderList()
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper mappers = 1;getMappersOrBuilderList in interface LocalReplyConfigOrBuilderpublic ResponseMapper.Builder addMappersBuilder()
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper mappers = 1;public ResponseMapper.Builder addMappersBuilder(int index)
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper mappers = 1;public List<ResponseMapper.Builder> getMappersBuilderList()
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper mappers = 1;public boolean hasBodyFormat()
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
Example one: "plain/text" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
The following response body in "plain/text" format will be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: text
upstream connect error:503:path=/foo
Example two: "application/json" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
json_format:
status: "%RESPONSE_CODE%"
message: "%LOCAL_REPLY_BODY%"
path: "%REQ(:path)%"
The following response body in "application/json" format would be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: json
{
"status": 503,
"message": "upstream connection error",
"path": "/foo"
}
.envoy.config.core.v4alpha.SubstitutionFormatString body_format = 2;hasBodyFormat in interface LocalReplyConfigOrBuilderpublic SubstitutionFormatString getBodyFormat()
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
Example one: "plain/text" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
The following response body in "plain/text" format will be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: text
upstream connect error:503:path=/foo
Example two: "application/json" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
json_format:
status: "%RESPONSE_CODE%"
message: "%LOCAL_REPLY_BODY%"
path: "%REQ(:path)%"
The following response body in "application/json" format would be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: json
{
"status": 503,
"message": "upstream connection error",
"path": "/foo"
}
.envoy.config.core.v4alpha.SubstitutionFormatString body_format = 2;getBodyFormat in interface LocalReplyConfigOrBuilderpublic LocalReplyConfig.Builder setBodyFormat(SubstitutionFormatString value)
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
Example one: "plain/text" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
The following response body in "plain/text" format will be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: text
upstream connect error:503:path=/foo
Example two: "application/json" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
json_format:
status: "%RESPONSE_CODE%"
message: "%LOCAL_REPLY_BODY%"
path: "%REQ(:path)%"
The following response body in "application/json" format would be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: json
{
"status": 503,
"message": "upstream connection error",
"path": "/foo"
}
.envoy.config.core.v4alpha.SubstitutionFormatString body_format = 2;public LocalReplyConfig.Builder setBodyFormat(SubstitutionFormatString.Builder builderForValue)
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
Example one: "plain/text" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
The following response body in "plain/text" format will be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: text
upstream connect error:503:path=/foo
Example two: "application/json" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
json_format:
status: "%RESPONSE_CODE%"
message: "%LOCAL_REPLY_BODY%"
path: "%REQ(:path)%"
The following response body in "application/json" format would be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: json
{
"status": 503,
"message": "upstream connection error",
"path": "/foo"
}
.envoy.config.core.v4alpha.SubstitutionFormatString body_format = 2;public LocalReplyConfig.Builder mergeBodyFormat(SubstitutionFormatString value)
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
Example one: "plain/text" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
The following response body in "plain/text" format will be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: text
upstream connect error:503:path=/foo
Example two: "application/json" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
json_format:
status: "%RESPONSE_CODE%"
message: "%LOCAL_REPLY_BODY%"
path: "%REQ(:path)%"
The following response body in "application/json" format would be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: json
{
"status": 503,
"message": "upstream connection error",
"path": "/foo"
}
.envoy.config.core.v4alpha.SubstitutionFormatString body_format = 2;public LocalReplyConfig.Builder clearBodyFormat()
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
Example one: "plain/text" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
The following response body in "plain/text" format will be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: text
upstream connect error:503:path=/foo
Example two: "application/json" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
json_format:
status: "%RESPONSE_CODE%"
message: "%LOCAL_REPLY_BODY%"
path: "%REQ(:path)%"
The following response body in "application/json" format would be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: json
{
"status": 503,
"message": "upstream connection error",
"path": "/foo"
}
.envoy.config.core.v4alpha.SubstitutionFormatString body_format = 2;public SubstitutionFormatString.Builder getBodyFormatBuilder()
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
Example one: "plain/text" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
The following response body in "plain/text" format will be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: text
upstream connect error:503:path=/foo
Example two: "application/json" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
json_format:
status: "%RESPONSE_CODE%"
message: "%LOCAL_REPLY_BODY%"
path: "%REQ(:path)%"
The following response body in "application/json" format would be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: json
{
"status": 503,
"message": "upstream connection error",
"path": "/foo"
}
.envoy.config.core.v4alpha.SubstitutionFormatString body_format = 2;public SubstitutionFormatStringOrBuilder getBodyFormatOrBuilder()
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
Example one: "plain/text" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
The following response body in "plain/text" format will be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: text
upstream connect error:503:path=/foo
Example two: "application/json" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
json_format:
status: "%RESPONSE_CODE%"
message: "%LOCAL_REPLY_BODY%"
path: "%REQ(:path)%"
The following response body in "application/json" format would be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: json
{
"status": 503,
"message": "upstream connection error",
"path": "/foo"
}
.envoy.config.core.v4alpha.SubstitutionFormatString body_format = 2;getBodyFormatOrBuilder in interface LocalReplyConfigOrBuilderpublic final LocalReplyConfig.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>public final LocalReplyConfig.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>Copyright © 2018–2021 The Envoy Project. All rights reserved.