Class CosmosConfig
Inherited Members
Namespace: Benday.CosmosDb.Utilities
Assembly: Benday.CosmosDb.dll
Syntax
public class CosmosConfig
Constructors
| Edit this page View SourceCosmosConfig()
Declaration
public CosmosConfig()
Properties
| Edit this page View SourceAccountKey
Account key for Cosmos DB
Declaration
public string AccountKey { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
AllowBulkExecution
Allow bulk execution for Cosmos DB operations on the client connection. This is enabled by default.
Declaration
public bool AllowBulkExecution { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
ConnectionString
Gets the connection string for the Cosmos DB account.
Declaration
public string ConnectionString { get; }
Property Value
| Type | Description |
|---|---|
| string |
ContainerName
Name of the container in the Cosmos DB database.
Declaration
public string ContainerName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
CreateStructures
Configure whether to create Cosmos DB structures if they don't already exists. This option is disabled by default.
Declaration
public bool CreateStructures { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
DatabaseName
Cosmos DB database name.
Declaration
public string DatabaseName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
DatabaseThroughput
Throughput for the database. This is only used if the database is created.
Declaration
public int DatabaseThroughput { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Endpoint
Endpoint for Cosmos DB
Declaration
public string Endpoint { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
PartitionKey
Partition key configuration for the Cosmos DB container.
Declaration
public string PartitionKey { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
UseCamelCase
Use camelCase for JSON property names. This is enabled by default. When enabled, C# PascalCase properties will be serialized as camelCase in Cosmos DB documents. Properties with explicit [JsonPropertyName] attributes are not affected.
Declaration
public bool UseCamelCase { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
UseDefaultAzureCredential
Use DefaultAzureCredential for authentication. This is disabled by default.
Declaration
public bool UseDefaultAzureCredential { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
UseGatewayMode
Use Gateway mode for Cosmos DB. Default is false (direct mode).
Declaration
public bool UseGatewayMode { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
UseHierarchicalPartitionKey
Use hierarchical partition key. This option is disabled by default.
Declaration
public bool UseHierarchicalPartitionKey { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |