# AzureCosmosDBContainerResource Properties

- Package: [Aspire.Hosting.Azure.CosmosDB](/reference/api/csharp/aspire.hosting.azure.cosmosdb.md)
- Type: [AzureCosmosDBContainerResource](/reference/api/csharp/aspire.hosting.azure.cosmosdb/azurecosmosdbcontainerresource.md)
- Kind: `Properties`
- Members: `6`

Represents an Azure Cosmos DB Database Container.

## ConnectionStringExpression

- Name: `ConnectionStringExpression`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBContainerResource.cs#L114)

Gets the connection string expression for the Azure Cosmos DB Database Container.

```csharp
public ReferenceExpression ConnectionStringExpression { get; }
```

## ContainerName

- Name: `ContainerName`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBContainerResource.cs)

Gets or sets the container name.

```csharp
public string ContainerName { get; set; }
```

## ContainerProperties

- Name: `ContainerProperties`
- Modifiers: `get`
- Returns: `ContainerProperties`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBContainerResource.cs)

Gets the container properties for this azure cosmos db container resource.

```csharp
public ContainerProperties ContainerProperties { get; }
```

## Parent

- Name: `Parent`
- Modifiers: `get`
- Returns: [AzureCosmosDBDatabaseResource](/reference/api/csharp/aspire.hosting.azure.cosmosdb/azurecosmosdbdatabaseresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBContainerResource.cs#L108)

Gets the parent Azure Cosmos DB database resource.

```csharp
public AzureCosmosDBDatabaseResource Parent { get; }
```

## PartitionKeyPath

- Name: `PartitionKeyPath`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBContainerResource.cs)

Gets or sets the partition key path.

```csharp
public string PartitionKeyPath { get; set; }
```

## PartitionKeyPaths

- Name: `PartitionKeyPaths`
- Modifiers: `get; set`
- Returns: `IReadOnlyList<string>`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBContainerResource.cs)

Gets or sets the hierarchical partition keys.

```csharp
public IReadOnlyList<string> PartitionKeyPaths { get; set; }
```
