# IDeploymentStateManager

- Kind: `interface`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting.Pipelines`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Pipelines/IDeploymentStateManager.cs)

Provides deployment state management functionality.

## Definition

```csharp
namespace Aspire.Hosting.Pipelines;

public interface IDeploymentStateManager
{
    // ...
}
```

## Properties

- [StateFilePath](/reference/api/csharp/aspire.hosting/ideploymentstatemanager/properties.md#statefilepath) : `string?` `abstract` `get` -- Gets the file path where deployment state is stored, if applicable.

## Methods

- [AcquireSectionAsync(string, CancellationToken)](/reference/api/csharp/aspire.hosting/ideploymentstatemanager/methods.md#acquiresectionasync-string-cancellationtoken) : [Task<DeploymentStateSection>](/reference/api/csharp/aspire.hosting/deploymentstatesection.md) `abstract` -- Acquires a specific section of the deployment state with version tracking for concurrency control. The returned section is an immutable snapshot of the data at the time of acquisition.
- [ClearAllStateAsync(CancellationToken)](/reference/api/csharp/aspire.hosting/ideploymentstatemanager/methods.md#clearallstateasync-cancellationtoken) : `Task` `abstract` -- Clears all deployment state, removing all sections and the underlying storage.
- [DeleteSectionAsync(DeploymentStateSection, CancellationToken)](/reference/api/csharp/aspire.hosting/ideploymentstatemanager/methods.md#deletesectionasync-deploymentstatesection-cancellationtoken) : `Task` `abstract` -- Delete a section of deployment state with optimistic concurrency control. The section must have a matching version number or a concurrency exception will be thrown.
- [SaveSectionAsync(DeploymentStateSection, CancellationToken)](/reference/api/csharp/aspire.hosting/ideploymentstatemanager/methods.md#savesectionasync-deploymentstatesection-cancellationtoken) : `Task` `abstract` -- Saves a section of deployment state with optimistic concurrency control. The section must have a matching version number or a concurrency exception will be thrown.
