# ContainerResizePolicyV1

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

Represents a policy for resizing containers in a Kubernetes environment.

## Definition

```csharp
namespace Aspire.Hosting.Kubernetes.Resources;

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

## Remarks

This class defines the configuration for a container's resize policy, specifically the associated resource and the restart behavior.

## Constructors

- [ContainerResizePolicyV1](/reference/api/csharp/aspire.hosting.kubernetes/containerresizepolicyv1/constructors.md#constructor)

## Properties

- [ResourceName](/reference/api/csharp/aspire.hosting.kubernetes/containerresizepolicyv1/properties.md#resourcename) : `string` `get; set` -- Gets or sets the name of the resource associated with the container's resize policy.
- [RestartPolicy](/reference/api/csharp/aspire.hosting.kubernetes/containerresizepolicyv1/properties.md#restartpolicy) : `string` `get; set` -- Gets or sets the restart policy for the container. Determines the behavior of the container regarding restarts upon failure or completion. Typical options could include policies like "Always", "OnFailure", or "Never".
