# Network Services V1 API - Class Google::Cloud::NetworkServices::V1::GrpcRoute::RetryPolicy (v2.10.1)

2.10.1 (latest) 2.10.0 2.9.0 2.8.0 2.7.0 2.6.1 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.1 1.2.0 1.1.0 1.0.1 0.2.0 0.1.0 Reference documentation and code samples for the Network Services V1 API class Google::Cloud::NetworkServices::V1::GrpcRoute::RetryPolicy.

The specifications for retries.
Specifies one or more conditions for which this retry rule applies. Valid
values are:

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #num_retries

    def num_retries() -> ::Integer

**Returns**

- (::Integer) --- Specifies the allowed number of retries. This number must be \> 0. If not specified, default to 1.

### #num_retries=

    def num_retries=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- Specifies the allowed number of retries. This number must be \> 0. If not specified, default to 1.
**Returns**

- (::Integer) --- Specifies the allowed number of retries. This number must be \> 0. If not specified, default to 1.

### #retry_conditions

    def retry_conditions() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) ---
  - 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

### #retry_conditions=

    def retry_conditions=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::String\>) ---
  - 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
**Returns**

- (::Array\<::String\>) ---
  - 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