# TraconIdempotencyOptions

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.traconidempotencyoptions/
> Summary: TraconIdempotencyOptions: Options for Idempotency-Key support.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Core.dll</code></div>

Options for `Idempotency-Key` support.

```csharp
public sealed class TraconIdempotencyOptions
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.traconidempotencyoptions/">TraconIdempotencyOptions</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Remarks

Reads values from the `Tracon:Idempotency` configuration section.

The **default is enabled**, and that is a deliberate reading of the
no-surprises rule.
Unlike rate limiting and quotas, this feature activates only when a client sends
the `Idempotency-Key` header. A request without the header has no extra cost
or behavior change. If disabled by default, a client that sends the header could
assume protection when it has none. That would be the silent surprise.

## Constructors

### <a id="Tracon_TraconIdempotencyOptions__ctor"></a> TraconIdempotencyOptions\(\)

```csharp
public TraconIdempotencyOptions()
```

## Fields

### <a id="Tracon_TraconIdempotencyOptions_SectionName"></a> SectionName

The configuration section name.

```csharp
public const string SectionName = "Tracon:Idempotency"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Properties

### <a id="Tracon_TraconIdempotencyOptions_Enabled"></a> Enabled

Gets or sets a value that enables idempotency support. Even when enabled, a
request without an `Idempotency-Key` header has no extra cost. Default: [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool).

```csharp
public bool Enabled { get; set; }
```

#### Property Value

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_TraconIdempotencyOptions_MaxKeyLength"></a> MaxKeyLength

The maximum key length. The endpoint returns `400` when it is exceeded.

```csharp
public int MaxKeyLength { get; set; }
```

#### Property Value

 [int](https://learn.microsoft.com/dotnet/api/system.int32)
