Reference documentation and code samples for the Google Cloud Network Services V1 Client class RetryPolicy.
The specifications for retries.
Specifies one or more conditions for which this retry rule applies. Valid
values are:
Generated from protobuf messagegoogle.cloud.networkservices.v1.GrpcRoute.RetryPolicy
Namespace
Google \ Cloud \ NetworkServices \ V1 \ GrpcRoute
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ retry_conditions
array
connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts. - refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Router will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Router will retry if the gRPC status code in the response header is set to unavailable
↳ num_retries
int
Specifies the allowed number of retries. This number must be > 0. If not specified, default to 1.
getRetryConditions
connect-failure: Router will retry on failures connecting to Backend
Services, for example due to connection timeouts.
refused-stream: Router will retry if the backend service resets the
stream
with a REFUSED_STREAM error code. This reset type indicates that it is
safe to retry.
cancelled: Router will retry if the gRPC status code in the response
header
is set to cancelled
deadline-exceeded: Router will retry if the gRPC status code in the
response
header is set to deadline-exceeded
resource-exhausted: Router will retry if the gRPC status code in the
response header is set to resource-exhausted
unavailable: Router will retry if the gRPC status code in the response
header is set to unavailable
connect-failure: Router will retry on failures connecting to Backend
Services, for example due to connection timeouts.
refused-stream: Router will retry if the backend service resets the
stream
with a REFUSED_STREAM error code. This reset type indicates that it is
safe to retry.
cancelled: Router will retry if the gRPC status code in the response
header
is set to cancelled
deadline-exceeded: Router will retry if the gRPC status code in the
response
header is set to deadline-exceeded
resource-exhausted: Router will retry if the gRPC status code in the
response header is set to resource-exhausted
unavailable: Router will retry if the gRPC status code in the response
header is set to unavailable
Parameter
Name
Description
var
string[]
Returns
Type
Description
$this
getNumRetries
Specifies the allowed number of retries. This number must be > 0. If not
specified, default to 1.
Returns
Type
Description
int
setNumRetries
Specifies the allowed number of retries. This number must be > 0. If not
specified, default to 1.
[[["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-09-09 UTC."],[],[],null,["# Google Cloud Network Services V1 Client - Class RetryPolicy (0.6.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.6.1 (latest)](/php/docs/reference/cloud-networkservices/latest/V1.GrpcRoute.RetryPolicy)\n- [0.6.0](/php/docs/reference/cloud-networkservices/0.6.0/V1.GrpcRoute.RetryPolicy)\n- [0.5.0](/php/docs/reference/cloud-networkservices/0.5.0/V1.GrpcRoute.RetryPolicy)\n- [0.4.0](/php/docs/reference/cloud-networkservices/0.4.0/V1.GrpcRoute.RetryPolicy)\n- [0.3.0](/php/docs/reference/cloud-networkservices/0.3.0/V1.GrpcRoute.RetryPolicy)\n- [0.2.3](/php/docs/reference/cloud-networkservices/0.2.3/V1.GrpcRoute.RetryPolicy)\n- [0.1.1](/php/docs/reference/cloud-networkservices/0.1.1/V1.GrpcRoute.RetryPolicy) \nReference documentation and code samples for the Google Cloud Network Services V1 Client class RetryPolicy.\n\nThe specifications for retries.\n\nSpecifies one or more conditions for which this retry rule applies. Valid\nvalues are:\n\nGenerated from protobuf message `google.cloud.networkservices.v1.GrpcRoute.RetryPolicy`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ NetworkServices \\\\ V1 \\\\ GrpcRoute\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getRetryConditions\n\n- connect-failure: Router will retry on failures connecting to Backend\n Services, for example due to connection timeouts.\n\n- refused-stream: Router will retry if the backend service resets the\n stream\n with a REFUSED_STREAM error code. This reset type indicates that it is\n safe to retry.\n\n- cancelled: Router will retry if the gRPC status code in the response header is set to cancelled\n- deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded\n- resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted\n- unavailable: Router will retry if the gRPC status code in the response header is set to unavailable\n\n### setRetryConditions\n\n- connect-failure: Router will retry on failures connecting to Backend\n Services, for example due to connection timeouts.\n\n- refused-stream: Router will retry if the backend service resets the\n stream\n with a REFUSED_STREAM error code. This reset type indicates that it is\n safe to retry.\n\n- cancelled: Router will retry if the gRPC status code in the response header is set to cancelled\n- deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded\n- resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted\n- unavailable: Router will retry if the gRPC status code in the response header is set to unavailable\n\n### getNumRetries\n\nSpecifies the allowed number of retries. This number must be \\\u003e 0. If not\nspecified, default to 1.\n\n### setNumRetries\n\nSpecifies the allowed number of retries. This number must be \\\u003e 0. If not\nspecified, default to 1."]]