Skip to content
Docs Try Aspire

AzureCosmosDBResource Properties

Class Properties 8 members
A resource that represents an Azure Cosmos DB.
AccountKey Section titled AccountKey nullable ReferenceExpression?
Gets the account key expression for the Cosmos DB account.
public ReferenceExpression? AccountKey { get; }
This is only available for emulator and access key authentication. For Entra ID authentication, this property will be null.
ConnectionString Section titled ConnectionString BicepSecretOutputReference
Gets the "connectionString" reference from the secret outputs of the Azure Cosmos DB resource.
public BicepSecretOutputReference ConnectionString { get; }
ConnectionStringExpression Section titled ConnectionStringExpression ReferenceExpression
Gets the connection string template for the manifest for the Azure Cosmos DB resource.
public ReferenceExpression ConnectionStringExpression { get; }
ConnectionStringOutput Section titled ConnectionStringOutput BicepOutputReference
Gets the "connectionString" output reference from the bicep template for the Azure Cosmos DB resource. This is used when Entra ID authentication is used. The connection string is an output of the bicep template.
public BicepOutputReference ConnectionStringOutput { get; }
The value is taken from the cosmos.properties.documentEndpoint bicep property and contains an endpoint.
Gets a value indicating whether the Azure Cosmos DB resource is running in the local emulator.
public bool IsEmulator { get; }
NameOutputReference Section titled NameOutputReference BicepOutputReference
Gets the "name" output reference for the resource.
public BicepOutputReference NameOutputReference { get; }
UriExpression Section titled UriExpression ReferenceExpression
Gets the account endpoint URI expression for the Cosmos DB account.
public ReferenceExpression UriExpression { get; }
Format: https://{name}.documents.azure.com:443/.
UseAccessKeyAuthentication Section titled UseAccessKeyAuthentication bool
Gets a value indicating whether the resource uses access key authentication.
public bool UseAccessKeyAuthentication { get; }