# ResourceSpec Properties

- Package: [Aspire.Hosting.Docker](/reference/api/csharp/aspire.hosting.docker.md)
- Type: [ResourceSpec](/reference/api/csharp/aspire.hosting.docker/resourcespec.md)
- Kind: `Properties`
- Members: `2`

Represents resource specifications for a Docker service.

## Cpus

- Name: `Cpus`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Docker/Resources/ServiceNodes/Swarm/ResourceSpec.cs)

Represents the amount of CPU resources allocated for a specific service node in the swarm configuration. The value is typically expressed in terms of CPU shares or fractions, depending on the context.

```csharp
public string? Cpus { get; set; }
```

## Memory

- Name: `Memory`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Docker/Resources/ServiceNodes/Swarm/ResourceSpec.cs)

Represents the memory resource specification for the service. This property defines the amount of memory allocated as a resource. The value is typically specified as a string representing the size, for example "512M" for 512 megabytes.

```csharp
public string? Memory { get; set; }
```
