# CosmosGrainStorageOptions Properties

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.persistence.cosmos/orleans.persistence.cosmos.cosmosgrainstorageoptions/)

## DeleteStateOnClear {#deletestateonclear-9f3e4016}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.cosmos/orleans.persistence.cosmos.cosmosgrainstorageoptions/properties/deletestateonclear-9f3e4016/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Persistence.Cosmos/CosmosStorageOptions.cs)

```csharp
public bool DeleteStateOnClear
```

Gets or sets a value indicating whether state should be deleted when [IStorage](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.core.istorage/) is called.

## InitStage {#initstage-2c72c5c5}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.cosmos/orleans.persistence.cosmos.cosmosgrainstorageoptions/properties/initstage-2c72c5c5/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Persistence.Cosmos/CosmosStorageOptions.cs)

```csharp
public int InitStage
```

Stage of silo lifecycle where storage should be initialized. Storage must be initialized prior to use.

## PartitionKeyPath {#partitionkeypath-3d2e572d}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.cosmos/orleans.persistence.cosmos.cosmosgrainstorageoptions/properties/partitionkeypath-3d2e572d/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Persistence.Cosmos/CosmosStorageOptions.cs)

```csharp
public string PartitionKeyPath
```

## StateFieldsToIndex {#statefieldstoindex-b086a654}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.cosmos/orleans.persistence.cosmos.cosmosgrainstorageoptions/properties/statefieldstoindex-b086a654/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Persistence.Cosmos/CosmosStorageOptions.cs)

```csharp
public List<string> StateFieldsToIndex
```

List of JSON path strings. Each entry on this list represents a property in the State Object that will be included in the document index. The default is to not add any property in the State object.
