(::Array<::String>) — Specifies one or more conditions when this retry policy applies. Valid
values are:
5xx: Proxy will attempt a retry if the destination service responds
with any 5xx response code, of if the destination service does not
respond at all, example: disconnect, reset, read timeout, connection
failure and refused streams.
gateway-error: Similar to 5xx, but only applies to response codes 502,
503, 504.
reset: Proxy will attempt a retry if the destination service does not
respond at all (disconnect/reset/read timeout)
connect-failure: Proxy will retry on failures connecting to destination
for example due to connection timeouts.
retriable-4xx: Proxy will retry fro retriable 4xx response codes.
Currently the only retriable error supported is 409.
refused-stream: Proxy will retry if the destination resets the stream
with a REFUSED_STREAM error code. This reset type indicates that it
is safe to retry.
#retry_conditions=
defretry_conditions=(value)->::Array<::String>
Parameter
value (::Array<::String>) — Specifies one or more conditions when this retry policy applies. Valid
values are:
5xx: Proxy will attempt a retry if the destination service responds
with any 5xx response code, of if the destination service does not
respond at all, example: disconnect, reset, read timeout, connection
failure and refused streams.
gateway-error: Similar to 5xx, but only applies to response codes 502,
503, 504.
reset: Proxy will attempt a retry if the destination service does not
respond at all (disconnect/reset/read timeout)
connect-failure: Proxy will retry on failures connecting to destination
for example due to connection timeouts.
retriable-4xx: Proxy will retry fro retriable 4xx response codes.
Currently the only retriable error supported is 409.
refused-stream: Proxy will retry if the destination resets the stream
with a REFUSED_STREAM error code. This reset type indicates that it
is safe to retry.
Returns
(::Array<::String>) — Specifies one or more conditions when this retry policy applies. Valid
values are:
5xx: Proxy will attempt a retry if the destination service responds
with any 5xx response code, of if the destination service does not
respond at all, example: disconnect, reset, read timeout, connection
failure and refused streams.
gateway-error: Similar to 5xx, but only applies to response codes 502,
503, 504.
reset: Proxy will attempt a retry if the destination service does not
respond at all (disconnect/reset/read timeout)
connect-failure: Proxy will retry on failures connecting to destination
for example due to connection timeouts.
retriable-4xx: Proxy will retry fro retriable 4xx response codes.
Currently the only retriable error supported is 409.
refused-stream: Proxy will retry if the destination resets the stream
with a REFUSED_STREAM error code. This reset type indicates that it
is safe to retry.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Network Services V1 API - Class Google::Cloud::NetworkServices::V1::HttpRoute::RetryPolicy (v2.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.4.0 (latest)](/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-HttpRoute-RetryPolicy)\n- [2.3.0](/ruby/docs/reference/google-cloud-network_services-v1/2.3.0/Google-Cloud-NetworkServices-V1-HttpRoute-RetryPolicy)\n- [2.2.0](/ruby/docs/reference/google-cloud-network_services-v1/2.2.0/Google-Cloud-NetworkServices-V1-HttpRoute-RetryPolicy)\n- [2.1.0](/ruby/docs/reference/google-cloud-network_services-v1/2.1.0/Google-Cloud-NetworkServices-V1-HttpRoute-RetryPolicy)\n- [2.0.1](/ruby/docs/reference/google-cloud-network_services-v1/2.0.1/Google-Cloud-NetworkServices-V1-HttpRoute-RetryPolicy)\n- [1.2.0](/ruby/docs/reference/google-cloud-network_services-v1/1.2.0/Google-Cloud-NetworkServices-V1-HttpRoute-RetryPolicy)\n- [1.1.0](/ruby/docs/reference/google-cloud-network_services-v1/1.1.0/Google-Cloud-NetworkServices-V1-HttpRoute-RetryPolicy)\n- [1.0.1](/ruby/docs/reference/google-cloud-network_services-v1/1.0.1/Google-Cloud-NetworkServices-V1-HttpRoute-RetryPolicy)\n- [0.2.0](/ruby/docs/reference/google-cloud-network_services-v1/0.2.0/Google-Cloud-NetworkServices-V1-HttpRoute-RetryPolicy)\n- [0.1.0](/ruby/docs/reference/google-cloud-network_services-v1/0.1.0/Google-Cloud-NetworkServices-V1-HttpRoute-RetryPolicy) \nReference documentation and code samples for the Network Services V1 API class Google::Cloud::NetworkServices::V1::HttpRoute::RetryPolicy.\n\nThe specifications for retries. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #num_retries\n\n def num_retries() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- Specifies the allowed number of retries. This number must be \\\u003e 0. If not specified, default to 1.\n\n### #num_retries=\n\n def num_retries=(value) -\u003e ::Integer\n\n**Parameter**\n\n- **value** (::Integer) --- Specifies the allowed number of retries. This number must be \\\u003e 0. If not specified, default to 1. \n**Returns**\n\n- (::Integer) --- Specifies the allowed number of retries. This number must be \\\u003e 0. If not specified, default to 1.\n\n### #per_try_timeout\n\n def per_try_timeout() -\u003e ::Google::Protobuf::Duration\n\n**Returns**\n\n- ([::Google::Protobuf::Duration](./Google-Protobuf-Duration)) --- Specifies a non-zero timeout per retry attempt.\n\n### #per_try_timeout=\n\n def per_try_timeout=(value) -\u003e ::Google::Protobuf::Duration\n\n**Parameter**\n\n- **value** ([::Google::Protobuf::Duration](./Google-Protobuf-Duration)) --- Specifies a non-zero timeout per retry attempt. \n**Returns**\n\n- ([::Google::Protobuf::Duration](./Google-Protobuf-Duration)) --- Specifies a non-zero timeout per retry attempt.\n\n### #retry_conditions\n\n def retry_conditions() -\u003e ::Array\u003c::String\u003e\n\n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- Specifies one or more conditions when this retry policy applies. Valid values are: 5xx: Proxy will attempt a retry if the destination service responds with any 5xx response code, of if the destination service does not respond at all, example: disconnect, reset, read timeout, connection failure and refused streams.\n\n gateway-error: Similar to 5xx, but only applies to response codes 502,\n 503, 504.\n\n reset: Proxy will attempt a retry if the destination service does not\n respond at all (disconnect/reset/read timeout)\n\n connect-failure: Proxy will retry on failures connecting to destination\n for example due to connection timeouts.\n\n retriable-4xx: Proxy will retry fro retriable 4xx response codes.\n Currently the only retriable error supported is 409.\n\n refused-stream: Proxy will retry if the destination resets the stream\n with a REFUSED_STREAM error code. This reset type indicates that it\n is safe to retry.\n\n### #retry_conditions=\n\n def retry_conditions=(value) -\u003e ::Array\u003c::String\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c::String\\\u003e) --- Specifies one or more conditions when this retry policy applies. Valid values are: 5xx: Proxy will attempt a retry if the destination service responds with any 5xx response code, of if the destination service does not respond at all, example: disconnect, reset, read timeout, connection failure and refused streams.\n\n\n gateway-error: Similar to 5xx, but only applies to response codes 502,\n 503, 504.\n\n reset: Proxy will attempt a retry if the destination service does not\n respond at all (disconnect/reset/read timeout)\n\n connect-failure: Proxy will retry on failures connecting to destination\n for example due to connection timeouts.\n\n retriable-4xx: Proxy will retry fro retriable 4xx response codes.\n Currently the only retriable error supported is 409.\n\n refused-stream: Proxy will retry if the destination resets the stream\n with a REFUSED_STREAM error code. This reset type indicates that it\nis safe to retry. \n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- Specifies one or more conditions when this retry policy applies. Valid values are: 5xx: Proxy will attempt a retry if the destination service responds with any 5xx response code, of if the destination service does not respond at all, example: disconnect, reset, read timeout, connection failure and refused streams.\n\n gateway-error: Similar to 5xx, but only applies to response codes 502,\n 503, 504.\n\n reset: Proxy will attempt a retry if the destination service does not\n respond at all (disconnect/reset/read timeout)\n\n connect-failure: Proxy will retry on failures connecting to destination\n for example due to connection timeouts.\n\n retriable-4xx: Proxy will retry fro retriable 4xx response codes.\n Currently the only retriable error supported is 409.\n\n refused-stream: Proxy will retry if the destination resets the stream\n with a REFUSED_STREAM error code. This reset type indicates that it\n is safe to retry."]]