# Resources

- Kind: `class`
- Package: [Aspire.Hosting.Docker](/reference/api/csharp/aspire.hosting.docker.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting.Docker.Resources.ServiceNodes.Swarm`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Docker/Resources/ServiceNodes/Swarm/Resources.cs)

Represents the resource configurations for a Docker service in Swarm mode.

## Definition

```csharp
namespace Aspire.Hosting.Docker.Resources.ServiceNodes.Swarm;

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

## Remarks

The `Resources` class defines the optional constraints for resource allocation by specifying limits and reservations. Limits define the maximum resources a service can utilize, while reservations define the minimum guaranteed resources.

## Constructors

- [Resources](/reference/api/csharp/aspire.hosting.docker/resources/constructors.md#constructor)

## Properties

- [Limits](/reference/api/csharp/aspire.hosting.docker/resources/properties.md#limits) : [ResourceSpec?](/reference/api/csharp/aspire.hosting.docker/resourcespec.md) `get; set` -- Gets or sets the resource limits for a Docker service.
- [Reservations](/reference/api/csharp/aspire.hosting.docker/resources/properties.md#reservations) : [ResourceSpec?](/reference/api/csharp/aspire.hosting.docker/resourcespec.md) `get; set` -- Gets or sets the resources reserved for a Docker service in Swarm mode.
