1.6.0 (latest) 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    public sealed class HttpRoute.Types.StatefulSessionAffinityPolicy : IMessage<HttpRoute.Types.StatefulSessionAffinityPolicy>, IEquatable<HttpRoute.Types.StatefulSessionAffinityPolicy>, IDeepCloneable<HttpRoute.Types.StatefulSessionAffinityPolicy>, IBufferMessage, IMessage

Reference documentation and code samples for the Network Services v1 API class HttpRoute.Types.StatefulSessionAffinityPolicy.

The specification for cookie-based stateful session affinity where the
date plane supplies a "session cookie" with the name "GSSA" which encodes
a specific destination host and each request containing that cookie will
be directed to that host as long as the destination host remains up and
healthy.

The gRPC proxyless mesh library or sidecar proxy will manage the session
cookie but the client application code is responsible for copying the
cookie from each RPC in the session to the next.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[HttpRoute](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types)[StatefulSessionAffinityPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types.StatefulSessionAffinityPolicy), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[HttpRoute](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types)[StatefulSessionAffinityPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types.StatefulSessionAffinityPolicy), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[HttpRoute](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types)[StatefulSessionAffinityPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types.StatefulSessionAffinityPolicy), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## 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.NetworkServices.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1)

## Assembly

Google.Cloud.NetworkServices.V1.dll

## Constructors

### StatefulSessionAffinityPolicy()

    public StatefulSessionAffinityPolicy()

### StatefulSessionAffinityPolicy(StatefulSessionAffinityPolicy)

    public StatefulSessionAffinityPolicy(HttpRoute.Types.StatefulSessionAffinityPolicy other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoutehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types.StatefulSessionAffinityPolicy` |

## Properties

### CookieTtl

    public Duration CookieTtl { get; set; }

Required. The cookie TTL value for the Set-Cookie header generated by
the data plane. The lifetime of the cookie may be set to a value from 0
to 86400 seconds (24 hours) inclusive.

Set this to 0s to use a session cookie and disable cookie expiration.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Duration.html` |   |