Skip to content
DocsTry Aspire
DocsTry

AzureCosmosDBResource Properties

ClassProperties9 members
A resource that represents an Azure Cosmos DB.
AccountKeySection titled AccountKeynullableReferenceExpression?
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.
ConnectionStringSection titled ConnectionStringBicepSecretOutputReference
Gets the "connectionString" reference from the secret outputs of the Azure Cosmos DB resource.
public BicepSecretOutputReference ConnectionString { get; }
ConnectionStringExpressionSection titled ConnectionStringExpressionReferenceExpression
Gets the connection string template for the manifest for the Azure Cosmos DB resource.
public ReferenceExpression ConnectionStringExpression { get; }
ConnectionStringOutputSection titled ConnectionStringOutputBicepOutputReference
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.
IdSection titled IdBicepOutputReference
Gets the "id" output reference for the resource.
public BicepOutputReference Id { get; }
Gets a value indicating whether the Azure Cosmos DB resource is running in the local emulator.
public bool IsEmulator { get; }
NameOutputReferenceSection titled NameOutputReferenceBicepOutputReference
Gets the "name" output reference for the resource.
public BicepOutputReference NameOutputReference { get; }
UriExpressionSection titled UriExpressionReferenceExpression
Gets the account endpoint URI expression for the Cosmos DB account.
public ReferenceExpression UriExpression { get; }
Format: https://{name}.documents.azure.com:443/.
UseAccessKeyAuthenticationSection titled UseAccessKeyAuthenticationbool
Gets a value indicating whether the resource uses access key authentication.
public bool UseAccessKeyAuthentication { get; }