5.0.0 (latest) 4.16.0 4.15.0 4.14.0 4.13.0 4.11.0 4.10.0 4.9.0 4.8.0 4.7.0 4.6.0 4.5.0 4.4.0 4.3.0 4.2.0 4.1.0 4.0.0 3.7.0 3.6.0 3.5.0 3.4.0

    public sealed class RetryOptions

Reference documentation and code samples for the Google Cloud Storage v1 API class RetryOptions.

Options used to indicate the retry configuration for an API request in case of failure. This class is immutable.
These determine whether and how the request should be retried.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> RetryOptions

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Storage.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Storage.V1/latest/Google.Cloud.Storage.V1)

## Assembly

Google.Cloud.Storage.V1.dll

## Constructors

### RetryOptions(RetryTiming, RetryPredicate)

    public RetryOptions(RetryTiming retryTiming, RetryPredicate retryPredicate)

Creates an instance based on the given timing and predicate.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `retryTiming` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Storage.V1/latest/Google.Cloud.Storage.V1.RetryTiming` Timing configuration to apply when retrying. May be null, in which case [the default timing](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Storage.V1/latest/Google.Cloud.Storage.V1.RetryTiming#Google_Cloud_Storage_V1_RetryTiming_Default) will be used. |
| `retryPredicate` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Storage.V1/latest/Google.Cloud.Storage.V1.RetryPredicate` Predicate to apply to determine whether an error response can be retried. May be null, in which case [default error codes](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Storage.V1/latest/Google.Cloud.Storage.V1.RetryPredicate#Google_Cloud_Storage_V1_RetryPredicate_RetriableIdempotentErrors) will be used. |

## Properties

### IdempotentRetryOptions

    public static RetryOptions IdempotentRetryOptions { get; }

Options used by default for idempotent operations upon failure.
It has all retry timings reset to defaults and retry predicate based on default error codes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Storage.V1/latest/Google.Cloud.Storage.V1.RetryOptions` |   |

### Never

    public static RetryOptions Never { get; }

This configuration ensures that the API request is never retried on failure.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Storage.V1/latest/Google.Cloud.Storage.V1.RetryOptions` |   |