# AzureApiManagementCircuitBreakerOptions

- Kind: `class`
- Package: [Aspire.Hosting.Azure.ApiManagement](/reference/api/csharp/aspire.hosting.azure.apimanagement.md)
- Version: `17.0.0-preview.1.26567.5`
- Namespace: `Aspire.Hosting.Azure`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting.Azure.ApiManagement/AzureApiManagementCircuitBreakerOptions.cs)

Configures a circuit breaker for an Azure API Management backend.

## Definition

```csharp
namespace Aspire.Hosting.Azure;

public sealed class AzureApiManagementCircuitBreakerOptions
{
    // ...
}
```

## ATS metadata

### ATS DTO

- Serialized as a plain JSON object without a `$type` discriminator.

## Constructors

- [AzureApiManagementCircuitBreakerOptions](/reference/api/csharp/aspire.hosting.azure.apimanagement/azureapimanagementcircuitbreakeroptions/constructors.md#constructor)

## Properties

- [AcceptRetryAfter](/reference/api/csharp/aspire.hosting.azure.apimanagement/azureapimanagementcircuitbreakeroptions/properties.md#acceptretryafter) : `bool` `get; init` -- Gets or sets whether API Management honors the backend's `Retry-After` header.
- [FailureCount](/reference/api/csharp/aspire.hosting.azure.apimanagement/azureapimanagementcircuitbreakeroptions/properties.md#failurecount) : `int` `get; init` -- Gets or sets the number of failures that opens the circuit.
- [FailureIntervalSeconds](/reference/api/csharp/aspire.hosting.azure.apimanagement/azureapimanagementcircuitbreakeroptions/properties.md#failureintervalseconds) : `int` `get; init` -- Gets or sets the interval, in seconds, during which failures are counted.
- [Name](/reference/api/csharp/aspire.hosting.azure.apimanagement/azureapimanagementcircuitbreakeroptions/properties.md#name) : `string` `get; init` -- Gets or sets the circuit-breaker rule name.
- [StatusCodeRanges](/reference/api/csharp/aspire.hosting.azure.apimanagement/azureapimanagementcircuitbreakeroptions/properties.md#statuscoderanges) : `AzureApiManagementStatusCodeRange[]` `get; init` -- Gets or sets the HTTP status-code ranges treated as failures.
- [TripDurationSeconds](/reference/api/csharp/aspire.hosting.azure.apimanagement/azureapimanagementcircuitbreakeroptions/properties.md#tripdurationseconds) : `int` `get; init` -- Gets or sets how many seconds the circuit remains open.
